| | |
Summary: Lazy Narrowing and Needed Narrowing:
A Comparison
Mara Alpuente 1 , Moreno Falaschi 2 , Pascual Julian 3 , and German Vidal 1
1 Dep. de Sistemas Informaticos y Computacion, Univ. Politecnica de Valencia.
falpuente,gvidalg@dsic.upv.es
2 Dip. di Matematica e Informatica, Univ. di Udine.
falaschi@dimi.uniud.it
3 Dep. de Informatica, Univ. de Castilla-La Mancha.
pjulian@inf-cr.uclm.es
Abstract. Needed narrowing is a complete and optimal operational
principle for modern declarative languages which integrate the best fea-
tures of (lazy) functional and logic programming. This paper investigates
the formal relation between needed narrowing and another (not so lazy)
demand{driven narrowing strategy which is the basis for popular imple-
mentations of non-strict functional logic languages. We demonstrate that
needed narrowing and demand-driven lazy narrowing are computation-
ally equivalent over the class of uniform programs introduced in [12, 13],
i.e., both strategies compute the same answers and values over this class
of programs. We also introduce a complete renement of demand-driven
lazy narrowing, called uniform lazy narrowing, which is still equivalent
|