CIT 596 Turing Machine simulator
Spring 2012, David Matuszek
I wrote a little Turing Machine simulator over the weekend. It's no real competition for JFLAP, but it does take input in a different form. JFLAP uses diagrams, but a TM can also be described textually. The transition function δ can be specified as a set of 5-tuples of the form:
Here are the details:
#' For example, the 5-tuple ("S", "a", " ", "L", "foo") would be represented asS a # L fooS, if the TM reads an "a", it writes a blank, moves Left, and enters state foo.start, and is positioned on the first (leftmost) non-blank symbol on the tape.halt, accept, or reject (all lowercase). The first of these is intended for transducers, the second and third for recognizers, but they are all halting states. reject state and halt. I would be happy to have students rewrite the program in their favorite language--it would be a nice thing to contribute to the class. I may do some additional languages myself.