by Elvira Albert, Michael Hanus, Germán Vidal
Journal of Functional and Logic Programming, Vol. 2002, No. 1, 2002
© EAPLS
We present a practical partial evaluation scheme for multi-paradigm declarative languages combining features from functional, logic, and concurrent programming. In contrast to previous approaches, we consider an intermediate representation for programs into which source programs can be automatically translated. The use of this simplified representation, together with the appropriate control issues, make our partial evaluation scheme practically applicable to modern multi-paradigm declarative languages like Curry. An implementation of a partial evaluator for Curry programs has been undertaken. The partial evaluator allows the specialization of programs containing higher-order functions, calls to external functions, concurrent constraints, etc. Our partial evaluation tool is integrated in the PAKCS programming environment for the language Curry as a source-to-source transformation on intermediate programs. The partial evaluator is written in Curry itself. To the best of our knowledge, this is the first purely declarative partial evaluator for a multi-paradigm functional logic language.
Preprint (PDF) BibTeX-Entry