quickcheck-state-machine-0.4.2: Test monadic programs using state machine based models

Copyright(C) 2017 ATS Advanced Telematic Systems GmbH
LicenseBSD-style (see the file LICENSE)
MaintainerStevan Andjelkovic <stevan.andjelkovic@here.com>
Stabilityprovisional
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Test.StateMachine.Types.History

Description

This module contains the notion of a history of an execution of a (parallel) program.

Synopsis

Documentation

newtype History cmd resp Source #

Constructors

History 

Fields

Instances
(Eq (cmd Concrete), Eq (resp Concrete)) => Eq (History cmd resp) Source # 
Instance details

Defined in Test.StateMachine.Types.History

Methods

(==) :: History cmd resp -> History cmd resp -> Bool #

(/=) :: History cmd resp -> History cmd resp -> Bool #

(Show (cmd Concrete), Show (resp Concrete)) => Show (History cmd resp) Source # 
Instance details

Defined in Test.StateMachine.Types.History

Methods

showsPrec :: Int -> History cmd resp -> ShowS #

show :: History cmd resp -> String #

showList :: [History cmd resp] -> ShowS #

type History' cmd resp = [(Pid, HistoryEvent cmd resp)] Source #

newtype Pid Source #

Constructors

Pid 

Fields

Instances
Eq Pid Source # 
Instance details

Defined in Test.StateMachine.Types.History

Methods

(==) :: Pid -> Pid -> Bool #

(/=) :: Pid -> Pid -> Bool #

Show Pid Source # 
Instance details

Defined in Test.StateMachine.Types.History

Methods

showsPrec :: Int -> Pid -> ShowS #

show :: Pid -> String #

showList :: [Pid] -> ShowS #

data HistoryEvent cmd resp Source #

Constructors

Invocation !(cmd Concrete) !(Set Var) 
Response !(resp Concrete) 
Instances
(Eq (cmd Concrete), Eq (resp Concrete)) => Eq (HistoryEvent cmd resp) Source # 
Instance details

Defined in Test.StateMachine.Types.History

Methods

(==) :: HistoryEvent cmd resp -> HistoryEvent cmd resp -> Bool #

(/=) :: HistoryEvent cmd resp -> HistoryEvent cmd resp -> Bool #

(Show (cmd Concrete), Show (resp Concrete)) => Show (HistoryEvent cmd resp) Source # 
Instance details

Defined in Test.StateMachine.Types.History

Methods

showsPrec :: Int -> HistoryEvent cmd resp -> ShowS #

show :: HistoryEvent cmd resp -> String #

showList :: [HistoryEvent cmd resp] -> ShowS #

data Operation cmd resp Source #

An operation packs up an invocation event with its corresponding response event.

Constructors

Operation (cmd Concrete) (resp Concrete) Pid 

makeOperations :: History' cmd resp -> [Operation cmd resp] Source #

interleavings :: [(Pid, HistoryEvent cmd resp)] -> Forest (Operation cmd resp) Source #

Given a history, return all possible interleavings of invocations and corresponding response events.