[Haskell-cafe] Informal modelling and simulation of protocols

Michael Walker mike at barrucadu.co.uk
Mon Mar 11 21:31:41 UTC 2019


> On Tue, 5 Mar 2019 at 23:11, Will Yager <will.yager at gmail.com> wrote:
> >
> > http://hackage.haskell.org/package/dejafu might do what you want
> Thanks for the suggestion, that does look useful.
> From a quick look at the documentation... am I right in thinking that
> this test framework only covers concurrency when you're directly using
> IOVars and STM?  Any concurrency that might involve other primitives,
> or IOVar/STM uses in libraries, wouldn't be testable?  Unless the
> primitives/library had also been written to use the dejafu io classes
> and monads of course... which might be a good idea in and of itself.

Yes, that's the case.  It's a bit of an unfortunate limitation but I don't
currently have a way around it.

You may find it interesting to look at adjoint.io's libraft, which uses
dejafu for some tests:

The way they do it is by writing their library in terms of some "MonadRaft"
classes, and give a concrete implementation of those classes in terms of
dejafu's ConcIO monad for testing.

Michael Walker (http://www.barrucadu.co.uk)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20190311/df5aad4b/attachment.html>

More information about the Haskell-Cafe mailing list