[[EelcoVisser][E. Visser]]. *Scoped dynamic rewrite rules.* In [[Transform.MarkVanDenBrand][M. van den Brand ]]and [[Transform.RakeshVerma][R. Verma]], editors, Rule Based Programming (RULE'01), volume 59/4 of _Electronic Notes in Theoretical Computer Science_. Elsevier Science Publishers, September 2001. ([[http://www.cs.uu.nl/people/visser/ftp/Vis01-rule.pdf][pdf]],[[http://www.cs.uu.nl/people/visser/ftp/Vis01-rule.ps.gz][psgz]]) -----+++ 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. This paper addresses the second problem by extending rewriting strategies with scoped dynamic rewrite rules. Dynamic rules are generated at run-time and can access variables available from their definition context. Rules generated within a rule scope are automatically retracted at the end of that scope. The technique is illustrated by means of several program tranformations: bound variable renaming, function inlining, and dead function elimination. -----+++ Links * [[Dynamic rule]] * [[Dynamic rule semantics]] * [[Dynamic rules rethought]] * [[Dynamic rules related]] ------ Transform.CategoryPaper