Results 1 - 10
of
15
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 first-order term patterns. The language supports concise formulation of generic and data type-specific term traversa ..."
Abstract
-
Cited by 33 (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 first-order term patterns. The language supports concise formulation of generic and data type-specific 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 first-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...
Matching Power
- Proceedings of RTA’2001, Lecture Notes in Computer Science, Utrecht (The Netherlands
, 2001
"... www.loria.fr/{~cirstea,~ckirchne,~lliquori} Abstract. In this paper we give a simple and uniform presentation of the rewriting calculus, also called Rho Calculus. In addition to its simplicity, this formulation explicitly allows us to encode complex structures such as lists, sets, and objects. We pr ..."
Abstract
-
Cited by 28 (17 self)
- Add to MetaCart
www.loria.fr/{~cirstea,~ckirchne,~lliquori} Abstract. In this paper we give a simple and uniform presentation of the rewriting calculus, also called Rho Calculus. In addition to its simplicity, this formulation explicitly allows us to encode complex structures such as lists, sets, and objects. We provide extensive examples of the calculus, and we focus on its ability to represent some object oriented calculi, namely the Lambda Calculus of Objects of Fisher, Honsell, and Mitchell, and the Object Calculus of Abadi and Cardelli. Furthermore, the calculus allows us to get object oriented constructions unreachable in other calculi. In summa, we intend to show that because of its matching ability, the Rho Calculus represents a lingua franca to naturally encode many paradigms of computations. This enlightens the capabilities of the rewriting calculus based language ELAN to be used as a logical as well as powerful semantical framework. 1
Warm Fusion in Stratego: A Case Study in Generation of Program Transformation Systems
, 2000
"... Stratego is a domain-specic language for the specication of program transformation systems. The design of Stratego is based on the paradigm of rewriting strategies: user-denable programs in a little language of strategy operators determine where and in what order transformation rules are (automat ..."
Abstract
-
Cited by 22 (13 self)
- Add to MetaCart
Stratego is a domain-specic language for the specication of program transformation systems. The design of Stratego is based on the paradigm of rewriting strategies: user-denable programs in a little language of strategy operators determine where and in what order transformation rules are (automatically) applied to a program. The separation of rules and strategies supports modularity of specications. Stratego also provides generic features for specication of program traversals. In this paper we present a case study of Stratego as applied to a non-trivial problem in program transformation. We demonstrate the use of Stratego in eliminating intermediate data structures from (also known as deforesting) functional programs via the warm fusion algorithm of Launchbury and Sheard. This algorithm has been specied in Stratego and embedded in a fully automatic transformation system for kernel Haskell. The entire system consists of about 2600 lines of specication code, which bre...
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
The Stratego Tutorial
- Institute of Information and Computing Sciences, Universiteit
, 2000
"... Stratego is a language for the specification of transformation rules and... ..."
Abstract
-
Cited by 6 (2 self)
- Add to MetaCart
Stratego is a language for the specification of transformation rules and...
The Stratego Reference Manual
- Utrecht University
, 2000
"... ING FROM PATTERNS WITH OVERLAYS 37 Section: Rules module Stratego-Overlays exports %%sorts Overlay context-free syntax Identifier ("(" {Identifier ","}* ")")? "=" Term -> Overlay {cons("Overlay")} Figure 21: Syntax of overlays 38 Section: Connecting CONNECTING TO THE WORLD THROUGH PRIMITIVES 39 S ..."
Abstract
-
Cited by 5 (3 self)
- Add to MetaCart
ING FROM PATTERNS WITH OVERLAYS 37 Section: Rules module Stratego-Overlays exports %%sorts Overlay context-free syntax Identifier ("(" {Identifier ","}* ")")? "=" Term -> Overlay {cons("Overlay")} Figure 21: Syntax of overlays 38 Section: Connecting CONNECTING TO THE WORLD THROUGH PRIMITIVES 39 Section: Connecting module Stratego-Primitives.sdf exports context-free syntax "prim" "(" String ")" -> Strat Figure 22: Syntax of primitives 40 Section: Related Work REFERENCES TO RELATED WORK The application of Stratego is described in several publications. 41 Section: Related Work BIBLIOGRAPHY ...
Generic type-preserving traversal strategies
- Proc. International Workshop on Reduction Strategies in Rewriting and Programming (WRS 2001), volume SPUPV 2359
, 2001
"... A typed model of strategic rewriting with coverage of generic traversals is developed. The corresponding calculus o ers, for example, a strategy operator 2 (), which applies the argument strategy to all immediate subterms. To provide a typeful model for generic strategies, one has to identify signat ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
A typed model of strategic rewriting with coverage of generic traversals is developed. The corresponding calculus o ers, for example, a strategy operator 2 (), which applies the argument strategy to all immediate subterms. To provide a typeful model for generic strategies, one has to identify signature-independent, that is, generic types. In the present article, we restrict ourselves to TP|the generic type of all T ype-Preserving strategies. TP is easily integrated into a standard manysorted type system for rewriting. To inhabit TP, we need to introduce a (left-biased) type-driven choice operator & ,. The operator applies its left argument (corresponding to a many-sorted strategy) if the type of the given term ts, and the operator resorts to the right argument (corresponding to a generic default) otherwise. This approach dictates that the semantics of strategy application must be type-dependent to a certain extent. 1
From Syntactic Theories to Interpreters: A Specification Language and Its Compilation
- In Nachum Dershowitz and Claude Kirchner, editors, Informal proceedings of the First International Workshop on Rule-Based Programming (RULE 2000
, 2000
"... . Recent years have seen an increasing need of high-level speci cation languages and tools generating code from specications. In this paper, we introduce a specication language, SL, which is tailored to the writing of syntactic theories of language semantics. More speci- cally, the language supports ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
. Recent years have seen an increasing need of high-level speci cation languages and tools generating code from specications. In this paper, we introduce a specication language, SL, which is tailored to the writing of syntactic theories of language semantics. More speci- cally, the language supports specifying primitive notions such as dynamic constraints, contexts, axioms, and inference rules. We also introduce a system which generates interpreters from SL specications. A prototype system is implemented and has been tested on a number of examples, including a syntactic theory for Verilog. 1 Introduction Syntactic theories have been developed to reason about many aspects of modern programming languages[AB97, AFM + 95, LS97, SS99, FLS99]. Having roots in the -calculus, these theories rely on transforming source programs to other source programs. Only the syntax of the programming language is relevant. Experience shows that the development of such theories is error-prone. In orde...
Development of an industrial strength grammar for VDM
, 2005
"... This report describes the development of an industrial strength grammar for the VDM specification language. We present both the development process and its result. The employed methodology can be described as iterative grammar engineering and includes the application of techniques such as grammar me ..."
Abstract
-
Cited by 3 (3 self)
- Add to MetaCart
This report describes the development of an industrial strength grammar for the VDM specification language. We present both the development process and its result. The employed methodology can be described as iterative grammar engineering and includes the application of techniques such as grammar metrication, unit testing, and test coverage analysis. The result is a VDM grammar of industrial strength, in the sense that it is well-tested, it can be used for fast parsing of high volumes of VDM specifications, and it allows automatic generation of support for syntax tree representation, traversal, and interchange. 2 Development of an Industrial Strength Grammar for VDM 1
The Stratego Compiler
- Institute of Information and Computing Sciences, Universiteit
, 1999
"... Software System Families Current research and practical experience suggest that achieving significant progress with respect to software reuse requires a paradigm shift towards modeling and developing software system families rather than individual systems. ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
Software System Families Current research and practical experience suggest that achieving significant progress with respect to software reuse requires a paradigm shift towards modeling and developing software system families rather than individual systems.

