Towards a provably correct compiler for OBJ3

  • Lutz H. Hamel
  • Joseph A. Goguen
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 844)


Abstract machines have proved very successful in the implementation of very high level logic and functional programming languages; in particular, we have the G-machine for functional programming languages and the WAM for Prolog. In this paper we develop an abstract machine appropriate for the implementation of algebraic specification languages. We then employ general algebra techniques and initiality properties to prove correctness of the translation from equational rewrite rules to the abstract machine code. The correctness proof itself has been automated using the OBJ3 system.


abstract machines algebraic specification compilers rewrite rules 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    E. Böerger and D. Rosenzweig. From Prolog Algebras towards WAM — A Mathematical Study of Implementation. In Proceedings CSL'90, Lecture Notes in Computer Science. Springer-Verlag, 1991.Google Scholar
  2. 2.
    R. M. Burstall and P. J. Landin. Programs and their proofs: an algebraic approach. Machine Intelligence, 4, 1969. Edinburgh University Press, eds. B. Meltzer, D. Michie.Google Scholar
  3. 3.
    G. Cousineau. The categorical abstract machine. In G. Huet, editor, Logical Foundations of Functional Programming, pages 25–45. Addison Wesley, 1990.Google Scholar
  4. 4.
    P. Curzon. Of what use is a verified compiler specification? Technical Report 274, University of Cambridge, Computer Laboratory, 1992.Google Scholar
  5. 5.
    H. Ehrig and B. Mahr. Fundamentals of Algebraic Specification 1: Equations and Initial Semantics., volume 6 of EATCS Monographs on Theoretical Computer Science. Springer-Verlag, Berlin, 1985.Google Scholar
  6. 6.
    J. Goguen and G. Malcolm. Proof of correctness of object representation. In A. W. Roscoe, editor, A Classical Mind: Essays in Honour of C.A.R. Hoare, pages 119–142. Prentice-Hall, 1994.Google Scholar
  7. 7.
    J. Goguen, T. Winkler, J. Meseguer, K. Futatsugi, and J. Jouannaud. Introducing OBJ. Draft, Oxford University Computing Laboratory, 1993.Google Scholar
  8. 8.
    J. A. Goguen. Semantics of computation. In E. G. Manes, editor, Proceedings, First International Symposium on Category Theory Applied to Computation and Control, pages 234–249. University of Massachusetts at Amherst, 1974. Also in Lecture Notes in Computer Science, Volume 25, Springer, 1975, pages 151–163.Google Scholar
  9. 9.
    J. A. Goguen, J. Jouannaud, and J. Meseguer. Operational semantics of order-sorted algebra. Lecture Notes in Computer Science, 194, 1985.Google Scholar
  10. 10.
    J. A. Goguen, J. W. Thatcher, and E. G. Wagner. An Initial Algebra Approach to the Specification, Correctness, and Implementation of Abstract Data Types, pages 80–149. Prentice-Hall, 1978. Current Trends in Programming Methodology, Data Structuring, edited by R. Yeh.Google Scholar
  11. 11.
    S. L. Peyton Jones. The Implementation of Functional Programming Languages. International Series. Prentice-Hall, London, 1987.Google Scholar
  12. 12.
    C. Kirchner, H. Kirchner, and J. Meseguer. Operational semantics of OBJ-3. Lecture Notes in Computer Science, 317, 1988.Google Scholar
  13. 13.
    H. Klaeren and K. Indermark. Efficient implementation of an algebraic specification language. Lecture Notes in Computer Science, 394:69–89, 1989.Google Scholar
  14. 14.
    F. L. Morris. Advice on structuring compilers and proving them correct. In ACM Symposium on Principles of Programming Languages, pages 144–152. Association for Computing Machinery, 1973.Google Scholar
  15. 15.
    K. Richta and S. Nesvera. The abstract rewriting machine. Research Report DC-91-04, Dept. of Computers Czech Technical University, Prague, September 1991.Google Scholar
  16. 16.
    J. W. Thatcher, E. G. Wagner, and J. B. Wright. More on advice on structuring compilers and proving them correct. Lecture Notes in Computer Science, 71:596–615, 1979.Google Scholar
  17. 17.
    D. H. Warren. An Abstract Prolog Instruction Set. Technical Report 309, Artificial Intelligence Centre, SRI International, 1983.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1994

Authors and Affiliations

  • Lutz H. Hamel
    • 1
  • Joseph A. Goguen
    • 1
  1. 1.Programming Research GroupOxford University Computing LaboratoryOxfordUK

Personalised recommendations