quickcheck-state-machine-0.7.0: 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@strath.ac.uk>
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 #

Ord Pid Source # 
Instance details

Defined in Test.StateMachine.Types.History

Methods

compare :: Pid -> Pid -> Ordering #

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

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

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

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

max :: Pid -> Pid -> Pid #

min :: Pid -> Pid -> Pid #

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) 
Exception !String 
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 
Crash (cmd Concrete) String Pid 
Instances
(Show (cmd Concrete), Show (resp Concrete)) => Show (Operation cmd resp) Source # 
Instance details

Defined in Test.StateMachine.Types.History

Methods

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

show :: Operation cmd resp -> String #

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

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

Given a sequential history, group invocation and response events into operations.

interleavings :: History' cmd resp -> Forest (Operation cmd resp) Source #

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

operationsPath :: Forest (Operation cmd resp) -> [Operation cmd resp] Source #

completeHistory :: (cmd Concrete -> resp Concrete) -> History cmd resp -> History cmd resp Source #