Effects analysis can further enhance the optimizations performed by the Stratego optimizer. The following questions should be answered by effects analysis:

  • Does the strategy inspect the current term?
  • Does the strategy change the current term?
  • Does the strategy have a side-effect (io, table)?
  • Does the strategy bind variables?
  • Can the strategy fail, or is it guaranteed to succeed?

If the answers to all these questions is no, then the strateg is equivalent to the identity strategy id. In case some answers are no, optimizations may still be possible.

For instance, a sequence (t; s) can be reduced to s if s does not inspect the current term. A generalization of one of the build match fusion laws.

-- EelcoVisser - 17 Aug 2003


ToDo, CategoryToDo?, StrategoOptimization

Revision: r1.3 - 17 Aug 2003 - 12:07 - EelcoVisser
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