Compiling Multi-Paradigm Declarative Programs into Prolog

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.

[1]  Sergio Antoy Non-Determinism and Lazy Evaluation in Logic Programming , 1991, LOPSTR.

[2]  Michael Hanus,et al.  The Integration of Functions into Logic Programming: From Theory to Practice , 1994, J. Log. Program..

[3]  Gert Smolka,et al.  The Oz Programming Model , 1996, Computer Science Today.

[4]  Corrado Moiso,et al.  Kernel-LEAF: A Logic plus Functional Language , 1991, J. Comput. Syst. Sci..

[5]  Lee Naish,et al.  Negation and Control in Prolog , 1986, Lecture Notes in Computer Science.

[6]  Juan José Moreno-Navarro,et al.  Logic Programming with Functions and Predicates: The Language BABEL , 1992, J. Log. Program..

[7]  Rachid Echahed,et al.  A needed narrowing strategy , 2000, JACM.

[8]  Laurent Fribourg,et al.  Implementation of narrowing: the Prolog-based approach , 1993 .

[9]  Ramin Sadre,et al.  An Abstract Machine for Curry and Its Concurrent Implementation in Java , 1999, J. Funct. Log. Program..

[10]  Pierre Lescanne,et al.  Algebraic and Logic Programming , 1988, Lecture Notes in Computer Science.

[11]  Michael Hanus,et al.  A unified computation model for functional and logic programming , 1997, POPL '97.

[12]  Philip Wadler,et al.  How to declare an imperative , 1997, CSUR.

[13]  Seif Haridi,et al.  Programming Paradigms of the Andorra Kernel Language , 1991, ISLP.

[14]  Salvador Lucas,et al.  UPV-CURRY: An Incremental CURRY Interpreter , 1999, SOFSEM.

[15]  Rita Loogen,et al.  A Demand Driven Computation Strategy for Lazy Narrowing , 1993, PLILP.

[16]  Hugh Glaser,et al.  Principles of Declarative Programming , 1998, Lecture Notes in Computer Science.

[17]  Sergio Antoy Needed Narrowing in Prolog (Extended Abstract) , 1996, PLILP.

[18]  Michael Hanus,et al.  Controlling Search in Declarative Programs , 1998, PLILP/ALP.

[19]  Pierre Deransart,et al.  Programming Languages Implementation and Logic Programming , 1989, Lecture Notes in Computer Science.

[20]  Juan José Moreno-Navarro,et al.  Efficient Compilation of Lazy Narrowing into Prolog , 1992, LOPSTR.

[21]  Michael Hanus,et al.  Distributed Programming in a Multi-Paradigm Declarative Language , 1999, PPDP.

[22]  Sergio Antoy Definitional Trees , 1992, ALP.

[23]  Michael Hanus,et al.  Efficient Translation of Lazy Functional Logic Programs into Prolog , 1995, LOPSTR.

[24]  Vijay A. Saraswat,et al.  Concurrent constraint programming , 1989, POPL '90.

[25]  Christian Prehofer,et al.  Higher-order narrowing with definitional trees , 1999, Journal of Functional Programming.

[26]  William I. Grosky,et al.  SOFSEM 2002: Theory and Practice of Informatics , 2002, Lecture Notes in Computer Science.

[27]  Lee Naish,et al.  Adding equations to NU-Prolog , 1991, PLILP.

[28]  Jan van Leeuwen,et al.  Computer Science Today , 1995, Lecture Notes in Computer Science.

[29]  Christian Prehofer,et al.  Higher-order narrowing with definitional trees , 1999 .

[30]  Simon L. Peyton Jones,et al.  The Implementation of Functional Programming Languages , 1987 .