Commit Graph

24 Commits

Author SHA1 Message Date
Michael Walker
ef580d66e8 Use MonadThrow/MonadCatch for MonadSTM exceptions 2015-02-13 00:46:13 +00:00
Michael Walker
9b0cd6ffd3 doTransaction already calls undo on retry/exception 2015-02-13 00:46:12 +00:00
Michael Walker
a305354b65 Add STM exceptions 2015-02-13 00:46:11 +00:00
Michael Walker
7b7c765494 Add a central manager for unique ID types 2015-02-10 18:26:22 +00:00
Michael Walker
d5e4f94a08 Include the CTVarIds of created CTVars in STM Success output 2015-02-10 11:16:36 +00:00
Michael Walker
f7b7539445 Remove logic duplication in Deterministic.Internal 2015-02-10 02:09:51 +00:00
Michael Walker
a54925df4b Move CVar IDs out of the Ref in Deterministic 2015-02-10 01:20:04 +00:00
Michael Walker
1cc5ade782 Reimplement CVar blocking in the same way as CTVar blocking 2015-02-09 23:43:18 +00:00
Michael Walker
7f26aa9654 Implement STM in Deterministic 2015-02-09 23:22:06 +00:00
Michael Walker
36e83e72f8 Add MonadSTM instances for Conc and ConcIO 2015-02-09 22:31:05 +00:00
Michael Walker
9b5e010d90 Implement a STM runner. 2015-02-09 22:04:28 +00:00
Michael Walker
7aceb6a6f9 Implement an atomic-for-testing-purposes function.
This adds a new `MonadConc` primitive, `_concNoTest`, which is (for
all non-test implementations) the identity function. For test
implementations, it is understood as "this action is completely safe
under all schedules, so just execute it all at once and don't consider
any internal interleavings." It is not required to be deterministic,
merely to never fail.

Actions annotated with `_concNoTest` will show up as one step in the
trace, and new `Failure` and `ThreadAction` values have been added.
2015-02-06 16:18:25 +00:00
Michael Walker
c20db31561 Include reason for failure in Deterministic result 2015-02-06 16:04:59 +00:00
Michael Walker
9a0cefd85c Tidy up Deterministic step functions 2015-02-06 11:26:04 +00:00
Michael Walker
a15a109b60 Give CVars IDs 2015-02-06 11:08:52 +00:00
Michael Walker
e8a9e25fdb Remove logic duplication in Deterministic.Internal 2015-02-05 15:50:05 +00:00
Michael Walker
4c0f131942 Better dupe elimination 2015-02-04 16:51:50 +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
0b26358851 Shrink shrinking code 2015-02-02 20:49:33 +00:00
Michael Walker
4f6eade3bb Make resEq more flexible 2015-02-02 16:11:37 +00:00
Michael Walker
242b661185 Filter out duplicate failures in runTest 2015-02-01 21:55:25 +00:00
Michael Walker
970df85ede Drop redundant $ 2015-02-01 21:55:09 +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