model checking for (subset of) concurrent Haskell?

For model checking concurrent and distributed imperative programs, there's the Promela language, and the Spin model checker ( http://spinroot.com ) than can explore/enumerate a finite state space of a system and decide validity of LTL formulae. Is there something similar for Haskell models of concurrency? Ideally, some subset of Haskell (containing enough of Control.Concurrent.*) as an alternative for Promela. 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. somewhat related: this project is about a verified model checker: https://cava.in.tum.de/ (ML code generated from Isabelle) but my interest is in model-checking concurrent programs in functional notation. - J.W.

Hi Johannes, I released an initial version of a tool for the systematic testing of concurrent Haskell programs a couple of months ago[1]. 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 checker. I presented a paper on it at the Haskell Symposium this year[2][3], 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 reasonably soon.
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[4] 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[5] and a class for STM[6]. 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[7], and I'm writing up a technical report on it (draft online[8]). [1] https://hackage.haskell.org/package/dejafu [2] http://www.barrucadu.co.uk/publications/dejafu-hs15.pdf [3] https://youtu.be/jQCDa6WoFeY?list=PLnqUlCo055hV5dPC-4VWeXzhI8ooeTsVy [4] http://barrucadu.github.io/dejafu/Test-DejaFu.html [5] http://barrucadu.github.io/dejafu/Control-Monad-Conc-Class.html [6] http://barrucadu.github.io/dejafu/Control-Monad-STM-Class.html [7] https://github.com/barrucadu/dejafu [8] http://misc.barrucadu.co.uk/pub/techreport.pdf -- Michael Walker (http://www.barrucadu.co.uk)

Please let me know what you find! I may very well be putting some effort into an ltl Haskell model checker for work in the near future myself. On Monday, November 16, 2015, Johannes Waldmann < johannes.waldmann@htwk-leipzig.de> wrote:
For model checking concurrent and distributed imperative programs, there's the Promela language, and the Spin model checker ( http://spinroot.com ) than can explore/enumerate a finite state space of a system and decide validity of LTL formulae.
Is there something similar for Haskell models of concurrency? Ideally, some subset of Haskell (containing enough of Control.Concurrent.*) as an alternative for Promela.
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.
somewhat related: this project is about a verified model checker: https://cava.in.tum.de/ (ML code generated from Isabelle) but my interest is in model-checking concurrent programs in functional notation.
- J.W. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org javascript:; http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
participants (3)
-
Carter Schonwald
-
Johannes Waldmann
-
Michael Walker