Results 1 -
7 of
7
Typed Generic Traversal With Term Rewriting Strategies
- Journal of Logic and Algebraic Programming
, 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 many-sorted type system extended by designated generic strategy types γ. We consider two generic strategy t ..."
Abstract
-
Cited by 21 (7 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 many-sorted type system extended by designated generic strategy types γ. We consider two generic strategy types, namely the types of type-preserving and type-unifying strategies. S ′ γ offers traversal combinators to construct traversals or schemes thereof from many-sorted and generic strategies. The traversal combinators model different forms of one-step 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 many-sorted 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 type-dependent 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
A Survey of Rewriting Strategies in Program Transformation Systems
- In Workshop on Reduction Strategies in Rewriting and Programming (WRS’01), volume 57 of 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. Transfo ..."
Abstract
-
Cited by 20 (1 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.
Design of the CodeBoost transformation system for domain-specific optimisation of C++ programs
- Third International Workshop on Source Code Analysis and Manipulation (SCAM 2003
, 2003
"... ..."
Rewriting Strategies for Instruction Selection
- Rewriting Techniques and Applications (RTA’02
, 2002
"... Instruction selection (mapping IR trees to machine instructions) can be expressed by means of rewrite rules. Typically, such sets of rewrite rules are highly ambiguous. Therefore, standard rewriting engines based on fixed, exhaustive strategies are not appropriate for the execution of instructio ..."
Abstract
-
Cited by 11 (9 self)
- Add to MetaCart
Instruction selection (mapping IR trees to machine instructions) can be expressed by means of rewrite rules. Typically, such sets of rewrite rules are highly ambiguous. Therefore, standard rewriting engines based on fixed, exhaustive strategies are not appropriate for the execution of instruction selection. Code generator generators use special purpose implementations employing dynamic programming. In this paper we show how rewriting strategies for instruction selection can be encoded concisely in Stratego, a language for program transformation based on the paradigm of programmable rewriting strategies. This embedding obviates the need for a language dedicated to code generation, and makes it easy to combine code generation with other optimizations.
Building Interpreters with Rewriting Strategies
- Workshop on Language Descriptions, Tools and Applications (LDTA’02), volume 65/3 of Electronic Notes in Theoretical Computer Science
, 2002
"... Programming language semantics based on pure rewrite rules suers from the gap between the rewriting strategy implemented in rewriting engines and the intended evaluation strategy. This paper shows how programmable rewriting strategies can be used to implement interpreters for programming languages b ..."
Abstract
-
Cited by 11 (7 self)
- Add to MetaCart
Programming language semantics based on pure rewrite rules suers from the gap between the rewriting strategy implemented in rewriting engines and the intended evaluation strategy. This paper shows how programmable rewriting strategies can be used to implement interpreters for programming languages based on rewrite rules. The advantage of this approach is that reduction rules are rst class entities that can be reused in dierent strategies, even in other kinds of program transformations such as optimizers. The approach is illustrated with several interpreters for the lambda calculus based on implicit and explicit (parallel) substitution, dierent strategies including normalization, eager evaluation, lazy evaluation, and lazy evaluation with updates. An extension with pattern matching and choice shows that such interpreters can easily be extended.
The essence of strategic programming
- Draft
, 2002
"... Abstract. Strategic programming is generic programming with the use of strategies. A strategy is a generic data-processing action which can traverse into heterogeneous data structures while mixing uniform and type-specific behaviour. With strategic programming, one gains full control over the applic ..."
Abstract
-
Cited by 9 (0 self)
- Add to MetaCart
Abstract. Strategic programming is generic programming with the use of strategies. A strategy is a generic data-processing action which can traverse into heterogeneous data structures while mixing uniform and type-specific behaviour. With strategic programming, one gains full control over the application of basic actions, most notably full traversal control. Using a combinator style, traversal schemes can be defined, and actual traversals are obtained by passing the problem-specific ingredients as parameters to suitable schemes. The prime application domain for strategic programming is program transformation and analysis. In this paper, we provide a language-independent definition that generalises over existing incarnations of this idiom in term rewriting, functional programming, and object-oriented programming.
Strategies for Fusing Logic and Control via Local, Application-Specific Transformations
, 2003
"... Abstract programming supports the separation of logical concerns from issues of control in program construction. While this separation of concerns leads to reduced code size and increased reusability of code, its main disadvantage is the computational overhead it incurs. Fusion techniques can be ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
Abstract programming supports the separation of logical concerns from issues of control in program construction. While this separation of concerns leads to reduced code size and increased reusability of code, its main disadvantage is the computational overhead it incurs. Fusion techniques can be used to combine the reusability of abstract programs with the e#ciency of specialized programs.

