Results 1 - 10
of
23
Stratego: A Language for Program Transformation based on Rewriting Strategies - System Description of Stratego 0.5
- Rewriting Techniques and Applications (RTA’01), volume 2051 of Lecture Notes in Computer Science
, 2001
"... Introduction Program transformation is used in many areas of software engineering. Examples include compilation, optimization, synthesis, refactoring, migration, normalization and improvement [15]. Rewrite rules are a natural formalism for expressing single program transformations. However, using a ..."
Abstract
-
Cited by 120 (12 self)
- Add to MetaCart
Introduction Program transformation is used in many areas of software engineering. Examples include compilation, optimization, synthesis, refactoring, migration, normalization and improvement [15]. Rewrite rules are a natural formalism for expressing single program transformations. However, using a standard strategy for normalizing a program with a set of rewrite rules is not adequate for implementing program transformation systems. It may be necessary to apply a rule only in some phase of a transformation, to apply rules in some order, or to apply a rule only to part of a program. These restrictions may be necessary to avoid non-termination or to choose a specific path in a non-confluent rewrite system. Stratego is a language for the specification of program transformation systems based on the paradigm of rewriting strategies. It supports the separation of strategies from transformation rules, thus allowing careful control over the application of these rules. As a result of this sepa
A Pretty-Printer for Every Occasion
- Proceedings of the 2nd International Symposium on Constructing Software Engineering Tools (CoSET2000). University of Wollongong
, 2000
"... Tool builders dealing with many di#erent languages, and language designers require sophisticated pretty-print techniques to minimize the time needed for constructing and adapting pretty-printers. We combined new and existing pretty-print techniques in a generic pretty-printer that satisfies modern ..."
Abstract
-
Cited by 27 (10 self)
- Add to MetaCart
Tool builders dealing with many di#erent languages, and language designers require sophisticated pretty-print techniques to minimize the time needed for constructing and adapting pretty-printers. We combined new and existing pretty-print techniques in a generic pretty-printer that satisfies modern pretty-print requirements. Its features include language independence, customization, and incremental pretty-printer generation.
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...
Architectural modifications to deployed software
- Science of Computer Programming
, 2005
"... We discuss the nuts and bolts of industrial large-scale software modification projects. These projects become necessary when system owners of deployed systems hit architectural barriers. The mastery of such projects is key to the extension of the best-before date of businesscritical software assets. ..."
Abstract
-
Cited by 15 (5 self)
- Add to MetaCart
We discuss the nuts and bolts of industrial large-scale software modification projects. These projects become necessary when system owners of deployed systems hit architectural barriers. The mastery of such projects is key to the extension of the best-before date of businesscritical software assets. Our discussion comprises the process for problem analysis, pricing and contracting for such projects, design and implementation of tools for code exploration and code modification, as well as details of service delivery. We illustrate these concerns by way of a real-world example where a deployed management information system required an invasive modification to make the system fit for future use. The chosen project is particularly suited for a complete treatise because of its size (just 90,000 LOC), and the nature of the relevant architectural modification (namely, a form of data expansion). We share the lessons that we learned in this and other architectural modification projects.
A Rule-Based Language for Programming Software Updates
- In 3rd ACM SIGPLAN Workshop on Rule-Based Programming
, 2002
"... We describe the design of a rule-based language for expressing changes to Haskell programs in a systematic and reliable way. The update language essentially offers update commands for all constructs of the object language (a subset of Haskell). The update language can be translated into a core calcu ..."
Abstract
-
Cited by 9 (2 self)
- Add to MetaCart
We describe the design of a rule-based language for expressing changes to Haskell programs in a systematic and reliable way. The update language essentially offers update commands for all constructs of the object language (a subset of Haskell). The update language can be translated into a core calculus consisting of a small set of basic updates and update combinators. The key construct of the core calculus is a scope update mechanism that allows (and enforces) update specifications for the definition of a symbol together with all of its uses. The type of an update program is given by the possible type changes it can cause for an object programs. We have developed a typechange inference system to automatically infer type changes for updates. Updates for which a type change can be successfully inferred and that satisfy an additional structural condition can be shown to preserve type correctness of object programs. In this paper we define the Haskell Update Language HULA and give a translation into the core update calculus. We illustrate HULA and its translation into the core calculus by several examples.
The Simply Typed Rewriting Calculus
- In 3rd International Workshop on Rewriting Logic and its Applications
, 2000
"... The rewriting calculus is a rule construction and application framework. As such it embeds in a uniform way term rewriting and lambda-calculus. Since rule application is an explicit object of the calculus, it allows us also to handle the set of results explicitly. We present a simply typed version ..."
Abstract
-
Cited by 8 (5 self)
- Add to MetaCart
The rewriting calculus is a rule construction and application framework. As such it embeds in a uniform way term rewriting and lambda-calculus. Since rule application is an explicit object of the calculus, it allows us also to handle the set of results explicitly. We present a simply typed version of the rewriting calculus. With a good choice of the type system, we show that the calculus is type preserving and terminating, i.e. veries the subject reduction and strong normalization properties. 1 Introduction The rewriting calculus [CK99a,CK99b] is a general framework handling explicitly the three notions of rule formation, rule application and rule application result. The rule formation constructor is denoted ! and given two terms like x+ s(y) and s(x +y) it allows us to built the rewrite rule x+ s(y) ! s(x +y). Applying the previous rewrite rule to the top position of the sum 3 + 2 is performed using the application operator denoted [ ]( ) (where 3 is an abbreviation for s(s(s(0)))...
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 ...
Matching Objects Without Language Extension
- Journal of Object Technology
, 2006
"... Pattern matching is a powerful programming concept which has proven its merits in declarative programming. The absence of pattern-matching in object-oriented programming languages is felt especially when tackling source code processing problems. But existing proposals for pattern matching in such la ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
Pattern matching is a powerful programming concept which has proven its merits in declarative programming. The absence of pattern-matching in object-oriented programming languages is felt especially when tackling source code processing problems. But existing proposals for pattern matching in such languages rely on language extension, which makes their adoption overly intrusive. We propose an approach to support pattern matching in mainstream object-oriented languages without language extension. In this approach, a pattern is a first-class entity, which can be created, be passed as argument, and receive method invocations, just like any other object. We demonstrate how our approach can be used in conjunction with existing parser generators to perform pattern matching on various kinds of abstract syntax representation. We elaborate our approach to include concrete syntax patterns, and mixing of patterns and visitors for the construction of sophisticated syntax tree traversals.

