Commit Graph

6 Commits

Author SHA1 Message Date
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
4c0f131942 Better dupe elimination 2015-02-04 16:51:50 +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
304df27a35 Add a simple autocheck function, to look for deadlocks and multiple results 2015-01-30 16:09:32 +00:00
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
69fdd561d9 Factor out the utility list functions to a separate module 2015-01-27 13:54:46 +00:00