[Haskell-cafe] model checking for (subset of) concurrent Haskell?
mike at barrucadu.co.uk
Mon Nov 16 12:33:12 UTC 2015
I released an initial version of a tool for the systematic testing of
concurrent Haskell programs a couple of months ago. I've never been
quite certain where the boundary between model checking and testing
is, but I think it's fair to say that what I've got is a bounded model
I presented a paper on it at the Haskell Symposium this year,
but since then it has been improved significantly, both in terms of
the concurrency features supported, and performance. The version on
Hackage is very outdated now, but I hope to get a new release out
> Is there something similar for Haskell models of concurrency?
> Ideally, some subset of Haskell (containing enough of
> Control.Concurrent.*) as an alternative for Promela.
I didn't go for LTL, rather a more unit test-like approach where
you examine the final output of the program.
> It should even be possible to put the model checking
> in an alternative implementation of respective monad
> (STM, IO for MVars) so the whole thing is an embedded DSL.
My approach is based on a typeclass abstraction, with a class for
concurrency and a class for STM. Naturally, this means you can
just write some Haskell polymorphic in the monad but constrained by
the class, and then either run it "for real" using IO or STM, or test
it using the testing instances.
The current developmental version is on GitHub, and I'm writing up
a technical report on it (draft online).
Michael Walker (http://www.barrucadu.co.uk)
More information about the Haskell-Cafe