Toward compiler implementation correctness proofs
- 1 April 1986
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Programming Languages and Systems
- Vol. 8 (2) , 185-214
- https://doi.org/10.1145/5397.30847
Abstract
Aspect of the interaction between compiler theory and practice is addressed. Presented is a technique for the syntax-directed specification of compilers together with a method for proving the correctness of their parse-driven implementations. The subject matter is presented in an order-algebraic framework; while not strictly necessary, this approach imposes beneficial structure and modularity on the resulting specifications and implementation correctness proofs. Compilers are specified using an order-algebraic definition of attribute grammars. A practical class of compiler implementations is considered, consisting of those driven by LR( k ) or LL( k ) parsers which cause a sequence of translation routine activations to modify a suitably initialized collection of data structures (called a translation environment). The implementation correctness criterion consists of appropriately comparing, for each source program, the corresponding object program (contained in the final translation environment) produced by the compiler implementation to the object program dictated by the compiler specification. Provided that suitable intermediate assertions (called translation invariants ) are supplied, the program consisting of the (parse-induced) sequence of translation routine activations can be proven partially correct via standard inductive assertion methods.Keywords
This publication has 9 references indexed in Scilit:
- More on advice on structuring compilers and proving them correctTheoretical Computer Science, 1981
- Ten Years of Hoare's Logic: A Survey—Part IACM Transactions on Programming Languages and Systems, 1981
- Compiler Specification and VerificationPublished by Springer Nature ,1981
- An order-algebraic definition of knuthian semanticsTheory of Computing Systems, 1979
- The Denotational Description of Programming LanguagesPublished by Springer Nature ,1979
- Initial Algebra Semantics and Continuous AlgebrasJournal of the ACM, 1977
- An axiomatic basis for computer programmingCommunications of the ACM, 1969
- Semantics of context-free languagesTheory of Computing Systems, 1968
- EULERCommunications of the ACM, 1966