LangToGroup-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

TMType

Description

This module represents a types of Turing machine.

Synopsis

Documentation

newtype State Source #

This type represents a state of the Turing machine TM.

Constructors

State String 

Instances

Instances details
Eq State Source # 
Instance details

Defined in TMType

Methods

(==) :: State -> State -> Bool #

(/=) :: State -> State -> Bool #

Ord State Source # 
Instance details

Defined in TMType

Methods

compare :: State -> State -> Ordering #

(<) :: State -> State -> Bool #

(<=) :: State -> State -> Bool #

(>) :: State -> State -> Bool #

(>=) :: State -> State -> Bool #

max :: State -> State -> State #

min :: State -> State -> State #

Show State Source # 
Instance details

Defined in TMType

Methods

showsPrec :: Int -> State -> ShowS #

show :: State -> String #

showList :: [State] -> ShowS #

newtype MultiTapeStates Source #

Type of a k-vector of tapes states, where k is a count of tapes.

Type represents all states of the Turing machine TM.

Constructors

MultiTapeStates [Set State] 

newtype StartStates Source #

Type of a k-vector of a start states of the Turing machine TM.

Constructors

StartStates [State] 

newtype AccessStates Source #

Type of a k-vector of a final states of the Turing machine TM.

Constructors

AccessStates [State] 

newtype StateOmega Source #

Type of a state in a changed Turing machine, which has a form F_q, where q is a State.

Constructors

StateOmega 

Fields

Instances

Instances details
Eq StateOmega Source # 
Instance details

Defined in TMType

Ord StateOmega Source # 
Instance details

Defined in TMType

Show StateOmega Source # 
Instance details

Defined in TMType

data TapeCommand Source #

Type of a command of the Turing machine TM, which applicable on a single tape.

SingleTapeCommand is a command for normal Turing machine.

PreSMCommand is a command for Turing machine after change.

data Square Source #

This is a data type of square of the Turing machine TM.

Value is a square of string.

E is a square, which we use after change of Turing machine, for representing empties of a tape, and its argument marks the tape number.

RBS is a right bounding square.

LBS is a left bounding square.

ES is a empty square.

PCommand is a square of command with parentheses surroundings.

BCommand is a square of command with brackets surroundings.

Instances

Instances details
Eq Square Source # 
Instance details

Defined in TMType

Methods

(==) :: Square -> Square -> Bool #

(/=) :: Square -> Square -> Bool #

Ord Square Source # 
Instance details

Defined in TMType

Show Square Source # 
Instance details

Defined in TMType

newtype InputAlphabet Source #

Type of input alphabet of the Turing machine TM.

Constructors

InputAlphabet (Set Square) 

newtype TapeAlphabet Source #

Type of tape alphabet of the Turing machine TM.

Constructors

TapeAlphabet (Set Square) 

newtype Commands Source #

Type of commands of a Turing machine TM.

Constructors

Commands (Set [TapeCommand]) 

Instances

Instances details
Eq Commands Source # 
Instance details

Defined in TMType

Ord Commands Source # 
Instance details

Defined in TMType

Show Commands Source # 
Instance details

Defined in TMType

newtype TM Source #

This type represents a Turing macine.

Instances

Instances details
Eq TM Source # 
Instance details

Defined in TMType

Methods

(==) :: TM -> TM -> Bool #

(/=) :: TM -> TM -> Bool #

Ord TM Source # 
Instance details

Defined in TMType

Methods

compare :: TM -> TM -> Ordering #

(<) :: TM -> TM -> Bool #

(<=) :: TM -> TM -> Bool #

(>) :: TM -> TM -> Bool #

(>=) :: TM -> TM -> Bool #

max :: TM -> TM -> TM #

min :: TM -> TM -> TM #

Show TM Source # 
Instance details

Defined in TMType

Methods

showsPrec :: Int -> TM -> ShowS #

show :: TM -> String #

showList :: [TM] -> ShowS #

ShowInfo TM Source # 
Instance details

Defined in ShowInfo