Specialization of Functional Logic Programs
with Dynamic Scheduling
Authors
E. Albert, M. Alpuente, M. Hanus, G. Vidal
Abstract
In this work, we develop a partial evaluation technique for residuating
functional logic programs, which generalize the concurrent computation
models for logic programs with delays to functional logic programs.
We show how to lift the nondeterministic choices from run time to
specialization time. We ascertain the conditions under which the
original and the transformed program have the same answer expressions
for the considered class of queries as well as the same floundering
behavior. All these results are relevant for program optimization in
Curry, a functional logic language which is intended to become a standard
in this area. Preliminary empirical evaluation of the specialized Curry
programs demonstrates that our technique also works well in practice
and leads to substantial performance improvements.
To our knowledge, this work is the first attempt to formally define
and prove correct a general scheme for the partial evaluation of
functional logic programs with delays.