Commit Graph

22 Commits

Author SHA1 Message Date
Michael Walker
8b28633f20 Implement shrinking, and shrink test output.
Shrinking attempts to find a "maximally simple" trace which
exhibits the same bug as the original. Typically, this means that
the results are equal. Shrinking is implemented in terms of
recursively trying to find the simplest variant of the original
trace, where simplest in particular means:

1. A trace with fewer pre-emptions is simpler.
2. A trace with fewer non-pre-emptive context switches is simpler.
3. A trace lexicographically smaller is simpler.

These three criteria are applied in that order in order to determine
which the simplest trace out of a collection is.

For test output, there is a final set of simplification done at the end.
Shrinking attempts to reduce individual traces to their simplest variant,
which can result in multiple test failures having the same shrunk trace.
Thus, the test runner then filters out duplicate failures by only keeping
the simplest trace for a given result.
2015-01-30 15:31:40 +00:00
Michael Walker
765f8d0bd5 Move CVars into Control.Concurrent 2015-01-28 17:59:17 +00:00
Michael Walker
531b9fd05b Add a module for strict CVars 2015-01-28 17:46:04 +00:00
Michael Walker
69fdd561d9 Factor out the utility list functions to a separate module 2015-01-27 13:54:46 +00:00
Michael Walker
bb8b85d9f3 Implement delay bounding 2015-01-27 11:45:59 +00:00
Michael Walker
cc40353001 Tidy up code a bit, also drop monad-st 2015-01-27 11:45:47 +00:00
Michael Walker
03a61057b5 Pull in monad-loops for unfoldrM 2015-01-24 10:57:05 +00:00
Michael Walker
aa921a0423 Add NFData instances for things, and fix a few space leaks in SCT 2015-01-19 11:50:43 +00:00
Michael Walker
886da7195e Provide utilities for writing SCT test cases 2015-01-12 17:27:41 +00:00
Michael Walker
232c1a852f Remove duplication in cabal build-depends 2015-01-12 16:32:09 +00:00
Michael Walker
0f1675070b Update documentation 2015-01-12 14:24:12 +00:00
Michael Walker
981169c25f Vastly improve PB runner 2015-01-09 02:35:28 +00:00
Michael Walker
7e6fcd4a39 Swap main Fixed implementation from IO to ST. 2014-12-27 12:26:40 +00:00
Michael Walker
d215306911 Implement a Fixed variant using ST to get a pure result.
Following discussion on Twitter, https://twitter.com/barrucadu/status/548496893127712768
2014-12-27 12:20:45 +00:00
Michael Walker
9f5b04eb63 Add a little test framework, and a test case 2014-12-23 15:20:11 +00:00
Michael Walker
554fa84ec7 Enable -Wall and fix all warnings 2014-12-21 16:34:55 +00:00
Michael Walker
8b0f2763d3 Add some helpful CVar combinators 2014-12-21 09:38:25 +00:00
Michael Walker
82e9241686 Add a simple runner which gathers results and schedulings from multiple runs 2014-12-20 11:03:49 +00:00
Michael Walker
982534f572 Bump base upper bound (silly Ubuntu) 2014-12-19 21:30:38 +00:00
Michael Walker
bc7607ad24 Implement a simple random scheduler 2014-12-19 07:09:26 +00:00
Michael Walker
83fb25a6d7 Add a ConcFuture/ConcCVar which is parametrised by a fixed scheduler. 2014-12-19 06:45:50 +00:00
Michael Walker
8ab914c7d5 Initial commit: a class for monads providing concurrency. 2014-12-18 11:03:17 +00:00