dejafu: Overloadable primitives for testable, potentially non-deterministic, concurrency.

[ concurrency, library, mit ] [ Propose Tags ]

[Déjà Fu is] A martial art in which the user's limbs move in time as well as space, […] It is best described as "the feeling that you have been kicked in the head this way before" -- Terry Pratchett, Thief of Time

Concurrency is nice, deadlocks and race conditions not so much. The Par monad family, as defined in abstract-par provides deterministic parallelism, but sometimes we can tolerate a bit of nondeterminism.

This package provides a class of monads for potentially nondeterministic concurrency, with an interface in the spirit of GHC's normal concurrency abstraction.

MonadConc with IO:

The intention of the MonadConc class is to provide concurrency where any apparent nondeterminism arises purely from the scheduling behaviour. To put it another way, a given computation, parametrised with a fixed set of scheduling decisions, is deterministic. This assumption is used by the testing functionality provided by Test.DejaFu.

Whilst this assumption may not hold in general when IO is involved, you should strive to produce test cases where it does.

Memory Model

The testing functionality supports a few different memory models, for computations which use non-synchronised CRef operations. The supported models are:

If a testing function does not take the memory model as a parameter, it uses TSO.

See the README for more details.

Versions [faq] 0.1.0.0, 0.2.0.0, 0.3.0.0, 0.3.1.0, 0.3.1.1, 0.3.2.0, 0.3.2.1, 0.4.0.0, 0.5.0.0, 0.5.0.2, 0.5.1.0, 0.5.1.1, 0.5.1.2, 0.5.1.3, 0.6.0.0, 0.7.0.0, 0.7.0.1, 0.7.0.2, 0.7.1.0, 0.7.1.1, 0.7.1.2, 0.7.1.3, 0.7.2.0, 0.7.3.0, 0.8.0.0, 0.9.0.0, 0.9.0.1, 0.9.0.2, 0.9.0.3, 0.9.1.0, 0.9.1.1, 0.9.1.2, 1.0.0.0, 1.0.0.1, 1.0.0.2, 1.1.0.0, 1.1.0.1, 1.1.0.2, 1.2.0.0, 1.3.0.0, 1.3.0.1, 1.3.0.2, 1.3.0.3, 1.3.1.0, 1.3.2.0, 1.4.0.0, 1.5.0.0, 1.5.1.0, 1.6.0.0, 1.7.0.0, 1.8.0.0, 1.9.0.0, 1.9.1.0, 1.10.0.0, 1.10.1.0, 1.11.0.0, 1.11.0.1, 1.11.0.2, 1.11.0.3, 1.11.0.4, 1.11.0.5, 1.12.0.0, 2.0.0.0, 2.0.0.1, 2.1.0.0, 2.1.0.1 (info)
Dependencies atomic-primops (<0.9), base (>=4.7 && <4.9), containers (==0.5.*), deepseq (>=1.1 && <1.5), exceptions (>=0.7 && <0.9), monad-loops (<0.5), mtl (<2.3), random (<1.2), stm (<2.5), transformers (<0.6) [details]
License MIT
Author Michael Walker
Maintainer mike@barrucadu.co.uk
Revised Revision 1 made by HerbertValerioRiedel at Tue Nov 29 22:14:33 UTC 2016
Category Concurrency
Home page https://github.com/barrucadu/dejafu
Source repo head: git clone https://github.com/barrucadu/dejafu.git
this: git clone https://github.com/barrucadu/dejafu.git(tag 0.1.0.0)
Uploaded by barrucadu at Tue Dec 1 05:31:46 UTC 2015
Distributions LTSHaskell:1.11.0.5, NixOS:2.1.0.1, Stackage:2.1.0.0
Downloads 22122 total (2125 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs not available [build log]
Last success reported on 2015-12-01 [all 3 reports]

Modules

  • Control
    • Concurrent
      • Control.Concurrent.CVar
        • Control.Concurrent.CVar.Strict
      • STM
        • Control.Concurrent.STM.CTMVar
        • Control.Concurrent.STM.CTVar
    • Monad
      • Conc
        • Control.Monad.Conc.Class
      • STM
        • Control.Monad.STM.Class
  • Data
    • List
      • Data.List.Extra
  • Test
    • Test.DejaFu
      • Test.DejaFu.Deterministic
        • Test.DejaFu.Deterministic.Internal
          • Test.DejaFu.Deterministic.Internal.Common
          • Test.DejaFu.Deterministic.Internal.Memory
          • Test.DejaFu.Deterministic.Internal.Threading
        • Test.DejaFu.Deterministic.Schedule
      • Test.DejaFu.Internal
      • Test.DejaFu.SCT
        • Test.DejaFu.SCT.Internal
      • Test.DejaFu.STM
        • Test.DejaFu.STM.Internal

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees