DFAMachine.java

A DFA emulating program in Java

This program was a project for a Parallel Computing graduate class taken in Spring 1999. The idea was inspired by another class I was taking at the time, Automata Theory.

The program uses Java thread objects to act as DFA states. An active thread generates random strings of random length and passes them into the DFA machine. The states deal with deciding accept/reject/pass of each string as it is received.

The DFAMachineThreads.java program is similar to the DFAMachine.java program. However, although the DFA states are thread objects in both implementations, the "thread-ness" of the objects doesn't do the actual work of the machine, but instead the work is done by calling methods which do the work. The path of each string, then, is 'owned' by the string-generating thread. In the "Threads" implementation, the "thread-ness" actually does the work, by having other processes add the incoming strings to a buffer owned by the object, and having the thread pull strings out of this buffer for processing.

These issues are explained in more detail in the README file.

DFAMachine.java

DFAMachineThreads.java

Sample input file
Sample output


romulus@ccs.neu.edu