Skip to content

tiz314/TuringMachine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Universal Turing Machine Simulator

image

What is it?

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

How to use

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.

Loading tape and instructions

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.

Multiple tapes

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.

Credits

Thanks to Mighty Gibbon for the first version of the file management and Staring Linus :| for the great idea!

Releases

No releases published

Packages

No packages published