dejafu/dejafu-tests/lib
Michael Walker cb118e4f41 Use the post-withSetup DepState
It's wrong to use initialDepState when there is a setup action, as the
action could end with a DepState which is not the same as the initial
one.  Here's an example of it going wrong:

    > :{
    resultsSet defaultWay defaultMemType $ do
      v <- newMVar ()
      fork (takeMVar v)
      readMVar v
    :}
    fromList [Left Deadlock,Right ()]

    > :{
    resultsSet defaultWay defaultMemType $
      withSetup (newMVar ()) $ \v -> do
        fork (takeMVar v)
        readMVar v
    :}
    fromList [Right ()]

This PR pushes responsibility for the DepState into the Context, and
the DepState is passed to all schedulers.  That means it's been
promoted from an internal type to a user-facing one, so I gave it the
more generic name "ConcurrencyState".  Furthermore, the snapshotted
DepState is passed to all the DPOR functions, and the trace
simplification functions.

initialDepState is now only used:

- in Conc.Internal to initialise a new context
- in SCT.Internal when there is no snapshot
2019-02-12 22:20:34 +00:00
..
Examples Uncomment AutoUpdate deadlock test 2019-02-12 18:13:42 +00:00
Integration Use the post-withSetup DepState 2019-02-12 22:20:34 +00:00
Test/Tasty Inline tasty-hedgehog dep into dejafu-tests 2018-03-24 23:14:04 +00:00
Unit Use the post-withSetup DepState 2019-02-12 22:20:34 +00:00
Common.hs Use the post-withSetup DepState 2019-02-12 22:20:34 +00:00
Examples.hs Replace QuickCheck tests with Hedgehog ones 2018-02-16 20:04:54 +00:00
Integration.hs Add tests for early-exit 2018-03-05 12:37:21 +00:00
QSemN.hs Split dejafu-tests into lib + binary 2018-02-16 19:14:46 +00:00
Unit.hs Add predicate unit tests 2018-06-10 22:30:02 +01:00