-
Notifications
You must be signed in to change notification settings - Fork 16
Initial STM precond fix, add Domainslib.Chan tests #67
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
let rec check_obs pref cs1 cs2 s = match pref with | ||
(* checks that all interleavings of a cmd triple satisfies all preconditions *) | ||
let rec all_interleavings_ok pref cs1 cs2 s = | ||
match pref with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the prefix is sequential, it should be valid by construction (?). So, do we really need to check it here or could we just compute the spawn_state
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! 👍
From a generation perspective I completely agree.
From a shrinking perspective, I don't think we can be sure that the prefix continues to be valid precond
-wise, e.g., if the cmd list
shrinker removes cmd
s from the sequential prefix...
Such shrinking reminds me that it would be good to actually test that this combination works - a negative test (triggering shrinking) with a non-constant precond
....
Rerunning jobs as trunk has now been patched for the MacOS segfault. |
Rebased on top of #63 - also bumping |
Ran this manually on the MacMini also - 5 times.
The latter only runs 100 iterations though - so bumping this |
Runs fine on manual MacOS tests - merging |
This PR provides an initial implementation STM
precond
support for parallel mode using a generate-and-filter approach.Following Claessen-al:ICFP09 we keep only
cmd list
triples where all interleavings satisfy all preconditions.The
precond
implementation is enough to get the second part running:This part tests the
Domainslib.Chan
module. This requiresprecond
to avoidrecv
blocking on an empty channelsend
blocking on a full channelFor the
Domainslib.Chan
tests, this means that we need to generate around twice as many triples as the testcount
.I've also checked that the run time of the other STM tests is not affected noticably. For reference we now have the following STM tests:
Ping @n-osborne 👀