Skip to content

an experimental model that is based on turing machine

Notifications You must be signed in to change notification settings

iamshabell/tura

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

A simple conceptual model inspired by the Turing machine. The Turing machine is a theoretical device that manipulates symbols on a strip of tape according to a set of rules and is a fundamental concept in computer science. This program follows a similar principle, processing an input tape based on user-defined rules to perform state transitions until a halt condition is reached.

To learn more about Turing machines visit the Wikipedia page on Turing machines.

Running the program

  1. Compile the program:
    cargo build --release
  2. Run the program:
    ./tura <source.tura> <input.tape>
    • <source.tura>: A file containing the rules for the machine
    • <input.tape>: It contains the initial tape configurations

Example

Given the following rules in source.tura:

Inc 0 1 R Halt
Inc 1 0 R Inc

And the following input tape in input.tape:

  1 1 1 1 0

Running the program will process the tape according to the rules and output the tape's state at each step, showing the head's position with a ^ until the machine reaches a halt state, like so:

Inc: 1 1 1 1 0
     ^
Inc: 0 1 1 1 0
       ^
Inc: 0 0 1 1 0
         ^
Inc: 0 0 0 1 0
           ^
Inc: 0 0 0 0 0
             ^
Halt: 0 0 0 0 1 0
                ^

Acknowledgments

This project was developed while watching Tsoding's video series, Turing Machine in Rust.

About

an experimental model that is based on turing machine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages