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 HaskellSafe
LanguageHaskell2010

Test.StateMachine.Logic

Description

This module defines a predicate logic-like language and its counterexample semantics.

Synopsis

Documentation

data LogicPredicate Source #

Constructors

(Eq a, Show a) => a :== a 
(Eq a, Show a) => a :/= a 
(Ord a, Show a) => a :< a 
(Ord a, Show a) => a :<= a 
(Ord a, Show a) => a :> a 
(Ord a, Show a) => a :>= a 
(Foldable t, Eq a, Show a, Show (t a)) => Member a (t a) 
(Foldable t, Eq a, Show a, Show (t a)) => NotMember a (t a) 

data Value Source #

Constructors

VFalse Counterexample 
VTrue 
Instances
Show Value Source # 
Instance details

Defined in Test.StateMachine.Logic

Methods

showsPrec :: Int -> Value -> ShowS #

show :: Value -> String #

showList :: [Value] -> ShowS #

gatherAnnotations :: Logic -> [String] Source #

Gather user annotations of a true logic expression.

>>> gatherAnnotations (Top .// "top")
["top"]
>>> gatherAnnotations ((Bot .// "bot") .|| (Top .// "top"))
["top"]
>>> gatherAnnotations (Top .// "top1" .&& Top .// "top2")
["top1","top2"]
>>> gatherAnnotations (Bot .// "bot" .&& Top .// "top")
[]
>>> gatherAnnotations (forall [1,2,3] (\i -> 0 .< i .// "positive"))
["positive","positive","positive"]
>>> gatherAnnotations (forall [0,1,2,3] (\i -> 0 .< i .// "positive"))
[]
>>> gatherAnnotations (exists [1,2,3] (\i -> 0 .< i .// "positive"))
["positive"]

(.==) :: (Eq a, Show a) => a -> a -> Logic infix 5 Source #

(./=) :: (Eq a, Show a) => a -> a -> Logic infix 5 Source #

(.<) :: (Ord a, Show a) => a -> a -> Logic infix 5 Source #

(.<=) :: (Ord a, Show a) => a -> a -> Logic infix 5 Source #

(.>) :: (Ord a, Show a) => a -> a -> Logic infix 5 Source #

(.>=) :: (Ord a, Show a) => a -> a -> Logic infix 5 Source #

member :: (Foldable t, Eq a, Show a, Show (t a)) => a -> t a -> Logic infix 8 Source #

notMember :: (Foldable t, Eq a, Show a, Show (t a)) => a -> t a -> Logic infix 8 Source #

(.//) :: Logic -> String -> Logic infixl 4 Source #

(.&&) :: Logic -> Logic -> Logic infixr 3 Source #

(.||) :: Logic -> Logic -> Logic infixr 2 Source #

(.=>) :: Logic -> Logic -> Logic infixr 1 Source #

forall :: Show a => [a] -> (a -> Logic) -> Logic Source #

exists :: Show a => [a] -> (a -> Logic) -> Logic Source #