Commit Graph

24 Commits

Author SHA1 Message Date
Michael Walker
a2b9684fb2 Bump stack.yaml to GHC 8.4 2018-07-09 22:49:50 +01:00
Michael Walker
e0304f1b5a Use LTS-10 in tooling (travis & stack) 2017-12-23 13:12:30 +00:00
Michael Walker
94dfe4b61a Update leancheck dependency 2017-12-12 13:50:35 +00:00
Michael Walker
5c3e82403b Simplify travis set-up 2017-09-16 20:31:31 +01:00
Michael Walker
3af7d4206d Implement refinement property testing
This lets dejafu test CoCo-style properties, and introduces a
dependency on [leancheck][].

For example, consider this statement about MVars: "using readMVar is
better than a takeMVar followed by a putMVar because the former is
atomic but the latter is not."

This module can test properties like that:

```
sig e = Sig
  { initialise = maybe newEmptyMVar newMVar
  , observe    = \v _ -> tryReadMVar v
  , interfere  = \v s -> tryTakeMVar v >>
                         maybe (pure ()) (void . tryPutMVar v) s
  , expr = e
  }

> check $ sig (void . readMVar) `equivalentTo`
          sig (\v -> takeMVar v >>= putMVar v)
*** Failure: (seed Just ())
    left:  [(Nothing,Just ())]
    right: [(Nothing,Just ()),(Just Deadlock,Just ())]
```

The two expressions are not equivalent, and we get given the
counterexample!

In addition to "equivalentTo", there is also "refines" and
"strictlyRefines" (and negated variants)

[leancheck]: https://hackage.haskell.org/package/leancheck
2017-06-07 14:18:50 +01:00
Michael Walker
44c31f879c Update test-framework-hunit git location 2017-05-31 15:08:06 +01:00
Michael Walker
80d00224c4 Use the https clone path for test-framework-hunit. 2017-03-20 18:54:24 +00:00
Michael Walker
743ae2e233 Add HUnit-1.6 support to hunit-dejafu. 2017-03-20 18:42:51 +00:00
Michael Walker
463efd3f8d Merge "async-dejafu" into "concurrency" + bump versions.
Closes #73.
2017-03-03 22:06:09 +00:00
Michael Walker
f684320fc7 Merge dpor into dejafu. 2016-12-05 07:35:56 +00:00
Michael Walker
97a06c7094 Bump default GHC version to 8 2016-07-21 19:33:49 +01:00
Michael Walker
2f0f51ceb6 Split concurrency modules into a separate package.
The new 'concurrency' package is starting at version 1.0.0.0 because the
API is already very mature (copied from base).

This breaks the dejafu-0.2 compatibility of async-dejafu.

Closes #51.
2016-07-21 19:33:49 +01:00
Michael Walker
552894d0bb Split DPOR packages into separate library 2016-04-03 05:34:01 +01:00
Michael Walker
50e2868cc2 Drop support for GHC<7.10.
This also drops the use of CPP to avoid import warnings, which was a
horrible practice I should never have adopted anyway.
2016-03-10 22:35:40 +00:00
Michael Walker
00c5b22262 Bump to lts-4 2016-01-30 19:32:47 +00:00
Michael Walker
37a5886c83 Make a separate package for the test suite. Closes #31. 2015-12-01 05:07:56 +00:00
Michael Walker
d1643bb360 Enable building with Stackage lts-2 2015-11-17 19:15:56 +00:00
Michael Walker
59102efd59 Initial version of async-dejafu 2015-10-25 16:17:41 +00:00
Michael Walker
a337b872ab Add Tasty integration 2015-10-08 21:50:52 +01:00
Michael Walker
3c9a3f2ec7 Initial implementation of HUnit integration.
Note: this BREAKS `cabal/stack test` for dejafu!

See dejafu/README.markdown for the work-around.
2015-10-08 12:05:59 +01:00
Michael Walker
121a59b59d Stick everything in a dejafu subdirectory 2015-10-05 16:44:14 +01:00
Michael Walker
046847c714 Upgrade to Stackage LTS 3.0 2015-08-15 23:45:22 +01:00
Michael Walker
79ed016dda Build with LTS by default 2015-08-01 15:20:20 +01:00
Michael Walker
a8cc4dcab5 Stackify 2015-07-19 04:39:39 +01:00