iscomp


Name

iscomp -- test for completeness

Synopsis

iscomp fm

iscomp <fm


Description

iscomp tests fm for completeness (that every state has a instruction with every instruction label). The input alphabet is considered to be the set of labels present in the input machine. iscomp returns 1 and writes complete on standard output if fm is complete; otherwise, it returns 0 and writes incomplete.

An incomplete machine can be made complete with fmcomp.

fm must conform to the Grail format for machines.


Examples

% cat dfm3
(START) |- 0
0 a 1
0 b 4
1 c 2
2 d 3
3 -| (FINAL)
4 e 5
5 f 6
6 -| (FINAL)

% iscomp dfm3
incomplete

% fmcomp dfm3 | iscomp
complete


Authors

Darrell Raymond and Derick Wood, the Grail project

See also

fm(5), fmcomp(1)