Logo image
Proving correctness of compiler optimizations by temporal logic
Conference paper   Peer reviewed

Proving correctness of compiler optimizations by temporal logic

David Lacey, N D Jones, E Van Wyk and C C Frederiksen
Proceedings of the 29th Principles of Programming Languages Symposium, pp.283-294
Principles of Programming Languages (POPL) Symposium, 29th (Portland, United States, 16-Jan-2002–18-Jan-2002)
Association for Computer Machinery
2002
url
https://doi.org/10.1145/503272.503299View
Published Version

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 semantics.

Details

Metrics

2 File views/ downloads
459 Record Views
Logo image