fsmActions-0.4.1: Finite state machines and FSM actionsSource codeContentsIndex
Data.FsmActions.FsmMatrix
Contents
I/O
Parsing
Pretty-printing
Description

Serialisation/deserialisation of FSMs as FSM transition matrices.

A FSM may be represented as an transition matrix whose rows correspond to states of the FSM, and whose columns correspond to its possible actions (labels on its transitions). A given cell then represents the transition(s) from some (row) state under some (column) action, and contains a comma-separated list of integers: the row numbers of the destination states. (Of course, for a deterministic action, there's just one, and no comma.) Rows are numbered from 0 and increment strictly.

Synopsis
loadFsmMx :: FilePath -> IO (FSM String)
saveFsmMx :: FSM String -> FilePath -> IO ()
parseFsmMx :: String -> ReadFsmMonad (FSM String)
printFsmMx :: FSM String -> String
I/O
loadFsmMx :: FilePath -> IO (FSM String)Source
Load an FSM from an FsmMatrix file.
saveFsmMx :: FSM String -> FilePath -> IO ()Source
Save an FSM to an FsmMatrix file.
Parsing
parseFsmMx :: String -> ReadFsmMonad (FSM String)Source
Parse an FsmMatrix-formatted FSM held in a string. Includes normalisation and well-formedness checks.
Pretty-printing
printFsmMx :: FSM String -> StringSource
Pretty-print a string FSM in FsmMatrix format.
Produced by Haddock version 2.6.0