Safe Haskell | None |
---|
This module implements the Turing machine to PCP(L) compiler described in Michael Sipser's textbook Introduction to the Theory of Computation, second edition, section 5.2.
- compileTM :: TuringMachine -> Program
- compileTM' :: Seperator -> TuringMachine -> Program
- type Seperator = Symbol
Documentation
compileTM :: TuringMachine -> ProgramSource
Compile a Turing machine into an equivalent PCPL program. This function assumes that the Turing machine never attempts to move its head left of the starting position. Any Turing machine can be converted into one that satisfies this assumption.
compileTM' :: Seperator -> TuringMachine -> ProgramSource