PCPL-0.1.0: Post Correspondence Programming Language

Safe HaskellNone

Language.PCPL

Contents

Description

Entry point to the Post Correspondence Programming Language

Synopsis

Documentation

Execute PCPL programs

runProgram :: Program -> Input -> [Domino]Source

Run a PCPL program on the given input, producing a PCP match.

Utility

topString :: [Domino] -> StringSource

Return the string across the top of a list of Dominos. Useful after finding a match.

Examples

unaryAdder :: TuringMachineSource

Turing machine that adds unary numbers. For example: 1+11 becomes 111.

parensMatcher :: TuringMachineSource

Turing machine that accepts strings of balanced parentheses. Note: due to the restrictions described in compileTM, the input must start with a $ symbol. For example: the input $(())() is accepted. This Turing machine is based on: http://www2.lns.mit.edu/~dsw/turing/examples/paren.tm.