This is a simple C project that was born as an exercise for my CS class. It replicates the behaviour of a Universal Turing Machine
To run the program, you can clone the repo on your local directory by using:
git clone https://github.com/tiz314/TuringMachine
Then, you can compile the program by using (in the src folder):
make
Finally, you can run the binary file.
The program accepts the initial tape content and the instructions in local files, already created in the folder input
. There is an example program that tells you if a received word is palindrome or not by writing the result on the tape.
You need to follow the following syntax rules for the instructions:
- To represent an empty slot on the tape, regardless of the rule in the instruction, you need to use
-
- To give the command to exit the program, use the letter E
By now, the implementation doesn't accept states called by names, but only represented by a single character (numbers and letters, actually each char)
The execution can also be switched to step-by-step execution to better understand the algorithm behaviour.
The software includes an implementation of a different version of the original Universal turing machine, including the possibility to use two different tapes instead of one.
Thanks to Mighty Gibbon for the first version of the file management and Staring Linus :| for the great idea!