mirror of
https://github.com/barrucadu/dejafu.git
synced 2024-11-23 06:02:52 +03:00
cb118e4f41
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 |
||
---|---|---|
.. | ||
Examples | ||
Integration | ||
Test/Tasty | ||
Unit | ||
Common.hs | ||
Examples.hs | ||
Integration.hs | ||
QSemN.hs | ||
Unit.hs |