Extending Dynamic Rules, An Application Oriented Study Into Stratego’s New Dynamic Rules

Abstract

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. - MSc Thesis INF/SCR-04-25. Center for Software Technology, Institute of Information and Computing Sciences, Utrecht University, August 200

Similar works

Full text

thumbnail-image

Utrecht University Repository

redirect
Last time updated on 14/06/2016

This paper was published in Utrecht University Repository.

Having an issue?

Is data on this page outdated, violates copyrights or anything else? Report the problem now and we will take corresponding actions after reviewing your request.