Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maximal Causality Reduction (MCR) algorithm #154

Open
barrucadu opened this issue Nov 22, 2017 · 0 comments
Open

Maximal Causality Reduction (MCR) algorithm #154

barrucadu opened this issue Nov 22, 2017 · 0 comments

Comments

@barrucadu
Copy link
Owner

barrucadu commented Nov 22, 2017

MCR is a concurrency testing algorithm by Jeff Huang which explores a provably minimal number of executions. In the first MCR paper, it vastly outperforms DPOR (which dejafu currently uses). It supports TSO and PSO. It has a Java implementation. It would be cool to have in dejafu.

Unfortunately, it has some constraints which don't work so well in Haskell:

  1. It uses reference equality to cut down on the number of executions.
  2. It assumes "local determinism": the next action of a thread is decided solely by the prior actions of the thread and values it has read.

For (1), we can use StableName. Haskell messes up (2) by having asynchronous exceptions.

I sent an email to Jeff, and he agreed that for (1) the algorithm can just assume that everything is unequal, which will degrade performance but it should still be better than DPOR; and for (2) every thread can be given an "exception variable", which is checked before every action. There are probably other topics to think about (eg, how to integrate masking states into this --- as they cause the throwing thread to block!).

This is definitely a project for the future, but it is something I would really like to have a go at some time.

@barrucadu barrucadu changed the title Maximum causality reduction (MCR) algorithm Maximal Causality Reduction (MCR) algorithm Nov 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant