JFLAP 2.0

Design

Here is the Javadoc documentation of the package.

And here is a simplified class diagram of the program. It doesn't contain all the classes but shows how the general structure fits together.

In addition to these there are also the MinimizeTreeState , MinimizeTreePopup, MinimizeDesktop and TreeMachine classes which are used for the minimizing algorithm (which includes drawing a tree). These classes all extend the corresponding classes. The MainMenu class is in charge of handling the main menu that pops up when the program starts, as well as the list of environments that are displayed.

The Environment class is the main window in which the automata are drawn. It contains the menubar, the inpufields,a Desktop and a Machine , and handles most of the events in the window before passing them down to the Desktop/Machine or up to the MainMenu.

The Desktop class is the canvas on which the machine is drawn. It also acts as a data structure since it contains the list of states and transitions and handles removing, adding, or changing them.

The Machine class can be either a FSA, PDA, TM1 or TM2 . It is in charge of performing various algorithms on the machine, like expanding a state or showing unreachable states, as well as running the machine in fast run or step run mode. It uses the Upperwindow and Configuration classes for running the automaton.

The State class knows its position and status and how to draw itself, and can also contain a list of transitions when the automaton is being ran.

The Transition class knows which states it leaves fromand goes to, as well as its label, and is able to draw itself.


Back

Last modified: Wed Aug 6 14:58:59 EDT 1997