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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
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.
J. Bowen. From Programs to Object Code and back again using Logic Programming. ProCoS Document OU JB 7/1, 1990.
E. W. Dijkstra. Guarded commands, non-determinacy, and formal derivation of programs. Comm. ACM 18 (8): 453-7, 1975.
J. Goguen and T. Winkler, Introducing OBJ3. SRI International Technical Report SRI-CSL-88-9, 1988.
C.A.R. Hoare and others. Laws of Programming. Comm. ACM 30 (8): 672-86, 1987. [Reprinted in this volume].
INMOS Limited, occam 2 Reference Manual. Prentice Hall International, 1988.
C.B. Jones. Systematic Software Development Using VDM. Prentice Hall International, 1986.
A. Sampaio. A comparative study of theorem provers: proving correctness of compiling specifications. Oxford University Computing Laboratory Technical Report PRG-TR-20-90, 1990.
J.M. Spivey. Understanding Z— A Specification Language and its Formal Semantics. Cambridge Tracts in Computer Science 3. Cambridge University Press, 1988.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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