Skip to main content Accessibility help
×
Home

Specialization of functional logic programs based on needed narrowing

  • MARÍA ALPUENTE (a1), SALVADOR LUCAS (a1), GERMÁN VIDAL (a1) and MICHAEL HANUS (a2)

Abstract

Many functional logic languages are based on narrowing, a unification-based goal-solving mechanism which subsumes the reduction mechanism of functional languages and the resolution principle of logic languages. Needed narrowing is an optimal evaluation strategy which constitutes the basis of modern (narrowing-based) lazy functional logic languages. In this work, we present the fundamentals of partial evaluation in such languages. We provide correctness results for partial evaluation based on needed narrowing and show that the nice properties of this strategy are essential for the specialization process. In particular, the structure of the original program is preserved by partial evaluation and, thus, the same evaluation strategy can be applied for the execution of specialized programs. This is in contrast to other partial evaluation schemes for lazy functional logic programs which may change the program structure in a negative way. Recent proposals for the partial evaluation of declarative multi-paradigm programs use (some form of) needed narrowing to perform computations at partial evaluation time. Therefore, our results constitute the basis for the correctness of such partial evaluators.

Copyright

Footnotes

Hide All
A preliminary short version of this paper appeared in the Proceedings of the International Conference on Functional Programming (ICFP'99), pp. 273–283, Paris, 1999. This work has been partially supported by CICYT TIC2001-2705-C03-01, by MCYT under grant HA2001-0059, and by the German Research Council (DFG) under grant Ha 2457/1-2.

Footnotes

Keywords

Related content

Powered by UNSILO

Specialization of functional logic programs based on needed narrowing

  • MARÍA ALPUENTE (a1), SALVADOR LUCAS (a1), GERMÁN VIDAL (a1) and MICHAEL HANUS (a2)

Metrics

Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed.