Imperative Program Transformation by Rewriting

David Lacey, Oege de Moor. Imperative Program Transformation by Rewriting. In Reinhard Wilhelm, editor, Compiler Construction, 10th International Conference, CC 2001 Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2001 Genova, Italy, April 2-6, 2001, Proceedings. Volume 2027 of Lecture Notes in Computer Science, pages 52-68, Springer, 2001. [doi]

Abstract

We present a method of specifying standard imperative pro- gram optimisations as a rewrite system. To achieve this we have extended the idea of matching sub-terms in expressions with simple patterns to matching blocks in a control flow graph. In order to express the complex restrictions on the applicability of these rewrites we add temporal logic side conditions. The combination of these features allows a flexible, high level, yet executable specification of many of the transformations found in optimising compilers.