mirror of
https://github.com/barrucadu/dejafu.git
synced 2024-12-24 05:55:18 +03:00
8b28633f20
Shrinking attempts to find a "maximally simple" trace which exhibits the same bug as the original. Typically, this means that the results are equal. Shrinking is implemented in terms of recursively trying to find the simplest variant of the original trace, where simplest in particular means: 1. A trace with fewer pre-emptions is simpler. 2. A trace with fewer non-pre-emptive context switches is simpler. 3. A trace lexicographically smaller is simpler. These three criteria are applied in that order in order to determine which the simplest trace out of a collection is. For test output, there is a final set of simplification done at the end. Shrinking attempts to reduce individual traces to their simplest variant, which can result in multiple test failures having the same shrunk trace. Thus, the test runner then filters out duplicate failures by only keeping the simplest trace for a given result.
81 lines
3.0 KiB
Plaintext
Executable File
81 lines
3.0 KiB
Plaintext
Executable File
-- Initial monad-conc.cabal generated by cabal init. For further
|
|
-- documentation, see http://haskell.org/cabal/users-guide/
|
|
|
|
name: monad-conc
|
|
version: 0.0.0.0
|
|
synopsis: Overloadable primitives for potentially non-deterministic concurrency.
|
|
|
|
description:
|
|
Concurrency is nice, deadlocks and race conditions not so much. The
|
|
@Par@ monad family, as defined in
|
|
<https://hackage.haskell.org/package/abstract-par/docs/Control-Monad-Par-Class.html abstract-par>
|
|
provides deterministic parallelism, but sometimes we can tolerate a
|
|
bit of nondeterminism.
|
|
.
|
|
This package provides a family of monads for potentially
|
|
nondeterministic concurrency, with an interface very much in the
|
|
spirit of @Par@, but slightly more relaxed. Specifically, @Conc@'s
|
|
@IVar@ equivalent, @CVar@s, can be written to multiple times.
|
|
.
|
|
== @Conc@ monads with 'IO':
|
|
.
|
|
The intention of the @Conc@ monads is to provide concurrency where
|
|
any apparent nondeterminism arises purely from the scheduling
|
|
behaviour. To put it another way, a given @Conc@ computation,
|
|
parametrised with a fixed set of scheduling decisions, is
|
|
deterministic. This assumption is used by the testing functionality
|
|
provided by Control.Monad.Conc.SCT.
|
|
.
|
|
Whilst this assumption may not hold in general when 'IO' is
|
|
involved, you should strive to produce test cases where it does.
|
|
.
|
|
See the <https://github.com/barrucadu/monad-conc README> for more
|
|
details.
|
|
|
|
homepage: https://github.com/barrucadu/monad-conc
|
|
license: WTFPL
|
|
license-file: LICENSE
|
|
author: Michael Walker
|
|
maintainer: mike@barrucadu.co.uk
|
|
-- copyright:
|
|
category: Concurrency
|
|
build-type: Simple
|
|
-- extra-source-files:
|
|
cabal-version: >=1.10
|
|
|
|
library
|
|
exposed-modules: Control.Monad.Conc.Class
|
|
|
|
, Control.Concurrent.CVar
|
|
, Control.Concurrent.CVar.Strict
|
|
|
|
, Control.Monad.Conc.Fixed
|
|
, Control.Monad.Conc.Fixed.IO
|
|
, Control.Monad.Conc.Fixed.Schedulers
|
|
, Control.Monad.Conc.SCT
|
|
, Control.Monad.Conc.SCT.Shrink
|
|
, Control.Monad.Conc.SCT.Tests
|
|
|
|
other-modules: Control.Monad.Conc.Fixed.Internal
|
|
, Control.Monad.Conc.SCT.Bounding
|
|
, Control.Monad.Conc.SCT.Internal
|
|
, Data.List.Extra
|
|
-- other-extensions:
|
|
build-depends: base >=4.6 && <5
|
|
, containers
|
|
, deepseq
|
|
, monad-loops
|
|
, mtl
|
|
, random
|
|
, transformers
|
|
-- hs-source-dirs:
|
|
default-language: Haskell2010
|
|
ghc-options: -Wall
|
|
|
|
test-suite tests
|
|
hs-source-dirs: tests
|
|
type: exitcode-stdio-1.0
|
|
main-is: Tests.hs
|
|
build-depends: monad-conc, base
|
|
default-language: Haskell2010
|