quickcheck-state-machine-0.3.1: 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@advancedtelematic.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 act err Source #

A history is a trace of a program execution.

Constructors

History 

Fields

Instances

Monoid (History act err) Source # 

Methods

mempty :: History act err #

mappend :: History act err -> History act err -> History act err #

mconcat :: [History act err] -> History act err #

type History' act err = [HistoryEvent (UntypedConcrete act) err] Source #

A trace is a list of events.

ppHistory :: forall model act err. Show (model Concrete) => Show err => model Concrete -> Transition' model act err -> History act err -> String Source #

Pretty print a history.

data HistoryEvent act err Source #

An event is either an invocation or a response.

getProcessIdEvent :: HistoryEvent act err -> Pid Source #

Get the process id of an event.

data UntypedConcrete (act :: (* -> *) -> * -> *) where Source #

Untyped concrete actions.

Constructors

UntypedConcrete :: (Show resp, Typeable resp) => act Concrete resp -> UntypedConcrete act 

data Operation act err Source #

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

Constructors

Typeable resp => Operation (act Concrete resp) String (Result err resp) String Pid 

linearTree :: History' act err -> [Tree (Operation act err)] Source #

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