Towards machine-checked compiler correctness for higher-order pure functional languages
In this paper we show that the critical part of a correctness proof for implementations of higher-order functional languages is amenable to machine-assisted proof. An extended version of the lambda-calculus is considered, and the congruence between its direct and continuation semantics is proved. The proof has been constructed with the help of a generic theorem prover — Isabelle.
The major part of the problem lies in establishing the existence of predicates which describe the congruence. This has been solved using Milne's inclusive predicate strategy . The most important intermediate results and the main theorem as derived by Isabelle are quoted in the paper.
KeywordsCompiler Correctness Theorem Prover Congruence Proof Denotational Semantics Lambda Calculus
Unable to display preview. Download preview PDF.
- 1.A. Cohn. The equivalence of two semantic definitions: a case study in LCF. Technical Report CSR-76-81, Department of Computer Science, Edinburgh University, January 1981.Google Scholar
- 3.D.R. Lester. The G-machine as a representation of stack semantics. In G. Kahn, editor, Proceedings of the Functional Programming Languages and Computer Architecture Conference, pages 46–59. Springer-Verlag LNCS 274, September 1987.Google Scholar
- 4.D.R. Lester. Combinator Graph Reduction: A Congruence and its Applications. Dphil thesis, Oxford University, 1988. Also published as Technical Monograph PRG-73.Google Scholar
- 5.R.E. Milne. The Formal Semantics of Computer Languages and Their Implementation. PhD thesis, University of Cambridge, 1974.Google Scholar
- 6.P.D. Mosses. SIS — semantics implementation system. Technical Report DAIMI MD-30, Computer Science Department, Aarhus University, 1979.Google Scholar
- 7.K. Mulmuley. Full Abstraction and Semantic Equivalence. MIT Press, Cambridge, Massachusetts, 1987. ACM Doctoral Dissertation Award 1986.Google Scholar
- 8.F. Nielson and H.R. Nielson. Two-level Functional Languages. Number 34 in Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, 1992.Google Scholar
- 9.J. Palsberg. A Provably Correct Compiler Generator. PhD thesis, Computer Science Department, Aarhus University, January 1992. Also published as Technical Report DAIMI PB-382.Google Scholar
- 10.L.C. Paulson. A semantics-directed compiler generator. In Ninth Symposium on Principles of Programming Languages, pages 224–233, 1982.Google Scholar
- 11.L.C. Paulson. Logic and Computation: Interactive proof with Cambridge LCF. Cambridge University Press, 1987.Google Scholar
- 12.L.C. Paulson. Introduction to Isabelle. Technical report, Computer Laboratory, University of Cambridge, 1992.Google Scholar
- 13.A.M. Pitts. Relational properties of recursively defined domains. In Proc. 8th Annual Symposium on Logic in Computer Science, pages 86–97, Washington, 1993. IEEE Computer Soc. Press.Google Scholar
- 14.J.C. Reynolds. On the relation between direct and continuation semantics. In Proceedings of the Second Colloquium on Automata, Languages and Programming, pages 141–156, Saarbrucken, 1974. Springer-Verlag.Google Scholar
- 15.J.E. Stoy. Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory. The MIT Press Series in Computer Science. MIT Press, Cambridge, Massachusetts, 1977.Google Scholar
- 17.J.E. Stoy. Semantic models. In M. Broy and G. Schmidt, editors, Theoretical Foundations of Programming Methodology. Lecture notes of an International Summer School, directed by F.L. Bauer, E.W. Dijkstra and C.A.R. Hoare, pages 293–324, Boston, Massachusetts, 1982. NATO Advanced Study Institute Series, C91, D. Reidel Publishing Co.Google Scholar
- 18.J.E. Stoy. Some mathematical aspects of functional programming. In J. Darlington, P. Henderson, and D.A. Turner, editors, Functional Programming and its Applications: An Advanced Course, pages 217–252. Cambridge University Press, Cambridge, England, 1982.Google Scholar
- 20.M. Wand. A semantic prototyping system. In Proceedings of the ACM SIGPLAN'84 Symposium on Compiler Construction, pages 213–221, 1984.Google Scholar