Commit Graph

12 Commits

Author SHA1 Message Date
Michael Walker
75fbad38a1 Rename Deterministic to Conc.
Closes #45
2016-07-21 19:33:49 +01:00
Michael Walker
2aa2b8f447 Unify IO and ST instances
Closes #44
2016-07-21 19:33:49 +01:00
Michael Walker
c742da2bfd Drop _concKnows stuff and fix litmus tests.
Removing the stuff broke some of the litmus tests, which is bad. It
probably means that those actions were being put into sleep sets, and so
hiding actually interesting interleavings from the POR implementation. I
need to improve the lookahead behaviour to ignore these invisible
actions.

Closes #46.
2016-07-21 19:33:49 +01:00
Michael Walker
cea4d59b3c Correctly count preemptions with commit threads.
Conceptually, commits are happening truly in parallel
nondeterministically, and the commit threads are introduced to unify
this source of nondeterminism with the scheduling decisions. Commit
threads are not real threads, and switching to one is not a real context
switch, it therefore doesn't count as a preemption.

For example, this execution clearly has no preemptions in:

    S1---C-S1---

It would be absurd to say it has 1 preemption. But what about this?

    S1---C-S2---

This clearly DOES have a preemption. S1 was preempted by C (but we don't
count that), and then S2 started to execute! Control should have been
returned to S1.

Prior to now, this case was not considered specially. So every commit
effectively gives rise to a free preemption! This is bad for two
reasons:

- More schedules get executed, so testing takes longer.
- This is actually, in a sense, unsound! Results are potentially being
  reported which could NEVER arise under ANY real-world execution
  subject to those bounds!

It is because of this latter point that some of the expected results in
test litmusWP27 have been removed. They require more than the standard
two preemptions to observe.

Closes #39.
2016-05-02 23:35:08 +01:00
Michael Walker
29150d03a3 Drop dependency (3) and compute state in dporSched
This massively reduces the number of schedules tried for the litmus
tests, as expected, which is great! Interestingly, it does result in
more unique results being discovered for intelWP27 and intelWP28. This
is surprising DPOR is supposed to be complete. Perhaps this indicates
some unsoundness in the way I have integrated schedule bounding with
relaxed memory.
2016-04-03 05:31:06 +01:00
Michael Walker
f3457b23a0 Generalise and move grow to DPOR module.
For some reason, this causes significantly more schedules to be explored
in some of the litmus tests, in particular intelWP27 and intelWP28. I've
not dug too deeply, but it's probably something which should be
addresed.
2016-04-03 05:02:44 +01:00
Michael Walker
6c29594675 Add a function to compare the different memory models 2016-03-31 18:43:10 +01:00
Michael Walker
a1122405fe Less restrictive module exports in tests 2016-03-31 18:16:09 +01:00
Michael Walker
b98a03e22c Add more litmus tests 2016-03-31 18:14:11 +01:00
Michael Walker
a4c2a1c235 Rename CVar -> MVar 2016-03-23 03:36:07 +00:00
Michael Walker
cae5704ac9 Enable building tests with GHC <7.10 2015-12-01 05:13:47 +00:00
Michael Walker
37a5886c83 Make a separate package for the test suite. Closes #31. 2015-12-01 05:07:56 +00:00