Program transformations using temporal logic side conditions

This article describes an approach to program optimization based on transformations, where temporal logic is used to specify side conditions, and strategies are created which expand the repertoire of transformations and provide a suitable level of abstraction. We demonstrate the power of this approach by developing a set of optimizations using our transformation language and showing how the transformations can be converted into a form which makes it easier to apply them, while maintaining trust in the resulting optimizing steps. The approach is illustrated through a transformational case study where we apply several optimizations to a small program.

[1]  D. J. Lacey,et al.  Program transformation using temporal logic specifications , 2003 .

[2]  U. Assmann OPTIMIX—a tool for rewriting and optimizing programs , 1999 .

[3]  Saburo Muroga,et al.  Binary Decision Diagrams , 2000, The VLSI Handbook.

[4]  J. M. Boyle,et al.  Abstract programming and program transformation—an approach to reusing programs , 1989 .

[5]  Sérgio Vale Aguiar Campos,et al.  Symbolic Model Checking , 1993, CAV.

[6]  Kenneth L. McMillan,et al.  Symbolic model checking , 1992 .

[7]  Scott A. Smolka,et al.  Incremental Model Checking in the Modal Mu-Calculus , 1994, CAV.

[8]  Andrew W. Appel,et al.  Modern Compiler Implementation in ML , 1997 .

[9]  Bernhard Steffen,et al.  DFA&OPT-METAFrame: A Tool Kit for Program Analysis and Optimazation , 1996, TACAS.

[10]  Eelco Visser,et al.  Building program optimizers with rewriting strategies , 1998, ICFP '98.

[11]  Lars S. Nyland,et al.  KHEPERA: A System for Rapid Implementation of Domain Specific Languages , 1997, DSL.

[12]  Uwe Aamann Optimix { a Tool for Rewriting and Optimizing Programs , 1998 .

[13]  Deborah Whitfield A unifying framework for optimizing transformations , 1992 .

[14]  Dexter Kozen,et al.  RESULTS ON THE PROPOSITIONAL’p-CALCULUS , 2001 .

[15]  Bernhard Steffen,et al.  Lazy code motion , 1992, PLDI '92.

[16]  Douglas L. Jones,et al.  VISTA: a system for interactive code improvement , 2002, LCTES/SCOPES '02.

[17]  Sorin Lerner,et al.  Automated soundness proofs for dataflow analyses and transformations via local rules , 2005, POPL '05.

[18]  Oege de Moor,et al.  Higher-order matching for program transformation , 2001, Theor. Comput. Sci..

[19]  Uwe Aßmann,et al.  How to Uniformly Specify Program Analysis and Transformation with Graph Rewrite Systems , 1996, CC.

[20]  Oege de Moor,et al.  Incremental Program Analysis via Language Factors , 2002 .

[21]  Reinhard Wilhelm,et al.  OPTRAN - A Language/System for the Specification of Program Transformations: System Overview and Experiences , 1988, CC.

[22]  Aditya Kanade,et al.  Structuring Optimizing Transformations and Proving Them Sound , 2007, COCV@ETAPS.

[23]  Ondrej Lhoták,et al.  Points-to analysis using BDDs , 2003, PLDI '03.

[24]  Simon Peyton Jones,et al.  Playing by the rules: rewriting as a practical optimisation technique in GHC , 2001 .

[25]  Eric Van Wyk,et al.  Compiler Optimization Correctness by Temporal Logic , 2004, High. Order Symb. Comput..

[26]  Eric Van Wyk,et al.  Proving correctness of compiler optimizations by temporal logic , 2002, POPL '02.

[27]  Bernhard Steffen,et al.  Generating Data Flow Analysis Algorithms from Modal Specifications , 1993, Sci. Comput. Program..

[28]  Barbara G. Ryder,et al.  Pointer-induced aliasing: a problem classification , 1991, POPL '91.

[29]  Bernhard Steffen,et al.  Data Flow Analysis as Model Checking , 1990, TACS.

[30]  Tiziana Margaria,et al.  The Fixpoint-Analysis Machine , 1995, CONCUR.

[31]  David A. Padua,et al.  Advanced compiler optimizations for supercomputers , 1986, CACM.

[32]  C. R. Ramakrishnan,et al.  Practical program analysis using general purpose logic programming systems—a case study , 1996, PLDI '96.

[33]  Steven S. Muchnick,et al.  Advanced Compiler Design and Implementation , 1997 .

[34]  Mark N. Wegman,et al.  Constant propagation with conditional branches , 1985, POPL.

[35]  Steven W. K. Tjiang,et al.  Sharlit—a tool for building optimizers , 1992, PLDI '92.

[36]  Rance Cleaveland,et al.  A linear-time model-checking algorithm for the alternation-free modal mu-calculus , 1993, Formal Methods Syst. Des..

[37]  LaceyDavid,et al.  Program transformations using temporal logic side conditions , 2009 .

[38]  Randal E. Bryant,et al.  Graph-Based Algorithms for Boolean Function Manipulation , 1986, IEEE Transactions on Computers.

[39]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools (2nd Edition) , 2006 .

[40]  Lawrence Charles Paulson,et al.  Isabelle/HOL: A Proof Assistant for Higher-Order Logic , 2002 .

[41]  Mary Lou Soffa,et al.  An Incremental Version of Iterative Data Flow Analysis , 1989, IEEE Trans. Software Eng..

[42]  James R. Cordy,et al.  The TXL Programming Language-Version 10 , 2000 .

[43]  James R. Cordy,et al.  The TXL Programming Language , 1995 .

[44]  Rance Cleaveland,et al.  A linear-time model-checking algorithm for the alternation-free modal mu-calculus , 1993, Formal Methods Syst. Des..

[45]  Reinhold Heckmann,et al.  A Functional Language for the Specification of Complex Tree Transformations , 1988, ESOP.

[46]  Jens Knoop Optimal Interprocedural Program Optimization: A New Framework and Its Application , 1999 .

[47]  Robert Paige,et al.  Viewing A Program Transformation System At Work , 1994, PLILP.

[48]  Oege de Moor,et al.  Higher Order Matching for Program Transformation , 1999, Fuji International Symposium on Functional and Logic Programming.

[49]  Sorin Lerner,et al.  Automatically proving the correctness of compiler optimizations , 2003, PLDI '03.

[50]  Robert E. Tarjan Testing flow graph reducibility , 1973, STOC '73.

[51]  Oege de Moor,et al.  Imperative Program Transformation by Rewriting , 2001, CC.

[52]  Sorin Lerner,et al.  Composing dataflow analyses and transformations , 2002, POPL '02.

[53]  Mary Lou Soffa,et al.  An approach for exploring code improving transformations , 1997, TOPL.

[54]  Markus Müller-Olm,et al.  On the Complexity of Constant Propagation , 2001, ESOP.

[55]  James M. Boyle,et al.  TRANSFORMATIONAL COMPONENT FOR PROGRAMMING LANGUAGE GRAMMAR. , 1970 .

[56]  Monica S. Lam,et al.  Cloning-based context-sensitive pointer alias analysis using binary decision diagrams , 2004, PLDI '04.

[57]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[58]  Robert A. van Engelen,et al.  Efficient Symbolic Analysis for Optimizing Compilers , 2001, CC.

[59]  Laurie Hendren,et al.  Soot: a Java bytecode optimization framework , 2010, CASCON.

[60]  Christopher W. Fraser,et al.  A retargetable compiler for ANSI C , 1991, SIGP.

[61]  Aditya Kanade,et al.  A PVS Based Framework for Validating Compiler Optimizations , 2006, Fourth IEEE International Conference on Software Engineering and Formal Methods (SEFM'06).

[62]  J. Knoop,et al.  Lazy Strength Reduction , 1993 .