Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module represents a types of Turing machine.
Synopsis
- newtype State = State String
- newtype MultiTapeStates = MultiTapeStates [Set State]
- newtype StartStates = StartStates [State]
- newtype AccessStates = AccessStates [State]
- newtype StateOmega = StateOmega {}
- data TapeCommand
- = SingleTapeCommand ((Square, State, Square), (Square, State, Square))
- | PreSMCommand ((Square, StateOmega), (Square, StateOmega))
- data Square
- = Value {
- val_name :: String
- val_quote_cnt :: Int
- | E Int
- | RBS
- | LBS
- | ES
- | PCommand [TapeCommand]
- | BCommand [TapeCommand]
- = Value {
- newtype InputAlphabet = InputAlphabet (Set Square)
- newtype TapeAlphabet = TapeAlphabet (Set Square)
- newtype Commands = Commands (Set [TapeCommand])
- newtype TM = TM (InputAlphabet, [TapeAlphabet], MultiTapeStates, Commands, StartStates, AccessStates)
Documentation
This type represents a state of the Turing machine TM
.
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
.
Instances
Eq MultiTapeStates Source # | |
Defined in TMType (==) :: MultiTapeStates -> MultiTapeStates -> Bool # (/=) :: MultiTapeStates -> MultiTapeStates -> Bool # | |
Ord MultiTapeStates Source # | |
Defined in TMType compare :: MultiTapeStates -> MultiTapeStates -> Ordering # (<) :: MultiTapeStates -> MultiTapeStates -> Bool # (<=) :: MultiTapeStates -> MultiTapeStates -> Bool # (>) :: MultiTapeStates -> MultiTapeStates -> Bool # (>=) :: MultiTapeStates -> MultiTapeStates -> Bool # max :: MultiTapeStates -> MultiTapeStates -> MultiTapeStates # min :: MultiTapeStates -> MultiTapeStates -> MultiTapeStates # | |
Show MultiTapeStates Source # | |
Defined in TMType showsPrec :: Int -> MultiTapeStates -> ShowS # show :: MultiTapeStates -> String # showList :: [MultiTapeStates] -> ShowS # |
newtype StartStates Source #
Type of a k-vector of a start states of the Turing machine TM
.
Instances
Eq StartStates Source # | |
Defined in TMType (==) :: StartStates -> StartStates -> Bool # (/=) :: StartStates -> StartStates -> Bool # | |
Ord StartStates Source # | |
Defined in TMType compare :: StartStates -> StartStates -> Ordering # (<) :: StartStates -> StartStates -> Bool # (<=) :: StartStates -> StartStates -> Bool # (>) :: StartStates -> StartStates -> Bool # (>=) :: StartStates -> StartStates -> Bool # max :: StartStates -> StartStates -> StartStates # min :: StartStates -> StartStates -> StartStates # | |
Show StartStates Source # | |
Defined in TMType showsPrec :: Int -> StartStates -> ShowS # show :: StartStates -> String # showList :: [StartStates] -> ShowS # |
newtype AccessStates Source #
Type of a k-vector of a final states of the Turing machine TM
.
Instances
Eq AccessStates Source # | |
Defined in TMType (==) :: AccessStates -> AccessStates -> Bool # (/=) :: AccessStates -> AccessStates -> Bool # | |
Ord AccessStates Source # | |
Defined in TMType compare :: AccessStates -> AccessStates -> Ordering # (<) :: AccessStates -> AccessStates -> Bool # (<=) :: AccessStates -> AccessStates -> Bool # (>) :: AccessStates -> AccessStates -> Bool # (>=) :: AccessStates -> AccessStates -> Bool # max :: AccessStates -> AccessStates -> AccessStates # min :: AccessStates -> AccessStates -> AccessStates # | |
Show AccessStates Source # | |
Defined in TMType showsPrec :: Int -> AccessStates -> ShowS # show :: AccessStates -> String # showList :: [AccessStates] -> ShowS # |
newtype StateOmega Source #
Type of a state in a changed Turing machine, which has a form F_q, where q is a State
.
Instances
Eq StateOmega Source # | |
Defined in TMType (==) :: StateOmega -> StateOmega -> Bool # (/=) :: StateOmega -> StateOmega -> Bool # | |
Ord StateOmega Source # | |
Defined in TMType compare :: StateOmega -> StateOmega -> Ordering # (<) :: StateOmega -> StateOmega -> Bool # (<=) :: StateOmega -> StateOmega -> Bool # (>) :: StateOmega -> StateOmega -> Bool # (>=) :: StateOmega -> StateOmega -> Bool # max :: StateOmega -> StateOmega -> StateOmega # min :: StateOmega -> StateOmega -> StateOmega # | |
Show StateOmega Source # | |
Defined in TMType showsPrec :: Int -> StateOmega -> ShowS # show :: StateOmega -> String # showList :: [StateOmega] -> ShowS # |
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.
SingleTapeCommand ((Square, State, Square), (Square, State, Square)) | |
PreSMCommand ((Square, StateOmega), (Square, StateOmega)) |
Instances
Eq TapeCommand Source # | |
Defined in TMType (==) :: TapeCommand -> TapeCommand -> Bool # (/=) :: TapeCommand -> TapeCommand -> Bool # | |
Ord TapeCommand Source # | |
Defined in TMType compare :: TapeCommand -> TapeCommand -> Ordering # (<) :: TapeCommand -> TapeCommand -> Bool # (<=) :: TapeCommand -> TapeCommand -> Bool # (>) :: TapeCommand -> TapeCommand -> Bool # (>=) :: TapeCommand -> TapeCommand -> Bool # max :: TapeCommand -> TapeCommand -> TapeCommand # min :: TapeCommand -> TapeCommand -> TapeCommand # | |
Show TapeCommand Source # | |
Defined in TMType showsPrec :: Int -> TapeCommand -> ShowS # show :: TapeCommand -> String # showList :: [TapeCommand] -> ShowS # |
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.
Value | |
| |
E Int | |
RBS | |
LBS | |
ES | |
PCommand [TapeCommand] | |
BCommand [TapeCommand] |
newtype InputAlphabet Source #
Type of input alphabet of the Turing machine TM
.
Instances
Eq InputAlphabet Source # | |
Defined in TMType (==) :: InputAlphabet -> InputAlphabet -> Bool # (/=) :: InputAlphabet -> InputAlphabet -> Bool # | |
Ord InputAlphabet Source # | |
Defined in TMType compare :: InputAlphabet -> InputAlphabet -> Ordering # (<) :: InputAlphabet -> InputAlphabet -> Bool # (<=) :: InputAlphabet -> InputAlphabet -> Bool # (>) :: InputAlphabet -> InputAlphabet -> Bool # (>=) :: InputAlphabet -> InputAlphabet -> Bool # max :: InputAlphabet -> InputAlphabet -> InputAlphabet # min :: InputAlphabet -> InputAlphabet -> InputAlphabet # | |
Show InputAlphabet Source # | |
Defined in TMType showsPrec :: Int -> InputAlphabet -> ShowS # show :: InputAlphabet -> String # showList :: [InputAlphabet] -> ShowS # |
newtype TapeAlphabet Source #
Type of tape alphabet of the Turing machine TM
.
Instances
Eq TapeAlphabet Source # | |
Defined in TMType (==) :: TapeAlphabet -> TapeAlphabet -> Bool # (/=) :: TapeAlphabet -> TapeAlphabet -> Bool # | |
Ord TapeAlphabet Source # | |
Defined in TMType compare :: TapeAlphabet -> TapeAlphabet -> Ordering # (<) :: TapeAlphabet -> TapeAlphabet -> Bool # (<=) :: TapeAlphabet -> TapeAlphabet -> Bool # (>) :: TapeAlphabet -> TapeAlphabet -> Bool # (>=) :: TapeAlphabet -> TapeAlphabet -> Bool # max :: TapeAlphabet -> TapeAlphabet -> TapeAlphabet # min :: TapeAlphabet -> TapeAlphabet -> TapeAlphabet # | |
Show TapeAlphabet Source # | |
Defined in TMType showsPrec :: Int -> TapeAlphabet -> ShowS # show :: TapeAlphabet -> String # showList :: [TapeAlphabet] -> ShowS # |
Type of commands of a Turing machine TM
.
Commands (Set [TapeCommand]) |