Abstract:
Abstract. Stratego is a language for the specication of transformation rules and strategies for applying them. The basic actions of transformations are matching and building instantiations of rst-order term patterns. The language supports concise formulation of generic and data type-speci c 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 rst-order 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 means of specications in Stratego. 1
Citations
|
192
|
An Overview of �Prolog
– Nadathur, Miller
- 1988
|
|
124
|
Principles of Maude
– Clavel, Eker, et al.
- 1996
|
|
106
|
Building Program Optimizers with Rewriting Strategies
– Visser, Benaissa, et al.
- 1998
|
|
96
|
Views: A way for pattern matching to cohabit with data abstraction
– Wadler
- 1987
|
|
71
|
editors. Language Prototyping. An Algebraic Specification Approach
– Deursen, Heering, et al.
- 1996
|
|
44
|
Implementing regular tree expressions
– Aiken, Murphy
- 1991
|
|
39
|
Controlling Rewriting by Rewriting
– Borovansky, Kirchner, et al.
|
|
27
|
Warm fusion in stratego: A case study in the generation of program transformation systems
– Johann, Visser
- 2000
|
|
27
|
Native Patterns
– Sellink, Verhoef
- 1998
|
|
25
|
Pattern Matching with Abstract Data Types
– Burton, Cameron
- 1993
|
|
23
|
A Core Language for Rewriting
– Visser, Benaissa
|
|
15
|
Abstract value constructors
– Aitken, Reppy
- 1992
|
|
15
|
Implementing computational systems with constraints
– Kirchner, Kirchner, et al.
- 1993
|
|
14
|
Specification of rewriting strategies
– Luttik, Visser
- 1997
|
|
14
|
Views for Standard ML
– Okasaki
- 1998
|
|
11
|
Statically checkable pattern abstractions
– Fahndrich, Boyland
- 1997
|
|
11
|
Pattern-Based Languages for Prototyping of Compiler Optimizers
– Farnum
- 1990
|
|
11
|
The Denotational Semantics of a Functional Tree-Manipulation Language
– Malton
- 1993
|
|
9
|
Active Patterns
– Erwig
- 1996
|
|
7
|
The TXL Programming Language, Version 8
– Cordy, Carmichael, et al.
- 1995
|
|
3
|
de Jong. Ecient annotated terms
– Olivier, A
- 1998
|
|
2
|
Second-order term rewriting speci of static semantics: An exercise
– Heering
- 1996
|
|
2
|
Context patterns, part ii
– Mohnen
- 1997
|