Skip to main content

Refinement algebra proves correctness of compilation

  • Conference paper
Programming and Mathematical Method

Part of the book series: NATO ASI Series ((NATO ASI F,volume 88))

Abstract

A compiler is specified by a description of how each construct of the source language is translated into a sequence of object code instructions. The meaning of the object code can be defined by an interpreter written in the source language itself. A proof that the compiler is correct must show that interpretation of the object code is at least as good (for any relevant purpose) as the corresponding source program. The proof is conducted using standard techniques of data refinement. All the-calculations are based on algebraic laws governing the source language. The theorems are expressed in a form close to a logic program, which may be used as a compiler prototype, or as a check on the results of a particular compilation. It is suggested that this formal framework provides appropriate interfaces for compiler implementors, and hardware designers, as well as users of the language.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. J. Bowen, He Jifeng and P. Pandya. An Approach to Verifiable Compiling Specification and Prototyping. Lecture Notes in Computer Science 456, Springer-Verlag, 45–60, 1990.

    Google Scholar 

  2. J. Bowen. From Programs to Object Code and back again using Logic Programming. ProCoS Document OU JB 7/1, 1990.

    Google Scholar 

  3. E. W. Dijkstra. Guarded commands, non-determinacy, and formal derivation of programs. Comm. ACM 18 (8): 453-7, 1975.

    Article  MATH  MathSciNet  Google Scholar 

  4. J. Goguen and T. Winkler, Introducing OBJ3. SRI International Technical Report SRI-CSL-88-9, 1988.

    Google Scholar 

  5. C.A.R. Hoare and others. Laws of Programming. Comm. ACM 30 (8): 672-86, 1987. [Reprinted in this volume].

    Article  MATH  MathSciNet  Google Scholar 

  6. INMOS Limited, occam 2 Reference Manual. Prentice Hall International, 1988.

    Google Scholar 

  7. C.B. Jones. Systematic Software Development Using VDM. Prentice Hall International, 1986.

    Google Scholar 

  8. A. Sampaio. A comparative study of theorem provers: proving correctness of compiling specifications. Oxford University Computing Laboratory Technical Report PRG-TR-20-90, 1990.

    Google Scholar 

  9. J.M. Spivey. Understanding Z— A Specification Language and its Formal Semantics. Cambridge Tracts in Computer Science 3. Cambridge University Press, 1988.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1992 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hoare, C.A.R., Jifeng, H. (1992). Refinement algebra proves correctness of compilation. In: Broy, M. (eds) Programming and Mathematical Method. NATO ASI Series, vol 88. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-77572-7_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-77572-7_12

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-77574-1

  • Online ISBN: 978-3-642-77572-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics