Stratego/XT

Stratego is a modular language for the specification of fully automatic program transformation systems based on the paradigm of rewriting strategies.
Rewrite rules provide a good formalism for specification of basic transformation steps. Since sets of rewrite rules for a programming language are usually not confluent and terminating, standard rewriting techniques are not adequate for program transformation.
Basic transformation steps are defined using labeled conditional rewrite rules. Rules are combined into complete transformations by means of programmable rewriting strategies. An important aspect of these strategies are combinators for generic traversal. Scoped dynamic rewrite rules overcome the limitations posed by the context-free nature of rewrite rules.