Plankalkül


Plankalkül is a programming language designed for engineering purposes by Konrad Zuse between 1942 and 1945. It was the first high-level programming language to be designed for a computer.
Kalkül is the German term for a formal system—as in Hilbert-Kalkül, the original name for the Hilbert-style deduction system—so Plankalkül refers to a formal system for planning.

History

In the domain of creating computing machines, Zuse was self-taught, and developed them without knowledge about other mechanical computing machines that existed already. To describe logical circuits, Zuse invented his own diagram and notation system, which he called "combinatorics of conditionals". After finishing the Z1 in 1938, Zuse discovered that the calculus he had independently devised already existed and was known as propositional calculus. What Zuse had in mind, however, needed to be much more powerful. In May 1939 he described his plans for the development of what would become Plankalkül. He wrote following in his notebook:
While working on his doctoral dissertation, Zuse developed the first known formal system of algorithm notation capable of handling branches and loops. In 1942 he began writing a chess program in Plankalkül. In 1944, Zuse met with the German logician and philosopher Heinrich Scholz, who expressed appreciation for Zuse's utilization of logical calculus. In 1945, Zuse described Plankalkül in an unpublished book. The collapse of Nazi Germany, however, prevented him from submitting his manuscript. Although most of his computers were destroyed by Allied bombs, Zuse was able to rescue one machine, the Z4, and move it to the Alpine village of Hinterstein.
Unable to continue building computers -- which was also forbidden by the Allied Powers -- Zuse devoted his time to the development of a higher-level programming model and language. In 1948 he published a paper in the Archiv der Mathematik and presented at the Annual Meeting of the GAMM. His work failed to attract much attention. In a 1957 lecture, Zuse expressed his hope that Plankalkül, "after some time as a Sleeping Beauty, will yet come to life." He expressed disappointment that the designers of ALGOL 58 never acknowledged the influence of Plankalkül on their own work.
Plankalkül was more comprehensively published in 1972. The first compiler was implemented by Joachim Hohmann in his 1975 dissertation. Other independent implementations followed in 1998 and 2000 at the Free University of Berlin.

Description

Plankalkül has drawn comparisons to the language APL, and to relational algebra. It includes assignment statements, subroutines, conditional statements, iteration, floating point arithmetic, arrays, hierarchical record structures, assertions, exception handling, and other advanced features such as goal-directed execution. The Plankalkül provides a data structure called generalized graph, which can be used to represent geometrical structures.
Plankalkül shared an idiosyncratic notation using multiple lines with Frege's Begriffsschrift of 1879.
Some features of the Plankalkül:
The only primitive data type in the Plankalkül is a single bit, denoted by S0, from which further data types can be built up.

Terminology

Zuse called a single program a Rechenplan. He envisioned what he called a Planfertigungsgerät, which would automatically translate the mathematical formulation of a program into machine-readable punched film stock.

Example

The original notation was two dimensional. For a later implementation in the 1990s, a linear notation was developed.
The following example defines a function max3 that calculates the maximum of three variables:
P1 max3 → R0
max → Z1
max → R0
END
P2 max → R0
V0 → Z1
→ V1 → Z1
Z1 → R0
END