The PPFM signature


Synopsis

signature PPFM

Finite automata can be exported to a file in the format suitable for the graph-vizualization package of ATT (see ref.). Given a filename, the description is written to a file f.tmp.dot, a file f.tmp.ps is created, and then f.tmp.ps is displayed using the ghostview previewer.

It is assumed that dot and ghostview are found under /usr/local/bin/dot and /usr/local/bin/ghostview.


Interface

include FM
eqtype label
val dot : label machine -> string -> unit
val viewgraph : string -> OS.Process.status
val display : label machine -> string -> OS.Process.status
val displayMinimize : label machine
                        -> string -> OS.Process.status
val displayDetermine : label machine
                         -> string -> OS.Process.status
val displayDetermineMinimize : label machine
                                 -> string
                                   -> OS.Process.status

Description

eqtype label

dot m s
writes a description of m to the file s.tmp.dot in the format of graphviz/dot.

viewgraph s
displays the graph in file s.tmp.dot by the graph-drawing function dot. The filename is relative to the directory where SML was called.

display m s
displays a picture of the machine m using temporary files s.tmp.dot and s.tmp.ps. Leaves these files for possible further use.

displayMinimize m s
displays a picture of the minimal deterministic machine equivalent to m, using temporary files s.tmp.dot and s.tmp.ps. Leaves these files for possible further use.

displayDetermine m s
displays a picture of the deterministic machine equivalent to m, using temporary files s.tmp.dot and s.tmp.ps. Leaves these files for possible further use.

displayDetermineMinimize m s
a) displays the original automaton m, b) displays the deterministic version m2 of m, using sets of states of m to represent states of m2 c) displays the deterministic automation m2 with states renamed by numbers d) displays the minimal automaton m3 with states as sets of states of m2 e) displays the minimal automaton equivalent to m with states renamed by numbers.