|
(5) |
In order to determinize this automaton, we give the following UNIX command
(note that in these examples lines
starting with a %
are typed to the UNIX shell;
the lines that follow are
output of the FSA Utilities program):
|
(6) |
|
(7) |
It is also possible to create an automaton on the basis of a regular expression. The file aabb.d could also be obtained by the command:
|
(8) |
A minimized automaton is obtained with the -m option. We can, for example, pipe the result of determinization to another incarnation of the fsa command. The following pipe produces the minimal finite-state acceptor for the language consisting of an even number of a's followed by an uneven number of b's:
|
(9) |
Next consider a finite-state transducer which copies its input (strings of a's and b's) to its output, except that if an a is followed by a b, then this a becomes a b. Suppose this transducer is defined in the file a2b.tnd as follows:
|
(10) |
|
(11) |
|
(12) |
|
(13) |
|
(14) |
|
(15) |
In regular expressions it is possible to use pairs of symbols in order to obtain finite-state transducers. Thus we can have examples such as the following:
|
(16) |
As another example, it is possible to compose aabb.nd with the transducer a2b.tnd. The following pipe produces the minimized, determinized composition:
|
(17) |
In this paper the use of the FSA Utilities toolbox is illustrated by means of UNIX commands. However, this is not the only possible way of using the toolbox. Care has been taken to implement the toolbox in such a way that it is straightforward to use each of the operations as a Prolog library. For this reason most of the operations are defined in separate modules.