TY - JOUR AU1 - Lacey, David AU2 - Jones, Neil D. AU3 - Van Wyk, Eric AU4 - Frederiksen, Carl Christian AB - Proving Correctness of Compiler Optimizations by Temporal Logic — David Lacey David.Lacey@ comlab.ox.ac.uk University of Oxford Neil D. Jones neil@diku.dk University of Copenhagen Eric Van Wyk Eric.Van.Wyk@ comlab.ox.ac.uk University of Oxford Carl Christian Frederiksen xeno@diku.dk University of Copenhagen 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 ‚ow. Its reading: If the current program contains an instruction of form I at some control point p, and if ‚ow condition is satis ed 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. and is the result of transforming it, a induction relation is established between the computations of and . A consequence is that if TI - Proving correctness of compiler optimizations by temporal logic DO - 10.1145/503272.503299 DA - 2002-01-16 UR - https://www.deepdyve.com/lp/association-for-computing-machinery/proving-correctness-of-compiler-optimizations-by-temporal-logic-EQ4xmDg4EE DP - DeepDyve ER -