A finite state machine simulator.