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.
[1]
J. Michael Spivey,et al.
Understanding Z : A specification language and its formal semantics
,
1985,
Cambridge tracts in theoretical computer science.
[2]
C. A. R. Hoare,et al.
Laws of programming
,
1987,
CACM.
[3]
Edsger W. Dijkstra,et al.
Guarded commands, nondeterminacy and formal derivation of programs
,
1975,
Commun. ACM.
[4]
Jifeng He,et al.
An Approach to Verifiable Compiling Specification and Prototyping
,
1990,
PLILP.
[5]
Cliff B. Jones,et al.
Systematic software development using VDM
,
1986,
Prentice Hall International Series in Computer Science.
[6]
Inmos Limited,et al.
OCCAM 2 reference manual
,
1988
.