A Unifying View of Functional and Logic Program Specialization


María Alpuente, Moreno Falaschi, Germán Vidal.


In the last decade, much research effort in programming languages has been devoted to combining the most important declarative paradigms, namely, functional programming (FP) and logic programming (LP). A functional logic programming language allows one to write conventional functional programs as well as LP-like ones. The operational semantics of the integrated language is usually based on narrowing, a combination of unification for parameter passing and reduction as evaluation mechanism. Partial Evaluation techniques have been known for a long time and have been applied to the optimization of functional and logic programs. However, the problem of extending LP or FP partial evaluation techniques for integrated languages is far from trivial, since logical variables in function calls place specific demands that have to be tackled to achieve effective specialization. This article gives a general introduction to the particular problems associated with the PE of functional logic programs, explains why this is important and shows that it is useful to transfer the technology of narrowing into a technique for driving specialization in integrated languages.