P′′


P′′ is a primitive computer programming language created by Corrado Böhm in 1964 to describe a family of Turing machines.

Definition

is formally defined as a set of words on the four-instruction alphabet, as follows:

Syntax

  1. and are words in P′′.
  2. If and are words in P′′, then is a word in P′′.
  3. If is a word in P′′, then is a word in P′′.
  4. Only words derivable from the previous three rules are words in P′′.

    Semantics

Böhm gives the following program to compute the predecessor of an integer x > 0:
which translates directly to the equivalent Brainfuck program:

><>+

The program expects an integer to be represented in bijective base-k notation, with encoding the digits respectively, and to have before and after the digit-string. At the beginning and end of the computation, the tape-head is on the preceding the digit-string.

Weblinks