3 ms·
I'm not done reading this yet, but I have a "does this have a name/does this exist"-type question after reading the jcstress example (section 1.1): It seems li
by ajkjk 10y ago
I'm not done reading this yet, but I have a "does this have a name/does this exist"-type question after reading the jcstress example (section 1.1):
It seems like it would be possible to enumerate all interesting orderings of several threads running at once at the threading-engine level, and therefore do this kind of probabilistic test deterministically.
Of course, the number of possible orderings of two n-length programs is very high (2n choose n, since 2n instructions are run in total and you can place the n instructions in one thread first). But the language definition also provides some concept of 'commuting' operations. For example, unrelated writes to two different variables can't have their orderings matter. That should cut down the number of orderings a great deal. And it's possible useful even if it it's only practical for small programs with few total orderings.
Is there a language or framework that does something like this?
- BenoitP 10y agoI don't know if this answers your question. I feel like it is about enumerating the possible states your program can be in. You could model it in TLA+, which is about Temporal Logic of Actions; a good fit for modeling the happens-before. There are some nice visualizations associated with a checked model: https://www3.hhu.de/stups/prob/index.php/State_space_visualization_examples https://www3.hhu.de/stups/prob/index.php/State_space_visuali...
- jstclair 10y agoSounds like you're describing Microsoft Research's CHESS (2007), and a host of related projects (Google's ThreadWeaver for Java). See http://research.microsoft.com/en-us/projects/chess/ http://research.microsoft.com/en-us/projects/chess/ and https://code.google.com/archive/p/thread-weaver/wikis/UsersGuide.wiki https://code.google.com/archive/p/thread-weaver/wikis/UsersG...
- jkot 10y agoI made blogpost about thread weaver some time ago. Not very useful http://www.mapdb.org/news/thread_weaver/ http://www.mapdb.org/news/thread_weaver/