A Partial Evaluation Framework for Curry Programs

by Elvira Albert, María Alpuente, Michael Hanus, Germán Vidal

Proc. of the 6th International Conference on Logic for Programming and Automated Reasoning (LPAR'99), Springer LNCS 1705, pp. 376-395, 1999
© Springer-Verlag

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.

PDF (246 KB) BibTeX-Entry