dejafu-2.4.0.6: A library for unit-testing concurrent programs.
Copyright(c) 2015--2019 Michael Walker
LicenseMIT
MaintainerMichael Walker <mike@barrucadu.co.uk>
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.DejaFu.SCT

Description

Systematic testing for concurrent computations.

Synopsis

Running Concurrent Programs

runSCT Source #

Arguments

:: MonadDejaFu n 
=> Way

How to run the concurrent program.

-> MemType

The memory model to use for non-synchronised IORef operations.

-> Program pty n a

The computation to run many times.

-> n [(Either Condition a, Trace)] 

Explore possible executions of a concurrent program according to the given Way.

The exact executions tried, and the order in which results are found, is unspecified and may change between releases.

Since: 2.1.0.0

runSCT' Source #

Arguments

:: (MonadDejaFu n, NFData a) 
=> Way

How to run the concurrent program.

-> MemType

The memory model to use for non-synchronised IORef operations.

-> Program pty n a

The computation to run many times.

-> n [(Either Condition a, Trace)] 

A strict variant of runSCT.

Demanding the result of this will force it to normal form, which may be more efficient in some situations.

The exact executions tried, and the order in which results are found, is unspecified and may change between releases.

Since: 2.1.0.0

resultsSet Source #

Arguments

:: (MonadDejaFu n, Ord a) 
=> Way

How to run the concurrent program.

-> MemType

The memory model to use for non-synchronised IORef operations.

-> Program pty n a

The computation to run many times.

-> n (Set (Either Condition a)) 

Return the set of results of a concurrent program.

Since: 2.1.0.0

resultsSet' Source #

Arguments

:: (MonadDejaFu n, Ord a, NFData a) 
=> Way

How to run the concurrent program.

-> MemType

The memory model to use for non-synchronised IORef operations.

-> Program pty n a

The computation to run many times.

-> n (Set (Either Condition a)) 

A strict variant of resultsSet.

Demanding the result of this will force it to normal form, which may be more efficient in some situations.

Since: 2.1.0.0

Configuration

runSCTWithSettings Source #

Arguments

:: MonadDejaFu n 
=> Settings n a

The SCT settings.

-> Program pty n a

The computation to run many times.

-> n [(Either Condition a, Trace)] 

A variant of runSCT which takes a Settings record.

The exact executions tried, and the order in which results are found, is unspecified and may change between releases.

Since: 2.1.0.0

runSCTWithSettings' Source #

Arguments

:: (MonadDejaFu n, NFData a) 
=> Settings n a

The SCT settings.

-> Program pty n a

The computation to run many times.

-> n [(Either Condition a, Trace)] 

A strict variant of runSCTWithSettings.

Demanding the result of this will force it to normal form, which may be more efficient in some situations.

The exact executions tried, and the order in which results are found, is unspecified and may change between releases.

Since: 2.1.0.0

resultsSetWithSettings Source #

Arguments

:: (MonadDejaFu n, Ord a) 
=> Settings n a

The SCT settings.

-> Program pty n a

The computation to run many times.

-> n (Set (Either Condition a)) 

A variant of resultsSet which takes a Settings record.

Since: 2.1.0.0

resultsSetWithSettings' Source #

Arguments

:: (MonadDejaFu n, Ord a, NFData a) 
=> Settings n a

The SCT settings.

-> Program pty n a

The computation to run many times.

-> n (Set (Either Condition a)) 

A strict variant of resultsSetWithSettings.

Demanding the result of this will force it to normal form, which may be more efficient in some situations.

Since: 2.1.0.0