A transformation for implementing on-demand strategy annotations
Authors
María Alpuente, Santiago Escobar, and Salvador Lucas
Abstract
Strategy annotations are used in eager programming languages (e.g.,
OBJ2, OBJ3, CafeOBJ, and Maude) for improving efficiency
and/or reducing the risk of nontermination.
Syntactically, they are given either as lists of natural numbers or as
lists of integers associated to function symbols whose (absolute) values
refer to the arguments of the corresponding symbol. A positive index
enables the evaluation of an argument whereas a negative index means
``evaluate on-demand''. Recently, we have introduced a formal description
of the operational meaning of such on-demand strategy annotations which
improves previous formalizations that were lacking satisfactory computational
properties. Moreover, currently there is no implementation supporting
computations under on-demand strategy annotations. In this paper, we
introduce a program transformation which can be computed automatically,
in such a way that the use of on-demand strategy annotations becomes
possible for programs which are then correctly executed in typical OBJ
interpreters.