PatriciaJohann and
EelcoVisser. Fusing Logic and Control with Local Transformations: An Example Optimization. In
Workshop on Reduction Strategies in Rewriting and Programming (WRS'01), volume 57 of
Electronic Notes in Theoretical Computer Science, Utrecht, The Netherlands, May 2001. Elsevier Science Publishers.
Abstract
Abstract programming supports the separation of logical concerns from issues of
control in program construction. While this separation of concerns leads to reduced
code size and increased reusability of code, its main disadvantage is the computa-
tional overhead it incurs. Fusion techniques can be used to combine the reusability
of abstract programs with the eciency of specialized programs.
In this paper we illustrate some of the ways in which rewriting strategies can be
used to separate the denition of program transformation rules from the strategies
under which they are applied. Doing so supports the generic denition of program
transformation components. Fusion techniques for strategies can then be used to
specialize such generic components.
We show how the generic innermost rewriting strategy can be optimized by fusing
it with the rules to which it is applied. Both the optimization and the programs to
which the optimization applies are specied in the strategy language Stratego. The
optimization is based on small transformation rules that are applied locally under
the control of strategies, using special knowledge about the contexts in which the
rules are applied.
Online
CategoryPaper