| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
TMType
Description
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.
Constructors
| MultiTapeStates [Set State] |
Instances
| Eq MultiTapeStates Source # | |
Defined in TMType Methods (==) :: MultiTapeStates -> MultiTapeStates -> Bool # (/=) :: MultiTapeStates -> MultiTapeStates -> Bool # | |
| Ord MultiTapeStates Source # | |
Defined in TMType Methods 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 Methods 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.
Constructors
| StartStates [State] |
Instances
| Eq StartStates Source # | |
Defined in TMType | |
| Ord StartStates Source # | |
Defined in TMType Methods 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 Methods 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.
Constructors
| AccessStates [State] |
Instances
| Eq AccessStates Source # | |
Defined in TMType | |
| Ord AccessStates Source # | |
Defined in TMType Methods 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 Methods 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.
Constructors
| StateOmega | |
Instances
| Eq StateOmega Source # | |
Defined in TMType | |
| Ord StateOmega Source # | |
Defined in TMType Methods 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 Methods 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.
Constructors
| SingleTapeCommand ((Square, State, Square), (Square, State, Square)) | |
| PreSMCommand ((Square, StateOmega), (Square, StateOmega)) |
Instances
| Eq TapeCommand Source # | |
Defined in TMType | |
| Ord TapeCommand Source # | |
Defined in TMType Methods 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 Methods 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.
Constructors
| Value | |
Fields
| |
| E Int | |
| RBS | |
| LBS | |
| ES | |
| PCommand [TapeCommand] | |
| BCommand [TapeCommand] | |
newtype InputAlphabet Source #
Type of input alphabet of the Turing machine TM.
Constructors
| InputAlphabet (Set Square) |
Instances
| Eq InputAlphabet Source # | |
Defined in TMType Methods (==) :: InputAlphabet -> InputAlphabet -> Bool # (/=) :: InputAlphabet -> InputAlphabet -> Bool # | |
| Ord InputAlphabet Source # | |
Defined in TMType Methods 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 Methods showsPrec :: Int -> InputAlphabet -> ShowS # show :: InputAlphabet -> String # showList :: [InputAlphabet] -> ShowS # | |
newtype TapeAlphabet Source #
Type of tape alphabet of the Turing machine TM.
Constructors
| TapeAlphabet (Set Square) |
Instances
| Eq TapeAlphabet Source # | |
Defined in TMType | |
| Ord TapeAlphabet Source # | |
Defined in TMType Methods 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 Methods showsPrec :: Int -> TapeAlphabet -> ShowS # show :: TapeAlphabet -> String # showList :: [TapeAlphabet] -> ShowS # | |
Type of commands of a Turing machine TM.
Constructors
| Commands (Set [TapeCommand]) |
This type represents a Turing macine.
Constructors
| TM (InputAlphabet, [TapeAlphabet], MultiTapeStates, Commands, StartStates, AccessStates) |