Structured Program Theorem

The structured program theorem, also called Böhm-Jacopini theorem, is a result in programming language theory. It states that a given class of algorithms can compute any computable function if those algorithms combine subprograms in only three specific ways. In other words, any algorithm can be expressed using only three control structures. They are

  1. Executing one subprogram, and then another subprogram (sequence)
  2. Executing one of two subprograms according to the value of a boolean expression (selection)
  3. Executing a subprogram until a boolean expression is true (iteration)

The theorem is credited to a 1966 paper by Corrado Böhm and Giuseppe Jacopini. However, David Harel traced its origins to the 1946 description of the von Neumann architecture and Stephen Kleene's normal form theorem.

The Böhm-Jacopini proof describes how to construct a structured flow chart from an arbitrary chart, using the bits in an extra integer variable to keep track of information that the original program represents by the program location. This construction was based on Böhm's programming language P′′. The Böhm-Jacopini proof did not settle the question of whether to adopt structured programming for software development, partly because the construction was more likely to obscure a program than to improve it. On the contrary, it signalled the beginning of the debate. Edsger Dijkstra's famous letter, "Go To Statement Considered Harmful," followed in 1968. Subsequent proofs of the theorem addressed practical shortcomings of the Böhm-Jacopini proof with constructions that maintained or improved the clarity of the original program.

Read more about Structured Program Theorem:  Application To Cobol

Famous quotes containing the words structured, program and/or theorem:

    The subject of the novel is reality liberated from soul. The reader in complete independence presented with a structured process: let him evaluate it, not the author. The façade of the novel cannot be other than stone or steel, flashing electrically or dark, but silent.
    Alfred Döblin (1878–1957)

    First in booze, first in shoes, and last in the American League.
    —Administration in the State of Miss, U.S. public relief program (1935-1943)

    To insure the adoration of a theorem for any length of time, faith is not enough, a police force is needed as well.
    Albert Camus (1913–1960)