Advertisement

Towards machine-checked compiler correctness for higher-order pure functional languages

  • David Lester
  • Sava Mintchev
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 933)

Abstract

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 [5]. The most important intermediate results and the main theorem as derived by Isabelle are quoted in the paper.

Keywords

Compiler Correctness Theorem Prover Congruence Proof Denotational Semantics Lambda Calculus 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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
  2. 2.
    P. Curzon. Deriving correctness properties of compiled code. Formal Methods in System Design, 3(1/2):83–115, August 1993.CrossRefGoogle Scholar
  3. 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. 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. 5.
    R.E. Milne. The Formal Semantics of Computer Languages and Their Implementation. PhD thesis, University of Cambridge, 1974.Google Scholar
  6. 6.
    P.D. Mosses. SIS — semantics implementation system. Technical Report DAIMI MD-30, Computer Science Department, Aarhus University, 1979.Google Scholar
  7. 7.
    K. Mulmuley. Full Abstraction and Semantic Equivalence. MIT Press, Cambridge, Massachusetts, 1987. ACM Doctoral Dissertation Award 1986.Google Scholar
  8. 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. 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. 10.
    L.C. Paulson. A semantics-directed compiler generator. In Ninth Symposium on Principles of Programming Languages, pages 224–233, 1982.Google Scholar
  11. 11.
    L.C. Paulson. Logic and Computation: Interactive proof with Cambridge LCF. Cambridge University Press, 1987.Google Scholar
  12. 12.
    L.C. Paulson. Introduction to Isabelle. Technical report, Computer Laboratory, University of Cambridge, 1992.Google Scholar
  13. 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. 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. 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
  16. 16.
    J.E. Stoy. The congruence of two programming language definitions. Theoretical Computer Science, 13(2):151–174, February 1981.CrossRefGoogle Scholar
  17. 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. 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
  19. 19.
    M. Wand. Deriving target code as a representation of continuation semantics. ACM Transactions on Programming Languages and Systems, 4(3):496–517, July 1982.CrossRefGoogle Scholar
  20. 20.
    M. Wand. A semantic prototyping system. In Proceedings of the ACM SIGPLAN'84 Symposium on Compiler Construction, pages 213–221, 1984.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1995

Authors and Affiliations

  • David Lester
    • 1
  • Sava Mintchev
    • 1
  1. 1.Functional Programming Group, Department of Computer ScienceManchester UniversityManchesterUK

Personalised recommendations