Skip to main content

Compiling a 50-year journey*


Fifty years ago, John McCarthy and James Painter (1967) published the first paper on compiler verification, in which they showed how to formally prove the correctness of a compiler that translates arithmetic expressions into code for a register-based machine. In this article, we revisit this example in a modern context, and show how such a compiler can now be calculated directly from a specification of its correctness using simple equational reasoning techniques.

Hide All

Graham Hutton was funded by EPSRC grant EP/P00587X/1, Unified Reasoning About Program Correctness and Efficiency.

Hide All
Bahr, P. & Hutton, G. (2015) Calculating correct compilers. Journal of Functional Programming, 25, 47 pages.
Hutton, G. (2016) Programming in Haskell. Cambridge University Press.
McCarthy, J. & Painter, J. (1967) Correctness of a compiler for arithmetic expressions. In Mathematical Aspects of Computer Science, Proceedings of Symposia in Applied Mathematics, vol. 19. American Mathematical Society.
Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Journal of Functional Programming
  • ISSN: 0956-7968
  • EISSN: 1469-7653
  • URL: /core/journals/journal-of-functional-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *
Type Description Title
Supplementary materials

Hutton and Bahr supplementary material
Hutton and Bahr supplementary material 1

 Unknown (10 KB)
10 KB


Full text views

Total number of HTML views: 1
Total number of PDF views: 58 *
Loading metrics...

Abstract views

Total abstract views: 327 *
Loading metrics...

* Views captured on Cambridge Core between 20th September 2017 - 20th April 2018. This data will be updated every 24 hours.