The Turing Kit is a Java application (not an applet) that enables the construction, simulation, and study of the abstract automata studied in CSE396. Deterministic Finite Automata (DFAs), pushdown automata (PDAs), and Turing Machines (TMs,DTMs) are directly supported. As a Java application, Turing Kit is not subject to the limitations of applets, and can freely write and load files. The program was written by Mark D. Grimaldi in 1997 under my supervision. It needs polish and updating from Java 1.1 to the current Java version. I know of no major bugs, just little glitches that can be worked around, and conveniences that should be provided, and non-crucial features not yet fully implemented (NFAs, wildcard characters, and hierarchical levels of "Machine").
The application comes in a single Java Archive (jar) file, TKit70.jar, together with necessary startup text files welcome.tmt and default.pal. If you know how to run Jar files on your home PC, you may copy these files and do so. I have seen a problem under Vista, but none with XP. Otherwise we expect that you will work with it in the CS labs from a workstation with the necessary graphics support.
The main setup issue is that we want you to be able to run the single copy I've placed on timberlake/nickelback/metallica in /home/csefaculty/regan/cse396/TKIT70/, while working in your own directories--i.e., without having to ``cd'' to mine. Java provides a mechanism for this, using a special environment variable called CLASSPATH, which you can set in your C-Shell Resource Controller file (.cshrc) in your home directory (or etc. if you use another shell). To do so, include the line:
---or if you already have a CLASSPATH defined, the line
setenv CLASSPATH .:/home/csefaculty/regan/cse396/TKIT70/TKit70.jar
setenv CLASSPATH ${CLASSPATH}:/home/csefaculty/regan/cse396/TKIT70/TKit70.jar
(Notice: capital TK in both, lowercase it
in the .jar filename.)
What's going on is that CLASSPATH requests a list of paths, separated
by colons : . It is often a good idea to make `.' (``current
directory'') the first entry in this list. (If you already have a
CLASSPATH line, you may need to check and make sure that none of our
class names, in particular ``Main.class,'' conflicts with a
class already in your path. Yes, "Main" is not a distinctive name,
but it hasn't caused problems in the past.)
[While we're at it, here's a change to your .cshrc file that will give you a nice prompt that shows your current directory. Copy the lines
set host = `hostname | cut -f1 -d"."` set prompt = "$host\<%c""> "
into your .cshrc file, meanwhile pre-pending a # to
``comment-out'' the existing set prompt= line you have. To
make the changes take effect now rather than the next time you log
in, enter the command source .cshrc (or etc. for a different
shell). As always, if you're uncertain about what's going on, please
see a technician in the lab and/or ask the instructor or TA for
assistance.]
Finally, create a fresh directory in which you will do work for cse396, and copy the files *.tmt and *.pal from my ~regan/cse396/TKIT70 directory there. Then enter
java Main &
and you should be off and running. If you get an error message
``Can't open X display...,'' then you will need to enter
setenv DISPLAY the-name-of-your-workstation:0.0
possibly preceded by the command xhost +, and try again.
Alternately, if you are connecting from a CSE terminal, you can do
ssh -X timberlake.cse.buffalo.edu
When the program successfully runs, the window will flicker a bit, before you see a partially-open window. Select "View" then "Auto Resize", and the window will resize itself. As shown in recitations (Tue. 1/26/10 1pm upcoming), the canvas has a big text box with further directions. These directions are also given as a README file in my directory that you can also copy, and updates will also be posted...
The program adheres to standard menuing and click-select conventions, and students have found it fairly self-explanatory.The program is not required for assignments in this course, but some have found it useful for designing and printing off machine diagrams to submit. There is no online submission, and directions on commenting states and machine functions must still be followed. Indeed, the program was designed to promote giving states meaningful descriptive names, rather than just numbers as in all texts, and putting helpful and neat description boxes.