fsmActions-0.4.4: Finite state machines and FSM actions

Safe HaskellNone

Data.FsmActions.FsmEdges

Contents

Description

Serialisation/deserialisation of FSMs in edge list format.

An FSM may be represented textually as list of {source_state->destination_state,label} strings, each of which represents an edge in its directed graph. (This representation is interesting because it's used by Mathematica for graph I/O.)

Synopsis

I/O

loadFsmEdges :: FilePath -> IO (FSM String)Source

Load an FSM from an FsmEdges file.

saveFsmEdges :: FSM String -> FilePath -> IO ()Source

Save an FSM to an FsmMatrix file.

Parsing

parseFsmEdges :: String -> ReadFsmMonad (FSM String)Source

Parse an FsmEdges-formatted FSM held in a string. Includes normalisation and well-formedness checks.

Pretty-printing

printFsmEdges :: FSM String -> StringSource

Pretty-print a string FSM in FsmMatrix format.