Refactoring Strategies

Stratego -- Strategies for Program Transformation

The design of Stratego specifications can be improved by ReFactoring. Here is a list of refactorings. Please add to the list if you use missing refactorings.


  • Extract Strategy: take out a sub-expression from a strategy definition and give a name

  • Extract Rule

  • Inline Strategy

  • Inline Rule

  • Rename Label/operator

  • Translate Strategy Into Rule: a strategy of the form ?t1; s1; ...;!t2 can be replaced by a rule

  • Translate Rule Into Strategy: a rule with trivial lhs and rhs, but complex condition is often better expressed as a strategy (pipeline)

  • Extract Module: place a set of rules and strategies in their own module

Stratego.RefactoringStrategies moved from Stratego.StrategoRefactoring on 29 Apr 2002 - 07:55 by EelcoVisser - put it back