Compiling Multi-Paradigm Declarative Programs into Prolog

by Sergio Antoy, Michael Hanus

Proc. of the 3rd International Workshop on Frontiers of Combining Systems (FroCoS 2000), Springer LNCS 1794, pp. 171-185, 2000
© Springer-Verlag

This paper describes a high-level implementation of the concurrent constraint functional logic language Curry. The implementation, directed by the lazy pattern matching strategy of Curry, is obtained by transforming Curry programs into Prolog programs. Contrary to previous transformations of functional logic programs into Prolog, our implementation includes new mechanisms for both efficiently performing concurrent evaluation steps and sharing common subterms. The practical results show that our implementation is superior to previously proposed similar implementations of functional logic languages in Prolog and is competitive w.r.t. lower-level implementations of Curry in other target languages. An noteworthy advantage of our implementation is the ability to immediately employ in Curry existing constraint solvers for logic programming. In this way, we obtain with a relatively modest effort the implementation of a declarative language combining lazy evaluation, concurrency and constraint solving for a variety of constraint systems.

PDF (217 KB) BibTeX-Entry