@article{hoare_mathematics_1986,
	title = {Mathematics of Programming},
	journal = {Byte},
	author = {Hoare, C. A. R.},
	month = aug,
	year = {1986},
	pages = {135--154},
}

In “Mathematics of Programming” (1986), C.A.R. Hoare argues that “the construction of computer programs is a mathematical activity like the solution of differential equations, that programs can be derived from their specifications through mathematical insight, calculation, and proof, using algebraic laws as simple and elegant as those of elementary arithmetic” [@hoare_mathematics_1986, 115].

He advances “four basic principles”:

  1. “Computers are mathematical machines. Every aspect of their behavior can be defined with mathematical precision, and every detail can be deduced from this definition with mathematical certainty by the laws of pure logic” [@hoare_mathematics_1986, 115].

  2. “Computer programs are mathematical expressions. They describe, with unprecedented precision and in the most minute detail, the behavior, intended or unintended, of the computer on which they are executed” [@hoare_mathematics_1986, 115].

  3. “A programming language is a mathematical theory that includes concepts, notations, definitions, axioms, and theorems. These help a programmer develop a program that meets its specification and prove that it does” [@hoare_mathematics_1986, 115–116].

  4. “Programming is a mathematical activity. Like other branches of applied mathematics and engineering, its successful practice requires the determined and meticulous application of traditional methods of mathematical understanding, calculation, and proof” [@hoare_mathematics_1986, 116].

“These are general philosophical and moral principles,” Hoare continued, “but all the actual evidence is against them. Nothing is as I have described it” [@hoare_mathematics_1986, 116]. Contemporary digital computers, he complained, were “very complicated and rather poorly defined,” making it “usually impractical to reason logically about their behavior” [@hoare_mathematics_1986, 116]. One is often constrained, he remarked, to merely experiment with them, and “such experiments are certainly not mathematics” [@hoare_mathematics_1986, 116]. Programs often contain “thousands of pages of closely printed text,” and programming languages are far more complicated than practices of mathematical notation can handle [@hoare_mathematics_1986, 116]. Programmers “have been educated in ignorance and fear of mathematics” [@hoare_mathematics_1986, 116], and the consequences of our “present failure to recognize and use mathematics as the basis for programming discipline” are similar to those that one would find in engineering, air-traffic control, and so on, where “relevant physical and mathematical knowledge is embodied in a number of equations, formulas, and laws, many of which are simple enough to be taught to schoolchildren” [@hoare_mathematics_1986, 116]. The laws of programming, he asserted, “are as simple, as obvious, and as useful as the laws in any other branch of mathematics, for example, elementary arithmetic” [@hoare_mathematics_1986, 116].

Stating that “many scientists believe as fervently as I do in the principle that the whole of nature is governed by mathematical laws of great simplicity and elegance,” Hoare acknowledged that “when the engineer tries to apply the same laws in practice, the number of uncontrollable variables is so much greater than in the laboratory that the full calculation of the consequences of each design decision is hopelessly impractical” [@hoare_mathematics_1986, 122]. Engineers end up using “experience and understanding to formulate and apply various rules of thumb, and […] flair and judgment to supplement (though never to replace) the relevant mathematical calculations” [@hoare_mathematics_1986, 122]. Programmers have “developed a similar intuitive understanding of the behavior of computer programs” [@hoare_mathematics_1986, 122]. “Nevertheless,” Hoare concluded, “I would suggest that the skills of our best programmers will be even more productive and effective when exercised within the framework of understanding and applying the relevant mathematics” [@hoare_mathematics_1986, 122]. He also suggested that reforming the working habits of programmers would be difficult, but insisted that it was necessary [@hoare_mathematics_1986, 124].