A strategy definition
  f(x1,...,xn) = s
defines a strategy operator f with n strategy parameters. An application f(s1,...sn) of this operator is equivalent to
  let x1 = s1 ... xn = sn in s
that is, binding the actual strategy parameters si to the formal parameters xi. Strategy definitions may be recursive.

The RecursionOperator rec can be used to create recursive strategy locally without need to give a name.

  rec x(s)
is equivalent to
  let x = s in x end

Typical examples of strategy definitions are

  try(s) = s <+ id
  repeat(s) = try(s; repeat(s))
  topdown(s) = s; all(topdown(s))

-- EelcoVisser - 08 Jan 2002


CategoryGlossary

Revision: r1.1 - 08 Jan 2002 - 14:06 - EelcoVisser
Stratego > StrategoGlossary > StrategyDefinition
Copyright © 1999-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback