fmplus <fm
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.
% 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)