Generic Term Traversal

Stratego -- Strategies for Program Transformation
GenericTermTraversal strategies defined in the StrategoStandardLibrary? can be divided into two main categories:

  • one pass traversals do one (possibly partial) traversal over a term.
  • fixed-point traversals keep traversing a term until no more applications of the specified strategy can be found.

Generic term traversal operators

GenericTermTraversal operators support te definition of GenericTermTraversal strategies like topdown and bottomup. Operators available in Stratego are:

  • one applies a strategy to one direct subterm.
  • some applies a strategy to as much as possible, but a least one, direct subterms.
  • all applies a strategy to all direct subterms of the subject term.

The GenericTermTraversal operators are built-in: they are not defined in Stratego itself. It is however possible to define them in Stratego with even more primitive strategies.

-- MartinBravenboer - 24 Jan 2003