| | |
Summary: Needed Narrowing in Prolog
Sergio Antoy
Portland State University
TR 96-2
May 17, 1996
Abstract
We describe the implementation of needed narrowing deployed in a compiler of a
functional-logic language and present a few related concepts and results. Our im-
plementation is obtained by translating rewrite rules into Prolog source code and
optionally applying a set of optimizations to this code. We benchmark the eec-
tiveness of each individual optimization. We show that our implementation is more
eÆcient than all other previously proposed similar implementations. We measure
both execution times, as is customarily done, and memory allocation that turns out
to be a signicant factor. We solve equations using a semi-strict equality relation
that generalizes classic strict equality with sometimes a smaller search space. We
give a new, more declarative and accessible formulation of a denitional tree, a cru-
cial concept of our approach, and we present a simple algorithm to build denitional
trees. We brie
y explore a notion of simplication that is applicable to and some-
times benecial for computations in inductively sequential systems, where classic
simplication is not applicable.
|