fmenum


Name

fmenum -- enumerate the language of a machine

Synopsis

fmenum [-n num] fa

fmenum [-n num] <fm


Description

fmenum enumerates the language of fm and writes the strings on its standard output. It produces 100 strings (or num strings, if -c num is specified) that belong to the language of fm. fmenum can enumerate the language of both deterministic and nondeterministic machines. fmenum produces strings in order of their length, shortest first; within the same length, they are lexicographically ordered.

fm must conform to the Grail format for machines.


Examples

% cat nfm1
(START) |- 1
1 a 2
1 a 3
2 b 2
3 b 3
2 c 4
3 c 5
4 d 4
5 d 5
4 -| (FINAL)
5 -| (FINAL)

% fmenum -n 10 nfm1
ac
abc
acd
abbc
abcd
acdd
abbbc
abbcd
abcdd
acddd

% fmenum -n 5 <nfm1
ac
abc
acd
abbc
abcd


Authors

Darrell Raymond and Derick Wood, the Grail project

See also

fm(5), fmexec(1)