Logo image
Compiler optimization correctness by temporal logic
Journal article   Open access   Peer reviewed

Compiler optimization correctness by temporal logic

David Lacey, N D Jones, E Van Wyk and C C Frederiksen
Higher-Order and Symbolic Computation, Vol.17(3), pp.173-206
2004
pdf
PDF - Published Version (Open Access)204.39 kBDownloadView
Published VersionPDF - Published Version (Open Access) Open Access
url
https://doi.org/10.1023/B:LISP.0000029444.99264.c0View
Published Version

Abstract

compiler verification optimizing compilers temporal logic model checking
Rewrite rules with side conditions can elegantly express many classical compiler optimizations for imperative programming languages. In this paper, programs are written in an intermediate language and transform ation-enabling side conditions are specified in a temporal logic suitable for describing program data flow. The purpose of this paper is to show how such transformations may be proven correct. Our methodology is illustrated by Three familiar optimizations: dead code elimination, constant folding, and code motion. A transformation is correct if whenever it can be applied to a program, the original and transformed programs are semantically equivalent, i.e., they compute the same input-output function. The proofs of semantic equivalence inductively show that a transformation-specific bisimulation relation holds between the original and transformed program computations.

Details

Metrics

54 File views/ downloads
481 Record Views
Logo image