Skip to content

FrankBuss/turing-machine-language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TMSL

This project is based on https://code.google.com/archive/p/turing-machine-language/ created by Isaac McGarvey, Joshua Gordon, Keerti Joshi, and Snehit Prabhu. The manual for it is here, and also copied in the repository as TMSL.pdf.

Compiler

The TMSL compiler can be compiled like this:

cd compiler
make

Machine Simulator

You can find examples of the input file format in machine/test.

Building the Machine

There are two ways to build the machine:

Using PowerShell:

cd machine
./build.ps1

Using Make:

cd machine
make

Usage

Usage of the machine executable looks like this:

machine <machine file> <input tape file> <output tape file>

For example (using PowerShell syntax):

cd machine
./machine test/reverse.tm test/input.tape test/output.tape

The simulator assumes that the start state is called "s0", but other than that, the state names can be any alphanumeric strings.

run script

For running the compiler to compile a TMSL file to a TM file, and then simulating it with a tape, you can use the run script. For example:

$ ./run.sh test/not.tml test/not.tml.input output.txt
Input tape:
0 0 1 0 0 1 0
Output tape:
1 1 0 1 1 0 1 
Done - have a nice day. Thank you for using the run script(tm).

About

Compiler and simulator for the TMSL (Turing Machine Simulation Language)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published