Proving correctness of compiler optimizations by temporal logic
Authors:
Open Access
- 1 January 2002
- conference paper
- Published by Association for Computing Machinery (ACM)
- Vol. 37 (1) , 283-294
Abstract
Many classical compiler optimizations can be elegantly expressed using rewrite rules of form: I ⇒ I′ if φ, where I, I′ are intermediate language instructions and φ is a property expressed in a temporal logic suitable for describing program data flow. Its reading: If the current program π contains an instruction of form I at some control point p, and if flow condition φ is satisfied at p, then replace I by I′. 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. The meaning of correctness is that for any program π, if Rewrite(π, π′, p, I ⇒ I′ if φ) then [π] = [π′], i.e. π and π′ have exactly the same semanticsKeywords
This publication has 13 references indexed in Scilit:
- Using Model Checking in a Parallelizing CompilerParallel Processing Letters, 1998
- Program Analysis as Model Checking of Abstract Interpretations1998
- Proof-carrying code1997
- Lightweight closure conversionACM Transactions on Programming Languages and Systems, 1997
- The fixpoint-analysis machine1995
- Optimal code motionACM Transactions on Programming Languages and Systems, 1994
- Automatic verification of finite-state concurrent systems using temporal logic specificationsACM Transactions on Programming Languages and Systems, 1986
- A temporal logic for reasoning about partially ordered computations (Extended Abstract)1984
- A denotational framework for data flow analysisActa Informatica, 1982
- Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints1977