Improving Control in Functional Logic
Elvira Albert, María Alpuente, Moreno Falaschi, Pascual
Julián, Germán Vidal
We have recently defined a framework for
Narrowing-driven Partial Evaluation (NPE)
of functional logic programs.
This method is as powerful as partial deduction of
logic programs and positive supercompilation
of functional programs.
Although it is possible to treat complex terms containing primitive functions
(e.g. conjunctions or equations) in the NPE framework,
its basic control mechanisms
do not allow for effective polygenetic specialization of these
We introduce a sophisticated unfolding rule endowed with a
dynamic narrowing strategy which permits flexible
scheduling of the elements (in conjunctions) which are reduced
during specialization. We also present a novel abstraction operator
which carefully considers primitive functions
and is the key to achieving accurate polygenetic
specialization. The abstraction operator
some recent partitioning techniques defined in the framework of
conjunctive partial deduction.
We provide experimental
results obtained from an implementation
using the INDY system
which demonstrate that the control refinements
produce better specializations.
integration of functional and logic programming, lazy narrowing,
polygenetic partial evaluation, term rewriting systems.