Using gturing

Choosing a program and entering data

To use the gturing, you should select a set of rules (program) for the Turing machine, and give initial data. To select the program, select Open from the File menu and select the file containing the program. gturing includes many sample programs; selecting one of them will give you a brief message telling what this program does and what kind of data it expects to find on the tape. You can also write your own program as described in the section called Program File Format.

NOTE: You can not create new program files or edit existing files from within gturing; use your favorite text editor instead!

Once you have chosen the program, you should give it the initial data tape. To do so, select Settings->Tape and enter the tape symbols. Now your Turing machine is ready to run.

Running a program

The main window for gturing looks as shown in Figure 1. It consists of a menu bar, a toolbar, the main application display and a status display (at the bottom). The main display shows the contents of the tape and position of the head (denoted by a circumflex accent (^)). The status display shows the name of the program file that is currently loaded on the left and the current machine's state on the right.

Figure 1. gturing main window

To start or stop running the program, use buttons Run and Stop, or press Step to run just one step of the algorithm.

To restart the program, press Reset button. This sets the machine at state 0 and puts the tape's contents as it was originaly entered by the user. The machine's head is set at the leftmost character of the tape.

The Menu Bar

The menu bar, located at the top of the Main Window, contains the following menus:

File

This menu lets you load a program into the machine and exit the application. You will have to choose a previously edited file when loading a program. The examples directory will be open the first time you choose this option.

Settings

This menu lets you set the tape's contents and the speed at which the machine will run. (Changing the tape's contents will reset the machine.) It also allows you to open or close the Machine's states window, which shows all the rules form the program file hilighting the rule which is being applied at this step.

Help

Provides access to this manual and to About window, which shows gturing version and copyright information.