M. Bravenboer, A. van Dam, K. Olmos, and E. Visser. Program Transformation with Scoped Dynamic Rewrite Rules. Fundamenta Informaticae, 69:1--56, 2005. (techrep)

Abstract

The applicability of term rewriting to program transformation is limited by the lack of control over rule application and by the context-free nature of rewrite rules. The first problem is addressed by languages supporting user-definable rewriting strategies. The second problem is addressed by the extension of rewriting strategies with scoped dynamic rewrite rules. Dynamic rules are defined at run-time and can access variables available from their definition context. Rules defined within a rule scope are automatically retracted at the end of that scope. In this paper we explore the design space of dynamic rules, their application to transformation problems, and their implementation. The technique is formally defined by extending the operational semantics underlying the program transformation language Stratego, and illustrated by means of several program tranformations in Stratego, including constant propagation, bound variable renaming, dead code elimination, function inlining, and function specialization.

Revision: r1.3 - 02 Sep 2005 - 12:09 - EelcoVisser
Stratego > StrategoPublications > ProgramTransformationWithScopedDynamicRewriteRules
Copyright © 1999-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback