Finite State Machine Simulator



How to use this Simulator:

The status bar at the bottom displays error messages and instructions.

This describes the command buttons on the applet interface :

New State

To add new states, press this button, and click where you want the new states to appear.

Kill State

To delete existing states press the button and click on the states you want to delete. This will also delete any transitions attached to those states

New Trans

To add new transitions click on the start state, which will be highlighted, and then on the destination state. A dialog will appear with the choice of symbols for the transition. If a transition already exists between the two states, the new symbols are added to it.You can add self transitions by clicking on the same state twice.

Kill Trans

To delete a transition, click on source and then on the destination state.

Set Initial

To set an initial state, click this button and then the desired inital state. A dot appears inside that state. Since there can be only one initial state in a FSM, you cannot set more than one initial state. An initial state can be also be a final state.

Set Final

To set a final state, click this button and then the desired final state. Final states are denoted by double circles. A FSM can have any number of final states. Repeat for multiple final states.

Input String

To set the Input string, click this button. Valid symbols are 'a' to 'c', though the symbols are not checked for validity at this point. The Input string is shown in orange and the current symbol is highlighted in yellow.

Run

Click to start the simulation. To process the next symbol , click anywhere on the screen. Current states and transitions taken are highlighted in red and the current token is highlighted in yellow. At the end of the input the status line displays if the string was accepted or rejected. If the string is accepted, the last state is highlighted in red. Pressing Run again will reset the simulation.

New

Click new to clear the screen of the old machine and to create a new FSM.

 

 

 

About

This simulator utilizes a graphics template adapted from a famous applet made freely available by Kyril Faenov, which used the deprecated API.. It was ported to JDK 1.2 and made simpler and more user-friendly.