fmplus


Name

fmplus -- compute `+' of machine

Synopsis

fmplus fm

fmplus <fm


Description

fmplus computes the `+' of fm; that is, the machine accepting one or more occurences of words accepted by fm. The result is written on standard output.

fmplus can be applied to either determinstic or nondeterministic machines. The result is guaranteed to be nondeterministic.

fm must conform to the Grail format for machines.

fmplus computes `+' by making all instructions to final states also go to start states. The result has no empty-string instructions.


Examples

% cat dfm1
(START) |- 0
0 a 1
1 b 2
2 -| (FINAL)

% fmplus dfm1
(START) |- 0
0 a 1 
1 b 2 
1 b 0 
2 -| (FINAL) 

% cat nfm2
(START) |- 1
1 a 2
1 a 3
1 a 4
2 -| (FINAL)
3 -| (FINAL)
4 -| (FINAL)

% fmplus <nfm2
(START) |- 1
1 a 2 
1 a 3 
1 a 4 
1 a 1 
2 -| (FINAL) 
3 -| (FINAL) 
4 -| (FINAL) 


Authors

Darrell Raymond and Derick Wood, the Grail project

See also

fm(5)