isomorph fm2 <fm1
If two machines are not input, isomorph writes a diagnostic on standard error and returns 0. If either machine is not deterministic, isomorph returns -1 and writes a diagnostic on its standard error. A machine can be made deterministic by filtering it with fmdeterm.
Two machines are isomorphic if they are equivalent up to renumbering. Isomorphism is checked by applying canonical numbering to each machine and then testing for identity.
fm1 and fm2 must conform to the Grail format for machines.
% cat dfm4 (START) |- 0 0 a 1 0 g 0 0 b 4 1 c 2 2 d 3 3 -| (FINAL) 4 e 5 5 f 6 6 -| (FINAL) % isomorph dfm4 dfm4 isomorphic % cat dfm1 (START) |- 0 0 a 1 1 b 2 2 -| (FINAL) % cat dfm2 (START) |- 3 3 a 4 4 b 5 5 -| (FINAL) % isomorph dfm1 dfm2 isomorphic % isomorph dfm1 dfm4 nonisomorphic % isomorph dfm1 nfm1 nonisomorphic