Building program optimizers with rewriting strategies
@inproceedings{Visser1998BuildingPO, title={Building program optimizers with rewriting strategies}, author={Eelco Visser and Zine-El-Abidine Benaissa and Andrew P. Tolmach}, booktitle={ICFP '98}, year={1998} }
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…
280 Citations
A faithful encoding of programmable strategies into term rewriting systems
- Computer ScienceRTA
- 2015
A generic encoding of classic control and traversal strategies used in rewrite based languages such as Maude, Stratego and Tom into a plain term rewriting system is proposed, proven sound and complete and established termination methods can be applied to analyze the termination of strategy controlled term rewriting systems.
Faithful (meta-)encodings of programmable strategies into term rewriting systems
- Computer ScienceLog. Methods Comput. Sci.
- 2017
This paper proposes a generic encoding of classic control and traversal strategies used in rewrite based languages such as Maude, Stratego and Tom into a plain term rewriting system and shows that the encoding of strategies into term rewriting systems can be easily adapted to handle many-sorted signatures.
Building Interpreters with Rewriting Strategies
- Computer ScienceElectron. Notes Theor. Comput. Sci.
- 2002
Stratego: A Language for Program Transformation Based on Rewriting Strategies
- Computer ScienceRTA
- 2001
Using a standard strategy for normalizing a program with a set of rewrite rules is not adequate for implementing program transformation systems, so restrictions may be necessary to apply a rule only in some phase of a transformation.
Program Transformation with Scoped Dynamic Rewrite Rules
- Computer ScienceFundam. Informaticae
- 2006
The design space of dynamic rules, and their application to transformation problems, are explored by means of several program transformations in Stratego, including constant propagation, bound variable renaming, dead code elimination, function inlining, and function specialization.
Optimizing Pattern Matching Compilation by Program Transformation
- Computer ScienceElectron. Commun. Eur. Assoc. Softw. Sci. Technol.
- 2006
This work designs Tom, a pattern matching layer on top of conventional programming languages to support pattern matching against native data-structures like objects or records, and presents a two-stages approach which first compiles pattern matching constructs in a naive way, and then optimize the resulting code by program transformation using rewriting.
More precise typing of rewrite strategies
- Computer ScienceLDTA
- 2011
This paper introduces fine-grain types to closely approximate the dynamic behavior of rewriting and develops an expressive type system for a core rewriting language to detect certain programming errors statically.
Sion Research Proposal Generation of Program Transformation Systems 0.1 Title Generation of Program Transformation Systems 0.2 Applicants
- Computer Science
A strategy language will be developed allowing concise and modular expression of program transformation strategies and will be compared with several formalisms under development elsewhere and evaluated by using it in three demanding program transformation applications.
First Class Rules and Generic Traversals for Program Transformation Languages
- Computer Science
- 2001
A pure non-strict functional language called RhoStratego is developed, incorporating features from Stratego, and a type system is developed which consists of the Hindley-Milner type system extended with rank-2 polymorphism and typing rules to support generic traversals.
References
SHOWING 1-10 OF 56 REFERENCES
Specification of rewriting strategies
- Computer Science
- 1997
A strategy language is used to control the rewriting of terms using labeled rewrite rules that are formed by means of sequential composition, nondeterministic choice, left choice, fixed point recursion, and two primitives for expressing term traversal.
Pattern-based languages for prototyping of compiler optimizers
- Computer Science
- 1990
This dissertation describes the core tools used in Dora, an environment for exploring the design space of optimizing compilers, and has been used to implement a functional prototype of Frederick Chow's optimizer UOPT.
How to Uniformly Specify Program Analysis and Transformation with Graph Rewrite Systems
- Computer ScienceCC
- 1996
This paper presents a specification method for program analysis and transformation that is implemented prototypically in the optimizer generator OPTIMIX, and uses a simple variant of graph rewrite systems (edge addition rewrite systems).
How to Uniformly Specify Program Analysis and Transformation with Graph Rewrite Systems
- Computer Science
- 1996
The speciication method has been implemented prototypically in the optimizer generator OPTIMIX, which works with arbitrary intermediate languages and generates real-life program analyses and transformations.
From ML to Ada: Strongly-Typed Language Interoperability via Source Translation
- Computer ScienceJ. Funct. Program.
- 1998
A system that supports source-level integration of ML-like functional language code with ANSI C or Ada83 code, and offers simple, efficient, type-safe inter-operation between new functional code components and ‘legacy’ third-generation-language components.
Sharlit—a tool for building optimizers
- Computer SciencePLDI '92
- 1992
Sharlit is presented, a tool to support the construction of modular and extensible global optimizers, and it is shown how Sharlit helps in constructing data-flow analyzers and the transformations that use data- flow analysis information, both are major components of any optimizer.
Shrinking lambda Expressions in Linear Time
- Computer ScienceJ. Funct. Program.
- 1997
This work shows some efficient normalization algorithms that are immediately useful in optimizing compilers; and gives a confluence proof for the system, showing that the choice of normalization algorithm does not affect final code quality.
Compiling with Continuations
- Computer Science
- 1991
This book shows how continuation-passing style is used as an intermediate representation to perform optimizations and program transformations to create practical optimizing compilers for modern languages like ML.