fsmActions-0.4.1: Finite state machines and FSM actionsSource codeContentsIndex
Data.FsmActions.Graph
Contents
FGL graph operations.
Dot and GML format output.
Input.
Description

Generating, interpreting, and drawing graphs of FSMs.

Includes:

Synopsis
data SelfLoops
= Keep
| Trim
fsmToFGL :: FSM sy -> SelfLoops -> Gr () sy
fglDot :: (Ord b, CleanShow b, Graph gr) => gr a b -> DotGraph Int
strongCCs :: Eq sy => FSM sy -> [[State]]
weakCCs :: Eq sy => FSM sy -> [[State]]
class Show a => CleanShow a where
cleanShow :: a -> String
fsmToDot :: (Ord sy, CleanShow sy) => FSM sy -> DotGraph Int
fsmToGML :: CleanShow sy => FSM sy -> Doc
fglToFsm :: (Graph gr, Ord sy, Show sy) => gr a sy -> ReadFsmMonad (FSM sy, [LNode a])
FGL graph operations.
data SelfLoops Source
When converting an FSM into a graph, do we keep all self-loops, or only those which are sources of nondeterminism?
Constructors
KeepKeep them all
TrimTrim any which aren't nondeterminism sources.
fsmToFGL :: FSM sy -> SelfLoops -> Gr () sySource
Turn an FSM into an fgl graph with labelled edges.
fglDot :: (Ord b, CleanShow b, Graph gr) => gr a b -> DotGraph IntSource
strongCCs :: Eq sy => FSM sy -> [[State]]Source
Compute an FSM's strongly-connected components.
weakCCs :: Eq sy => FSM sy -> [[State]]Source
Compute an FSM's weakly-connected components.
Dot and GML format output.
class Show a => CleanShow a whereSource
Subclass Show so that show calls on Strings and Chars don't get quotes inserted.
Methods
cleanShow :: a -> StringSource
show/hide Instances
fsmToDot :: (Ord sy, CleanShow sy) => FSM sy -> DotGraph IntSource
Turn an FSM into a DotGraph, trimming any self-loops which aren't sources of nondeterminism.
fsmToGML :: CleanShow sy => FSM sy -> DocSource
Turn an FSM into a GML-formatted graph', trimming any self-loops which aren't sources of nondeterminism.
Input.
fglToFsm :: (Graph gr, Ord sy, Show sy) => gr a sy -> ReadFsmMonad (FSM sy, [LNode a])Source
Turn an FGL graph (interpreted as being a directed graph) into an FSM. Self-loops are inserted as required. Also returns a list of the graph's labelled nodes, since the labels are discarded by the FSM construction. FSM states are numbered [0..] and thus may be used as an index into that list of labelled nodes, in order to relate FSM states back to the original graph nodes and their labels.
Produced by Haddock version 2.6.0