The Stratego language for program transformation is based on a strategy-controlled application of basic rewrite rules. These rewrite rules have only local knowledge of the input term they are rewriting. Information gained elsewhere in the transformation of the input tree is unknown. Getting this context information available elsewhere in the transformation will make the rewrite system more specific for its current input, hence more powerful. \ud Dynamic rules are rewrite rules that can be generated at runtime. They may contain specific information aimed at the current input that has just become known. In Stratego 0.10 the dynamic rule system has been completely revised and now offers rule (re-/un-)defining, scoping, refined scoping by scope-labeling, forking followed by intersection or union in controlflow situations, and rule set extending when multiple rules should not redefine each other. \ud \ud The dynamic rule concepts are introduced and illustrated in the context of three case studies: Shrinking inlining in a small lambda calculus, constant propagation in the imperative Tiger language, and deforestation in a first-order functional language. \ud \ud The implementation and representation of dynamic rules is sketched, and their qualitative performance is investigated by several benchmarks. - MSc Thesis INF/SCR-04-25. Center for Software Technology, Institute of Information and Computing Sciences, Utrecht University, August 200
To submit an update or takedown request for this paper, please submit an Update/Correction/Removal Request.