Information AboutP |
| CATEGORIES ABOUT P′′ | |
| esoteric programming languages | |
|
DEFINITION (hereafter written P′′) is formally defined as a set of words on the four-instruction alphabet {R, λ, (, )}, as follows: Syntax # R and λ are words in P′′. # If ''p'' and ''q'' are words in P′′, then ''pq'' is a word in P′′. # If ''q'' is a word in P′′, then (''q'') is a word in P′′. # Only words derivable from the previous three rules are words in P′′. Semantics
RELATION TO OTHER PROGRAMMING LANGUAGES
EXAMPLE PROGRAM Böhm 1 gives the following program to compute the predecessor (''x''-1) of an integer ''x'' > 0: : R ( R ) L ( r' ( L ( L ) ) r' L ) R r which translates directly to the equivalent brainfuck program : > > < − [ < [ < ] − < ] > +
REFERENCES # Böhm, C.: "On a family of Turing machines and the related programming language", ICC Bull. 3, 185-194, July 1964. # Böhm, C. and Jacopini, G.: "Flow diagrams, Turing machines and languages with only two formation rules", CACM 9(5), 1966. (Note: This is the most-cited paper on the Structured Program Theorem .) EXTERNAL RESOURCES
|
|
|