Action may be represented as an adjacency matrix of
0s and 1s. The rows and columns of the matrix correspond to states of
Data.FA.Core.FSM: a 1 in a cell indicates that the
Action causes a transition from the 'row' state to
the 'column' state. If any of the rows in the matrix contain more
than one 1, the corresponding
Action is a
Note that if the same symbol appears multiple times, only one
instance will appear in the
FSM; the choice of which
appears is not defined.
readFSMFromMxFiles :: Ord sy => [(sy, String)] -> IO (FSM sy)
Read an action matrix from a specified file; uses
readAdjMxFromString to interpret the file contents.
Given a bytestring we expect to contain a serialisation of an
adjacency matrix, compute the corresponding
The serialisation format for an
Action on an
FSM is as follows: there are n
(newline-separated) lines, each containing n (comma-separated) 0s
or 1s. No other characters are allowed (not even whitespace), and
it is an error for any of the rows to contain anything other than
n cells. (Note that n is not specified, but inferred from the
number of lines in the string).