Plankalkül () is a
programming language
A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language.
The description of a programming ...
designed for engineering purposes by
Konrad Zuse
Konrad Ernst Otto Zuse (; 22 June 1910 – 18 December 1995) was a German civil engineer, pioneering computer scientist, inventor and businessman. His greatest achievement was the world's first programmable computer; the functional program-c ...
between 1942 and 1945. It was the first
high-level programming language
In computer science, a high-level programming language is a programming language with strong Abstraction (computer science), abstraction from the details of the computer. In contrast to low-level programming languages, it may use natural language ...
to be designed for a computer.
''Kalkül'' is the
German
German(s) may refer to:
* Germany (of or related to)
**Germania (historical use)
* Germans, citizens of Germany, people of German ancestry, or native speakers of the German language
** For citizens of Germany, see also German nationality law
**Ger ...
term for a
formal system
A formal system is an abstract structure used for inferring theorems from axioms according to a set of rules. These rules, which are used for carrying out the inference of theorems from axioms, are the logical calculus of the formal system.
A form ...
—as in ''Hilbert-Kalkül'', the original name for the
Hilbert-style deduction system
:''In mathematical physics, ''Hilbert system'' is an infrequently used term for a physical system described by a C*-algebra.''
In logic, especially mathematical logic, a Hilbert system, sometimes called Hilbert calculus, Hilbert-style deductive s ...
—so ''Plankalkül'' refers to a formal system for planning.
History of programming
In the domain of creating computing machines, Zuse was self-taught, and developed them without knowledge about other mechanical computing machines that existed already -- although later on (building the
Z3) being inspired by
Hilbert
David Hilbert (; ; 23 January 1862 – 14 February 1943) was a German mathematician, one of the most influential mathematicians of the 19th and early 20th centuries. Hilbert discovered and developed a broad range of fundamental ideas in many ...
's and
Ackermann's book on elementary mathematical logic (cf.
Principles of Mathematical Logic).
To describe logical circuits, Zuse invented his own diagram and notation system, which he called "combinatorics of conditionals" (german: Bedingungskombinatorik). After finishing the
Z1 in 1938, Zuse discovered that the calculus he had independently devised already existed and was known as
propositional calculus
Propositional calculus is a branch of logic. It is also called propositional logic, statement logic, sentential calculus, sentential logic, or sometimes zeroth-order logic. It deals with propositions (which can be true or false) and relations b ...
. What Zuse had in mind, however, needed to be much more powerful (propositional calculus is not
Turing-complete
In computability theory, a system of data-manipulation rules (such as a computer's instruction set, a programming language, or a cellular automaton) is said to be Turing-complete or computationally universal if it can be used to simulate any Tur ...
and is not able to describe even simple arithmetic calculations). In May 1939 he described his plans for the development of what would become Plankalkül.
He wrote the 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
Chess is a board game for two players, called White and Black, each controlling an army of chess pieces in their color, with the objective to checkmate the opponent's king. It is sometimes called international chess or Western chess to disti ...
program in Plankalkül. In 1944, Zuse met with the German logician and philosopher
Heinrich Scholz
Heinrich Scholz (; 17 December 1884 – 30 December 1956) was a German logician, philosopher, and Protestant theologian. He was a peer of Alan Turing who mentioned Scholz when writing with regard to the reception of " On Computable Numbers, w ...
, who expressed appreciation for Zuse's utilization of
logical calculus
A formal system is an abstract structure used for inferring theorems from axioms according to a set of rules. These rules, which are used for carrying out the inference of theorems from axioms, are the logical calculus of the formal system.
A form ...
. In 1945, Zuse described Plankalkül in an unpublished book. The collapse of
Nazi Germany
Nazi Germany (lit. "National Socialist State"), ' (lit. "Nazi State") for short; also ' (lit. "National Socialist Germany") (officially known as the German Reich from 1933 until 1943, and the Greater German Reich from 1943 to 1945) was ...
, however, prevented him from submitting his manuscript.
At that time the only two working computers in the world were
ENIAC
ENIAC (; Electronic Numerical Integrator and Computer) was the first programmable, electronic, general-purpose digital computer, completed in 1945. There were other computers that had these features, but the ENIAC had all of them in one packa ...
and
Harvard Mark I
The Harvard Mark I, or IBM Automatic Sequence Controlled Calculator (ASCC), was a general-purpose electromechanical computer used in the war effort during the last part of World War II.
One of the first programs to run on the Mark I was initi ...
, neither of which used a compiler, and ENIAC needed to be reprogrammed for each task by changing how the wires were connected.
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
Bad Hindelang is a municipality in the district of Oberallgäu in Bavaria in Germany. As of 2008 it has a population of 4,915. Its sulphur spring was used for cures in the 19th century and today the municipality is a major health resort.
Geograp ...
(part of
Bad Hindelang
Bad Hindelang is a municipality in the district of Oberallgäu in Bavaria in Germany. As of 2008 it has a population of 4,915. Its sulphur spring was used for cures in the 19th century and today the municipality is a major health resort.
Geograp ...
).
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
'' Archiv der Mathematik'' is a peer-reviewed mathematics journal published by Springer, established in 1948.
Abstracting and indexing
The journal is abstracted and indexed in: '' 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
''Sleeping Beauty'' (french: La belle au bois dormant, or ''The Beauty in the Sleeping Forest''; german: Dornröschen, or ''Little Briar Rose''), also titled in English as ''The Sleeping Beauty in the Woods'', is a fairy tale about a princess cu ...
, will yet come to life." He expressed disappointment that the designers of
ALGOL 58
ALGOL 58, originally named IAL, is one of the family of ALGOL computer programming languages. It was an early compromise design soon superseded by ALGOL 60. According to John Backus
The Zurich ACM-GAMM Conference had two principal motives in pro ...
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
The Free University of Berlin (, often abbreviated as FU Berlin or simply FU) is a public research university in Berlin, Germany. It is consistently ranked among Germany's best universities, with particular strengths in political science and t ...
.
Description
Plankalkül has drawn comparisons to the language
APL, and to
relational algebra
In database theory, relational algebra is a theory that uses algebraic structures with a well-founded semantics for modeling data, and defining queries on it. The theory was introduced by Edgar F. Codd.
The main application of relational algebra ...
. It includes assignment statements,
subroutine
In computer programming, a function or subroutine is a sequence of program instructions that performs a specific task, packaged as a unit. This unit can then be used in programs wherever that particular task should be performed.
Functions may ...
s, conditional statements, iteration,
floating-point arithmetic
In computing, floating-point arithmetic (FP) is arithmetic that represents real numbers approximately, using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base. For example, 12.345 can be ...
, 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
Graph may refer to:
Mathematics
*Graph (discrete mathematics), a structure made of vertices and edges
**Graph theory, the study of such graphs and their properties
*Graph (topology), a topological space resembling a graph in the sense of discre ...
'' (''verallgemeinerter Graph''), which can be used to represent geometrical structures.
Plankalkül shared an idiosyncratic notation using multiple lines with
Frege
Friedrich Ludwig Gottlob Frege (; ; 8 November 1848 – 26 July 1925) was a German philosopher, logician, and mathematician. He was a mathematics professor at the University of Jena, and is understood by many to be the father of analytic ph ...
's ''
Begriffsschrift
''Begriffsschrift'' (German for, roughly, "concept-script") is a book on logic by Gottlob Frege, published in 1879, and the formal system set out in that book.
''Begriffsschrift'' is usually translated as ''concept writing'' or ''concept notatio ...
'' of 1879 (dealing with
mathematical logic
Mathematical logic is the study of logic, formal logic within mathematics. Major subareas include model theory, proof theory, set theory, and recursion theory. Research in mathematical logic commonly addresses the mathematical properties of for ...
).
Some features of the Plankalkül:
* only local variables
* functions do not support recursion
* only supports
call by value
In a programming language, an evaluation strategy is a set of rules for evaluating expressions. The term is often used to refer to the more specific notion of a ''parameter-passing strategy'' that defines the kind of value that is passed to the f ...
* composite types are arrays and tuples
* contains conditional expressions
* contains a for loop and a while loop
* no
goto
GoTo (goto, GOTO, GO TO or other case combinations, depending on the programming language) is a statement found in many computer programming languages. It performs a one-way transfer of control to another line of code; in contrast a function ca ...
Data types
The only primitive data type in the Plankalkül is a single
bit
The bit is the most basic unit of information in computing and digital communications. The name is a portmanteau of binary digit. The bit represents a logical state with one of two possible values. These values are most commonly represente ...
or
boolean (german: Ja-Nein-Werte - yes-no value in Zuses terminology). It is denoted by the identifier
. All the further data types are composite, and build up from primitive by means of "arrays" and "records".
So, a sequence of eight bits (which in modern computing could be regarded as
byte
The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable unit ...
) is denoted by
, and boolean matrix of size
by
is described by
. There also exists a shortened notation, so one could write
instead of
.
Type
could have two possible values
and
. So 4-bit sequence could be written like L00L, but in cases where such a sequence represents a number, the programmer could use the decimal representation 9.
Record of two components
and
is written as
.
Type (german: Art) in Plankalkül consists of 3 elements: structured value (german: Struktur), pragmatic meaning (german: Typ) and possible restriction on possible values (german: Beschränkung). User defined types are identified by letter A with number, like
- first user defined type.
Examples
Zuse used a lot of examples from chess theory:
Identifiers
Identifiers are alphanumeric characters with a number. There are the following kinds of identifiers for variables:
* Input values (german: Eingabewerte, Variablen) — marked with a letter V.
* Intermediate, temporary values (german: Zwischenwerte) — marked with a letter Z.
* Constants (german: Constanten) — marked with a letter С.
* Output values (german: Resultatwerte) — marked with a letter R.
Particular variable of some kind is identified by number, written under the kind. For example:
:
,
,
etc.
Programs and subprograms are marked with a letter P, followed by a program (and optionally a subprogram) number. For example
,
.
Output value of program
saved there in variable
is available for other subprograms under the identifier
, and reading value of that variable also means executing related subprogram.
Accessing elements by index
Plankalkül allows access for separate elements of variable by using "component index" (german: Komponenten-Index). When, for example, program receives input in variable
of type
(game state), then
— gives board state,
— piece on square number i, and
bit number j of that piece.
In modern programming languages, that would be described by notation similar to
V0 /code>, V0 i]
, V0 i] /code> (although to access a single bit in modern programming languages a bitmask
In computer science, a mask or bitmask is data that is used for bitwise operations, particularly in a bit field. Using a mask, multiple bits in a byte, nibble, word, etc. can be set either on or off, or inverted from on to off (or vice versa) in ...
is typically used).
Two-dimensional syntax
Because indexes of variables are written vertically, each Plankalkül instruction requires multiple rows to write down.
First row contains variable kind, then variable number marked with letter V (german: Variablen-Index), then indexes of variable subcomponents marked with K (german: Komponenten-Index), and then (german: Struktur-Index) marked with S, which describes variable type. Type is not required, but Zuse notes that this helps with reading and understanding the program.
In the line types and could be shortened to and .
Examples:
Indexes could be not only constants. Variables could be used as indexes for other variables, and that is marked with a line, which shows in which component index would value of variable be used:
Assignment operation
Zuse introduced in his calculus an assignment operator, unknown in mathematics before him. He marked it with «», and called it yields-sign (german: Ergibt-Zeichen). Use of concept of assignment is one of the key differences between math and computer science.
Zuse wrote that expression:
:
is analogous to more traditional mathematical equation:
:
There are claims that Konrad Zuse initially used the glyph as a sign for assignment, and started to use under the influence of Heinz Rutishauser
Heinz Rutishauser (30 January 1918 – 10 November 1970) was a Swiss mathematician and a pioneer of modern numerical mathematics and computer science.
Life
Rutishauser's father died when he was 13 years old and his mother died three years lat ...
. Knuth and Pardo believe that Zuse always wrote , and that was introduced by publishers of «Über den allgemeinen Plankalkül als Mittel zur Formulierung schematisch-kombinativer Aufgaben» in 1948. In the ALGOL 58
ALGOL 58, originally named IAL, is one of the family of ALGOL computer programming languages. It was an early compromise design soon superseded by ALGOL 60. According to John Backus
The Zurich ACM-GAMM Conference had two principal motives in pro ...
conference in Zurich, European participants proposed to use for assignment character introduced by Zuse, but the American delegation insisted on :=
.
The variable that stores the result of an assignment ( l-value) is written to the right side of assignment operator. First assignment to the variable is considered to be a declaration.
The left side of assignment operator is used for expression (german: Ausdruck), that defines which value will be assigned to variable. Expressions could use arithmetic operators, boolean operators, and comparison operators ( etc.).
Exponentiation operation is written similarly to the indexing operation - using lines in 2d notation:
Control flow
Terminology
Zuse called a single program a ''Rechenplan'' ("computation plan"). He envisioned what he called a ''Planfertigungsgerät'' ("plan assembly device"), which would automatically translate the mathematical formulation of a program into machine-readable punched film stock.[Hellige, Hans Dieter, ''Geschichten der Informatik''. Visionen, Paradigmen, Leitmotive. Berlin, Springer 2004, . pp. 45, 104, 105]
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
(in a linear transcription) that calculates the maximum of three variables:
P1 max3 (V0 8.0V1 8.0V2 8.0 → R0 8.0 max(V0 8.0V1 8.0 → Z1 8.0 max(Z1 8.0V2 8.0 → R0 8.0 END
P2 max (V0 8.0V1 8.0 → R0 8.0 V0 8.0→ Z1 8.0 (Z1 8.0< V1 8.0 → V1 8.0→ Z1 8.0 Z1 8.0→ R0 8.0 END
See also
* History of programming languages
The history of programming languages spans from documentation of early mechanical computers to modern tools for software development. Early programming languages were highly specialized, relying on mathematical notation and similarly obscure ...
* Timeline of programming languages
This is a record of notable programming languages, by decade. Prior to 1950 there were 8 unique programming languages, where 6 were unique languages and 2 were combinations of unique languages. By 1960 there were around 45-50 unique programming ...
* List of programming languages
This is an index to notable programming languages, in current or historical use. Dialects of BASIC, esoteric programming languages, and markup languages are not included. A programming language does not need to be imperative or Turing-complet ...
Notes
References
*
*
* Zuse, Konrad (1943), "Ansätze einer Theorie des allgemeinen Rechnens unter besonderer Berücksichtigung des Aussagenkalküls und dessen Anwendung auf Relaisschaltungen", (i.e. ''Inception of a universal theory of computation with special consideration of the propositional calculus and its application to relay circuits''.) unpublished manuscript, Zuse Papers 045/018.
* Zuse, Konrad (1948/49). "Über den allgemeinen Plankalkül als Mittel zur Formulierung schematisch-kombinativer Aufgaben". Arch. Math. 1, pp. 441–449, 1948/49.
*Zuse, Konrad (1972). "Der Plankalkül". Gesellschaft für Mathematik und Datenverarbeitung. Nr. 63, BMBW - GMD - 63, 1972.
*
HTML version
*
*
External links
The "Plankalkül" of Konrad Zuse: A Forerunner of Today's Programming Languages
by Friedrich L. Bauer
Friedrich Ludwig "Fritz" Bauer (10 June 1924 – 26 March 2015) was a German pioneer of computer science and professor at the Technical University of Munich.
Life
Bauer earned his Abitur in 1942 and served in the Wehrmacht during World War ...
alternative source
* Rojas, Raúl, et al. (2000). "Plankalkül: The First High-Level Programming Language and its Implementation". Institut für Informatik, Freie Universität Berlin, Technical Report B-3/2000
(full text)
https://web.archive.org/web/20141018204625/http://www.zib.de:80/zuse/Inhalt/Programme/Plankalkuel/Plankalkuel-Report/Plankalkuel-Report.htm (archived)]
*
*
Bram Bruines: Plankalkul
2010) - Plankalkül described in a formal way
{{DEFAULTSORT:Plankalkul
Programming languages created in 1948
Procedural programming languages
Non-English-based programming languages
German inventions of the Nazi period
German inventions
Konrad Zuse
1940s establishments in Germany