Skip to content

vvaucoul/Ft_Turing

Repository files navigation

FT-TURING

The main goal of the project was to produce 5 JSON turing machines and a functional interpreter. In addition, we could determine the complexity of each machine as a bonus.

With a working mate, we decided to choose the python language and use the matplotlib librairy to realize the bonus.

Setup Project

  • Clone the project
git clone https://github.com/vvaucoul/Ft_Turing && cd FT_Turing
  • Use Conda environment
sh install_python.sh
  • Then, open a new shell

Usage

  • unary_add.json
python3 ft_turing.py machines/unary_add.json <Args> (Ex: "111+11=")
  • unary_sub.json
python3 ft_turing.py machines/unary_sub.json <Args> (Ex: "111-11=")
  • is_pair.json
python3 ft_turing.py machines/is_pair.json <Args> (Ex: "0000=")
  • equal.json
python3 ft_turing.py machines/equal.json <Args> (Ex: "000111")
  • palindrome.json
python3 ft_turing.py machines/palindrome.json <Args> (Ex: "1001001")
  • inception.json
python3 ft_turing.py machines/inception.json '<alphabet=["1", ".", "+", "="]><states=["move_to_plus", "move_to_equal", "end", "HALT"]><transitions={"move_to_plus":[{"read":"1", "to_state":"move_to_plus", "write":"1", "action":"RIGHT"}, {"read":"0", "to_state":"move_to_plus", "write":"0", "action":"RIGHT"}, {"read":"+", "to_state":"move_to_equal", "write":"1", "action":"RIGHT"}], "move_to_equal":[{"read":"1", "to_state":"move_to_equal", "write":"1", "action":"RIGHT"}, {"read":"0", "to_state":"move_to_equal", "write":"0", "action":"RIGHT"}, {"read":"=", "to_state":"end", "write":".", "action":"LEFT"}], "end":[{"read":"1", "to_state":"HALT", "write":".", "action":"LEFT"}]}>1+1='

A few examples



Complexity

About

Realization of 5 turing machines. Creation of a functional Python interpreter.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors