Commit Graph

15 Commits

Author SHA1 Message Date
Michael Walker
a6055a30a0 Use strict IntMaps where possible. 2015-07-24 15:47:24 +01:00
Michael Walker
5649c4d2a7 Use Set instead of [] where it makes sense.
A lot of the places where lists were used, there was an assumed invariant that
there would be no duplicate entries, for some criteria of equality. In some
cases this was enforced by `nub`, in others not. Sets are a much better choice
here, as they actually enforce the invariant, with better complexity for some
operations.
2015-07-21 16:09:47 +01:00
Michael Walker
c12cbcf707 Implement BPOR for SCT, return to listy predicates.
This performs better with "real" code (the Par monad) but surprisingly does far
worse with the included tests! The next thing to do is implement the orthogonal
sleep sets algorithm to cut down on available choices even further and
hopefully correct this issue.

See also: "Bounded Partial-Order Reduction" [Coons, Musuvathi, McKinley 2013]
2015-07-16 22:32:30 +01:00
Michael Walker
8944ea97a5 Use schedule bounding as the primary SCT approach.
This allows results to be naturally reported as lazy trees, rather
than as lists representing a tree traversal. This in turn means
that the actual bound can be moved outwards to the testing code, and
not used at all in the runner. Trees let us do nice things with
shrinking and short-circuiting, if we make the (fairly reasonable)
assumption that the children of a buggy result will exhibit the same
bug.

Storing results as trees does complicate the predicate helper
functions somewhat, but I think the clarity gained in the actual
SCT code is well worth it.
2015-06-19 16:50:51 +01:00
Michael Walker
0a4bdeee68 Add source-repository to cabal file 2015-03-13 15:01:03 +00:00
Michael Walker
096a1c0651 Switch to MIT license 2015-03-13 14:58:42 +00:00
Michael Walker
e72b84c613 Add an internal STM module 2015-02-23 17:24:02 +00:00
Michael Walker
6f253df520 Drop base dependency to 4.5 2015-02-16 03:33:37 +00:00
Michael Walker
ab6e411c38 Tidy up Deterministic.Internal 2015-02-16 03:16:55 +00:00
Michael Walker
ef580d66e8 Use MonadThrow/MonadCatch for MonadSTM exceptions 2015-02-13 00:46:13 +00:00
Michael Walker
9b5e010d90 Implement a STM runner. 2015-02-09 22:04:28 +00:00
Michael Walker
f79f7fd245 Add a MonadSTM
- Each MonadConc has an associated MonadSTM, transactions of which
   it can run atomically.
 - The MonadSTM for IO is STM.
 - Conc and ConcIO do not yet have a MonadSTM.
2015-02-09 15:30:54 +00:00
Michael Walker
bc31ddc5e1 Remove shrinking.
- Tweak order in which schedules are explored to look at simple,
   but not too simple, cases first.

 - Port simplicity logic from shrinking to dupe elimination.
2015-02-04 11:45:08 +00:00
Michael Walker
00ad122b65 Refactor code and update docs to make more not-me friendly 2015-02-01 01:21:42 +00:00
Michael Walker
fbc262c361 Rename and remodularise 2015-01-31 15:50:54 +00:00