fmrenum


Name

fmrenum -- renumber a machine

Synopsis

fmrenum fm

fmrenum <fm


Description

fmrenum renumbers the states in fm according to a canonical numbering; breadth-first and lexicographically on the instruction labels. The renumbered machine is placed on standard output.

If isomorphic machines are canonically renumbered, they are identical.

fmrenum returns 0 and writes a message on standard error if fm is nondeterministic. A machine can be made deterministic by filtering it with fmdeterm.

fm must conform to the Grail format for machines.


Examples

% cat dfm2
(START) |- 3
3 a 4
4 b 5
5 -| (FINAL)

% fmrenum dfm2
(START) |- 0
0 a 1 
1 b 2 
2 -| (FINAL) 


Authors

Darrell Raymond and Derick Wood, the Grail project

See also

fm(5), fmdeterm(1)