Tomas Petricek, Charles University, Prague



Formally describes language syntax
What about semantics?
What happens when programs are executed?
Turns out to be harder!

gotogoto is difficult

Microalgol definition by McCarthy
Program \(\pi\), execution state \(\xi\)


"Those difficulties can be resolved and that a clear description of the state of an Algol computation will clarify the problem of compiler design."
(McCarthy, 1964)

"The practical advantages of program proving will eventually outweigh the difficulties."
(Hoare, 1969)


Method by Strachey
Assign mathematical object to constructs
Terms of \(\lambda\) calculus!



ref,proc,struct,union,flex)


"Why does it take 20 pages to prove a program that is obviously correct?"
What does it take to convince a human?


Proofs in logic
Finite sequences of propositions, each of which is
an axiom, an assumption or follows from earlier
propositions by a rule of inference.
Proofs in practice
Mix of natural and formal language, aimed to
convince another qualified colleague






Harlan Mills at IBM
PhD in game theory
Extension of Chief Programmer Teams
"Software engineering without mathematical verification is no more than a buzzword."




"One should prove that [a program] meets its specifications, and this proof should be checked by a computer program."
(McCarthy, 1963)
"A mechanical theorem prover does not act as an oracle ... but as an implacable sceptic that insists on all assumptions being stated and all claims justified."
(Rushby & Von Henke, 1990)



sel4 microkernel
A range of mission
critical projects
CompCert compiler
Faster than gcc without (untrusted) optimizations
Verification tools
Static Driver Verifier at Microsoft, Infer at Facebook



Software Implemented Fault Tolerance
Proof could only be completed if they also had a precise specification of how the underlying microprocessor executes instructions and also the timing of such execution.
Boyer and Moore (1983)


The first commercial microprocessor with both a formal specification and a proof that the chip conforms to it
Device can be described ... and the description verified; but ...there is no way to assure the accuracy of the description





