Arthur Van Dam
Arthur van Dam
Personal Homepage: http://www.eye-home.net
PhD student at Mathematical Institute
Research homepage URL: http://arthur.van-dam.net/twiki/
Thesis Computer Science
Arthur van Dam. Extending Dynamic Rules, An Application Oriented Study Into Stratego’s New Dynamic Rules
. MSc Thesis INF/SCR-04-25. Center for Software Technology, Institute of Information and Computing Sciences, Utrecht University, August 2004. (pdf
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.
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.
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.
The implementation and representation of dynamic rules is sketched, and their qualitative performance is investigated by several benchmarks.