1998 · 251 citations · 15 references
ComputingComputer ScienceCompilersOptimizationProgramming LanguagesIntermediate RepresentationProgramming Language DesignIntermediate Representation DesignProgram OptimizationProgram TransformationRewrite SystemsRewriting SystemsTerm RewritingTerm Rewriting Systems
Program transformations are defined by rewrite rules, and rewriting strategies control when and how these rules are applied to achieve desired optimizations. The authors present a language for defining term rewriting strategies and its application to producing program optimizers, extending it to express side‑conditions and contextual rules as strategy‑driven rewrites. The language employs operators such as sequential composition, choice, and recursion to build transformers from labeled unconditional rewrite rules, and its features are expressed by decomposing rewrite rules into primitive matching and building terms in variable‑binding environments, enabling a simple optimizer for an ML‑like intermediate representation. Separating rules from strategies eases reasoning about optimizer behavior, yields a low‑level core language with clear semantics that can be implemented and optimized, and the current implementation generates C code from a strategy specification.
We describe a language for defining term rewriting strategies, and its application to the production of program optimizers. Valid transformations on program terms can be described by a set of rewrite rules; rewriting strategies are used to describe when and how the various rules should be applied in order to obtain the desired optimization effects. Separating rules from strategies in this fashion makes it easier to reason about the behavior of the optimizer as a whole, compared to traditional monolithic optimizer implementations. We illustrate the expressiveness of our language by using it to describe a simple optimizer for an ML-like intermediate representation.The basic strategy language uses operators such as sequential composition, choice, and recursion to build transformers from a set of labeled unconditional rewrite rules. We also define an extended language in which the side-conditions and contextual rules that arise in realistic optimizer specifications can themselves be expressed as strategy-driven rewrites. We show that the features of the basic and extended languages can be expressed by breaking down the rewrite rules into their primitive building blocks, namely matching and building terms in variable binding environments. This gives us a low-level core language which has a clear semantics, can be implemented straightforwardly and can itself be optimized. The current implementation generates C code from a strategy specification.
15
Process algebra for synchronous communication
J.A. Bergstra, Jan Willem Klop · Information and Control · 1984 · 880 citations · Full text
Manuel Clavel, Steven Eker, Per Lincoln et al. · Electronic Notes in Theoretical Computer Science · 1996 · 227 citations · Full text
Sharlit---a tool for building optimizers
Steven Tjiang, John L. Hennessy · 1992 · 95 citations