Results 1  10
of
44
Building Program Optimizers with Rewriting Strategies
 Proceedings of the International Conference on Functional Programming (ICFP'98
, 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 ..."
Abstract

Cited by 111 (32 self)
 Add to MetaCart
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 MLlike 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 sideconditions and contextual rules that arise in realistic optimizer specifications can themselves be expressed as strategydriven 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 lowlevel 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.
An Overview of ELAN
, 1998
"... This paper presents a comprehensive introduction to the ELAN rulebased programming language. We describe the main features of the language, the ELAN environment, and introduce bibliographic references to various papers addressing foundations, implementation and applications of ELAN. 1 Introduction ..."
Abstract

Cited by 102 (24 self)
 Add to MetaCart
This paper presents a comprehensive introduction to the ELAN rulebased programming language. We describe the main features of the language, the ELAN environment, and introduce bibliographic references to various papers addressing foundations, implementation and applications of ELAN. 1 Introduction The ELAN system [18] provides an environment for specifying and prototyping deduction systems in a language based on rules controlled by strategies. Its purpose is to support the design of theorem provers, logic programming languages, constraints solvers and decision procedures and to offer a modular framework for studying their combination. ELAN takes from functional programming the concept of abstract data types and the function evaluation principle based on rewriting. But rewriting is inherently nondeterministic since several rules can be applied at different positions in a same term, and in ELAN, a computation may have several results. This aspect is taken into account through choice...
ELAN from a rewriting logic point of view
 Theoretical Computer Science
, 2002
"... ELAN implements computational systems, a concept that combines two first class entities: rewrite rules and rewriting strategies. ELAN can be used either as a logical framework or to describe and execute deterministic as well as nondeterministic rule based processes. With the general goal to make pr ..."
Abstract

Cited by 53 (5 self)
 Add to MetaCart
ELAN implements computational systems, a concept that combines two first class entities: rewrite rules and rewriting strategies. ELAN can be used either as a logical framework or to describe and execute deterministic as well as nondeterministic rule based processes. With the general goal to make precise a rewriting logic based semantics of ELAN, this paper has three contributions: a presentation of the concepts of rules and strategies available in ELAN, an expression of rewrite rules with matching conditions in conditional rewriting logic, and finally an enrichment mechanism of a rewrite theory into a strategy theory in conditional rewriting logic.
Tom: Piggybacking Rewriting on Java
, 2007
"... We present the Tom language that extends Java with the purpose of providing high level constructs inspired by the rewriting community. Tom furnishes a bridge between a general purpose language and higher level specifications that use rewriting. This approach was motivated by the promotion of rewriti ..."
Abstract

Cited by 41 (6 self)
 Add to MetaCart
We present the Tom language that extends Java with the purpose of providing high level constructs inspired by the rewriting community. Tom furnishes a bridge between a general purpose language and higher level specifications that use rewriting. This approach was motivated by the promotion of rewriting techniques and their integration in large scale applications. Powerful matching capabilities along with a rich strategy language are among Tom’s strong points, making it easy to use and competitive with other rule based languages.
Rewriting With Strategies In ELAN: A Functional Semantics
, 1999
"... In this work, we consider term rewriting from a functional point of view. A rewrite rule is a function that can be applied to a term using an explicit application function. From this starting point, we show how to build more elaborated functions, describing first rewrite derivations, then sets of d ..."
Abstract

Cited by 41 (10 self)
 Add to MetaCart
In this work, we consider term rewriting from a functional point of view. A rewrite rule is a function that can be applied to a term using an explicit application function. From this starting point, we show how to build more elaborated functions, describing first rewrite derivations, then sets of derivations. These functions, that we call strategies, can themselves be defined by rewrite rules and the construction can be iterated leading to higherorder strategies. Furthermore, the application function is itself defined using rewriting in the same spirit. We present this calculus and study its properties. Its implementation in the ELAN language is used to motivate and exemplify the whole approach. The expressiveness of ELAN is illustrated by examples of polymorphic functions and strategies.
Process and Term Tile Logic
, 1998
"... In a similar way as 2categories can be regarded as a special case of double categories, rewriting logic (in the unconditional case) can be embedded into the more general tile logic, where also sideeffects and rewriting synchronization are considered. Since rewriting logic is the semantic basis o ..."
Abstract

Cited by 34 (25 self)
 Add to MetaCart
In a similar way as 2categories can be regarded as a special case of double categories, rewriting logic (in the unconditional case) can be embedded into the more general tile logic, where also sideeffects and rewriting synchronization are considered. Since rewriting logic is the semantic basis of several language implementation efforts, it is useful to map tile logic back into rewriting logic in a conservative way, to obtain executable specifications of tile systems. We extend the results of earlier work by two of the authors, focusing on some interesting cases where the mathematical structures representing configurations (i.e., states) and effects (i.e., observable actions) are very similar, in the sense that they have in common some auxiliary structure (e.g., for tupling, projecting, etc.). In particular, we give in full detail the descriptions of two such cases where (net) processlike and usual term structures are employed. Corresponding to these two cases, we introduce two ca...
Strategic Pattern Matching
 Rewriting Techniques and Applications (RTA'99
, 1999
"... Stratego is a language for the specification of transformation rules and strategies for applying them. The basic actions of transformations are matching and building instantiations of firstorder term patterns. The language supports concise formulation of generic and data typespecific term traversa ..."
Abstract

Cited by 34 (7 self)
 Add to MetaCart
Stratego is a language for the specification of transformation rules and strategies for applying them. The basic actions of transformations are matching and building instantiations of firstorder term patterns. The language supports concise formulation of generic and data typespecific term traversals. One of the unusual features of Stratego is the separation of scope from matching, allowing sharing of variables through traversals. The combination of firstorder patterns with strategies forms an expressive formalism for pattern matching. In this paper we discuss three examples of strategic pattern matching: (1) Contextual rules allow matching and replacement of a pattern at an arbitrary depth of a subterm of the root pattern. (2) Recursive patterns can be used to characterize concisely the structure of languages that form a restriction of a larger language. (3) Overlays serve to hide the representation of a language in another (more generic) language. These techniques are illustrated by...
Research Directions in Rewriting Logic
, 1998
"... Rewriting logic expresses an essential equivalence between logic and computation. System states are in bijective correspondence with formulas, and concurrent computations are in bijective correspondence with proofs. Given this equivalence between computation and logic, a rewriting logic axiom of the ..."
Abstract

Cited by 31 (12 self)
 Add to MetaCart
Rewriting logic expresses an essential equivalence between logic and computation. System states are in bijective correspondence with formulas, and concurrent computations are in bijective correspondence with proofs. Given this equivalence between computation and logic, a rewriting logic axiom of the form t \Gamma! t 0 has two readings. Computationally, it means that a fragment of a system 's state that is an instance of the pattern t can change to the corresponding instance of t 0 concurrently with any other state changes; logically, it just means that we can derive the formula t 0 from the formula t. Rewriting logic is entirely neutral about the structure and properties of the formulas/states t. They are entirely userdefinable as an algebraic data type satisfying certain equational axioms. Because of this ecumenical neutrality, rewriting logic has, from a logical viewpoint, good properties as a logical framework, in which many other logics can be naturally represented. And, computationally, it has also good properties as a semantic framework, in which many different system styles and models of concurrent computation and many different languages can be naturally expressed without any distorting encodings. The goal of this paper is to provide a relatively gentle introduction to rewriting logic, and to paint in broad strokes the main research directions that, since its introduction in 1990, have been pursued by a growing number of researchers in Europe, the US, and Japan. Key theoretical developments, as well as the main current applications of rewriting logic as a logical and semantic framework, and the work on formal reasoning to prove properties of specifications are surveyed.
A Survey of Strategies in Program Transformation Systems
 ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE
, 2001
"... Program transformation is used in a wide range of applications including compiler construction, optimization, program synthesis, refactoring, software renovation, and reverse engineering. Complex program transformations are achieved through a number of consecutive modifications of a program. Tra ..."
Abstract

Cited by 28 (2 self)
 Add to MetaCart
Program transformation is used in a wide range of applications including compiler construction, optimization, program synthesis, refactoring, software renovation, and reverse engineering. Complex program transformations are achieved through a number of consecutive modifications of a program. Transformation rules define basic modifications. A transformation strategy is an algorithm for choosing a path in the rewrite relation induced by a set of rules. This paper surveys the support for the definition of strategies in program transformation systems. After a discussion of kinds of program transformation and choices in program representation, the basic elements of a strategy system are discussed and the choices in the design of a strategy language are considered. Several styles of strategy systems as provided in existing languages are then analyzed.
Typed generic traversal with term rewriting strategies
, 2002
"... A typed model of strategic term rewriting is developed. The key innovation is that generic. The calculus traversal is covered. To this end, we define a typed rewriting calculus S ′ γ employs a manysorted type system extended by designated generic strategy types γ. We consider two generic strategy t ..."
Abstract

Cited by 25 (8 self)
 Add to MetaCart
A typed model of strategic term rewriting is developed. The key innovation is that generic. The calculus traversal is covered. To this end, we define a typed rewriting calculus S ′ γ employs a manysorted type system extended by designated generic strategy types γ. We consider two generic strategy types, namely the types of typepreserving and typeunifying strategies. S ′ γ offers traversal combinators to construct traversals or schemes thereof from manysorted and generic strategies. The traversal combinators model different forms of onestep traversal, that is, they process the immediate subterms of a given term without anticipating any scheme of recursion into terms. To inhabit generic types, we need to add a fundamental combinator to lift a manysorted strategy s to a generic type γ. This step is called strategy extension. The semantics of the corresponding combinator states that s is only applied if the type of the term at hand fits, otherwise the extended strategy fails. This approach dictates that the semantics of strategy application must be typedependent to a certain extent. Typed strategic term rewriting with coverage of generic term traversal is a simple but expressive model of generic programming. It has applications in program