PCPL-0.1.0: Post Correspondence Programming Language

Safe HaskellNone

Language.PCPL.CompileTM

Description

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.

Synopsis

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

Like compileTM, but can specify a Seperator symbol.

 compileTM = compileTM' (Symbol "#")

type Seperator = SymbolSource

Symbol used to separate TM configurations