fsmActions-0.2.0: Finite state machines and FSM actionsSource codeContentsIndex
Well-formedness checks for finite state machines.
data WellFormed sy
= BadLengths [(sy, Int)]
| BadActions [(sy, Action)]
| Disconnected [[State]]
| WellFormed
isWellFormed :: Ord sy => FSM sy -> WellFormed sy
data WellFormed sy Source
An FSM is well-formed if all its actions are the same length, none of its actions contain destinations which are out of range, and it is not disjoint.
BadLengths [(sy, Int)]Lengths of Actions in the FSM don't all match. Carries a sorted list of (symbol, Action length) pairs, one for every symbol in the alphabet of the FSM.
BadActions [(sy, Action)]Some Actions contain out-of-range (negative or too-high) destinations. Carries a sorted list of all such actions and their corresponding symbols.
Disconnected [[State]]The FSM is disconnected, i.e. not even weakly-connected. Carries a list of its weakly-connected components (each is a list of States).
show/hide Instances
Eq sy => Eq (WellFormed sy)
Show sy => Show (WellFormed sy)
isWellFormed :: Ord sy => FSM sy -> WellFormed sySource
Check if an FSM is well-formed or not.
Produced by Haddock version 2.4.2