A constructive approach to compiler correctness

  • Peter Mosses
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 85)


It is suggested that denotational semantic definitions of programming languages should be based on a small number of abstract data types, each embodying a fundamental concept of computation. Once these fundamental abstract data types have been implemented in a particular target language (e.g. stack-machine code), it is a simple matter to construct a correct compiler for any source language from its denotational semantic definition. The approach is illustrated by constructing a compiler similar to the one which was proved correct by Thatcher, Wagner & Wright (1979). Some familiarity with many-sorted algebras is presumed.


Abstract Syntax Source Language Denotational Semantic Abstract Data Type Closed Term 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. J.A. Goguen, J.W. Thatcher, E.A. Wagner, J.B. Wright (1975) "Initial algebra semantics and continuous algebras", IBM Res. Rep. RC-5701, 1975. JACM 24 (1977) 68–85.Google Scholar
  2. J.A. Goguen, J.W. Thatcher, E.A. Wagner, J.B. Wright (1976) "An initial algebra approach to the specification, correctness, and implementation of abstract data types", IBM Res. Rep. RC-6487, 1976. Current Trends in Programming Methodology IV (r. Yeh, ed.), Prentice Hall, 1979.Google Scholar
  3. J.A. Goguen, J.W. Thatcher, E.A. Wagner, J.B. Wright (1976a) "Rational algebraic theories and fixed-point solutions", Proc. 17th IEEE Symp. on Foundations of Computing, Houston, 1976.Google Scholar
  4. J.A. Goguen, J.W. Thatcher, E.A. Wagner, J.B. Wright (1979) "More on advice on structuring compilers and proving them correct", IBM Res. Rep. RC-7588, 1979. Proc. Sixth Int. Coll. on Automata, Languages and Programming, Graz, 1979.Google Scholar
  5. Berkling, K.J. (1976) "A symmetric complement to the lambda-calculus", Interner Bericht ISF-76-7, GMD-Bonn, 1976.Google Scholar
  6. Burstall, R.M. & Goguen, J.A. (1977) "Putting theories together to make specifications", Proc. Fifth Int. Joint Conf. on Artificial Intelligence, Boston, 1977.Google Scholar
  7. Burstall, R.M. & Landin, P.J. (1969) "Programs and their proofs: an algebraich approach", Machine Intelligence 4, 1969.Google Scholar
  8. Goguen, J.A. (1978) "Order sorted algebras: exceptions and error sorts, coercions and overloaded operators", Semantics and Theory of Comp. Rep. 14, UCLA, 1978.Google Scholar
  9. Gordon, M.J.C. (1979) The Denotational Description of Programming Languages, Springer-Verlag, 1979.Google Scholar
  10. Guttag, J.V. (1975) "The specification and application to programming of abstract data types", Tech. Rep. CRSG-59, Toronto University, 1975.Google Scholar
  11. McCarthy, J. & Painter, J. (1967) "Correctness of a compiler for arithmetic expressions", Proc. Symp. in Applied Math. 19 (1967) 33–41.Google Scholar
  12. Milne, R.W. & Strachey, C. 1976) A Theory of Programming Language Semantics, Chapman & Hall (UK), John Wiley (USA), 1976.Google Scholar
  13. Milner, R. (1979) Algebraic Concurrency, unpublished lecture notes.Google Scholar
  14. Morris, F.L. (1973) "Advice on structuring compilers and proving them correct", Proc. ACM Symp. on Principles of Programming Languages, Boston, 1973.Google Scholar
  15. Scott, D.S. (1971) "The lattice of flow diagrams", Tech. Mono. PRG-3, Oxford Univ., 1971. Lect. Notes in Maths. 182: Semantics of Algorithmic Languages (E. Engeler, ed.), Springer, 1971.Google Scholar
  16. Scott, D.S. & Strachey, C. (1971) "Toward a mathematical semantics for computer languages", Tech. Mono. PRG-6, Oxford Univ., 1971. Computer and Automata (J. Fox, ed.), John Wiley, 1971.Google Scholar
  17. Stoy, J.E. (1977) Denotational Semantics, MIT Press, 1977.Google Scholar
  18. Tennent, R.D. (1976) "The denotational semantics of programming languages", CACM 19 (1976) 437–453.Google Scholar
  19. Wand, M. (1976) "First order identities as a defining language", Tech. Rep. 29, Indiana University, 1976, (revised: 1977).Google Scholar
  20. (1977) "Final algebra semantics and data type extensions", Tech. Rep. 65, Indiana University, 1977. JCSS 19 (1979) 27–44.Google Scholar
  21. Zilles, S.N. (1974) "Algebraic specification of data types", Computation Structures Group Memo 119, MIT, 1974.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1980

Authors and Affiliations

  • Peter Mosses
    • 1
  1. 1.Computer Science DepartmentAarhus University Ny MunkegadeAarhus CDenmark

Personalised recommendations