A general framework for lazy functional logic programming with algebraic polymorphic types

We propose a general framework for first-order functional logic programming, supporting lazy functions, non-determinism and polymorphic datatypes whose data constructors obey a set C of equational axioms. On top of a given C, we specify a program as a set R of C-based conditional rewriting rules for defined functions. We argue that equational logic does not supply the proper semantics for such programs. Therefore, we present an alternative logic which includes C-based rewriting calculi and a notion of model. We get soundness and completeness for C-based rewriting w.r.t. models, existence of free models for all programs, and type preservation results. As operational semantics, we develop a sound and complete procedure for goal solving, which is based on the combination of lazy narrowing with unification modulo C. Our framework is quite expressive for many purposes, such as solving action and change problems, or realizing the GAMMA computation model.

[1]  Daniel Le Métayer,et al.  Programming by multiset transformation , 1993, CACM.

[2]  Robin Milner,et al.  Principal type-schemes for functional programs , 1982, POPL '82.

[3]  Francisco Javier López-Fraguas,et al.  An Approach to Declarative Programming Based on a Rewriting Logic , 1999, J. Log. Program..

[4]  Jesús Manuel Almendros-Jiménez,et al.  Algebraic Semantics for Functional Logic Programming with Polymorphic Order-Sorted Types , 1996, ALP.

[5]  Benjamin C. Pierce,et al.  Basic category theory for computer scientists , 1991, Foundations of computing.

[6]  Jean-Pierre Jouannaud,et al.  Rewrite Systems , 1991, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[7]  Daniel Le Métayer,et al.  The GAMMA Model and Its Discipline of Programming , 1990, Sci. Comput. Program..

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

[9]  Mario Rodríguez-Artalejo,et al.  A Lazy Narrowing Calculus for Functional Logic Programming with Algebraic Polymorphic Types , 1997, ILPS.

[10]  Agostino Dovier,et al.  A Minimality Study for Set Unification , 1997, J. Funct. Log. Program..

[11]  Michael Hanus,et al.  Lazy Narrowing with Simplification , 1997, Comput. Lang..

[12]  Glynn Winskel,et al.  On Powerdomains and Modality , 1985, Theor. Comput. Sci..

[13]  Simon L. Peyton Jones,et al.  Report on the programming language Haskell: a non-strict, purely functional language version 1.2 , 1992, SIGP.

[14]  Narciso Martí-Oliet,et al.  Action and Change in Rewriting Logic , 1999 .

[15]  Michael J. Maher,et al.  A Theory of Complete Logic Programs with Equality , 1984, J. Log. Program..

[16]  H. Hussmann Nondeterminism in Algebraic Specifications and Algebraic Programs , 1993, Progress in Theoretical Computer Science.

[17]  Heinrich Hussmann,et al.  Nondeterminism in Algebraic Specifications and Algebraic Programs , 1993 .

[18]  Heinrich Hußmann Nondeterministic Algebraic Specifications and Nonconfluent Term Rewriting , 1988, ALP.

[19]  John W. Lloyd,et al.  Programming in an Integrated Functional and Logic Language , 1999, J. Funct. Log. Program..

[20]  Steffen Hölldobler,et al.  Foundations of Equational Logic Programming , 1989, Lecture Notes in Computer Science.

[21]  José Meseguer,et al.  Models and Equality for Logical Programming , 1987, TAPSOFT, Vol.1.

[22]  Carl A. Gunter,et al.  Semantic Domains , 1991, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[23]  Jan van Leeuwen,et al.  Handbook of Theoretical Computer Science, Vol. B: Formal Models and Semantics , 1994 .

[24]  Gert Smolka Logic Programming over Polymorphically Order-Sorted Types , 1989 .

[25]  Agostino Dovier,et al.  Minimal Set Unification , 1995, PLILP.

[26]  Zohar Manna,et al.  Proving termination with multiset orderings , 1979, CACM.

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

[28]  Agostino Dovier,et al.  Embedding extensional finite sets in CLP , 1993, ILPS.

[29]  David A. Plaisted,et al.  Programming with Equations, Subsets, and Relations , 1989, NACLP.

[30]  Puri Arenas,et al.  Embedding Multiset Constraints into a Lazy Functional Logic Language , 1998, PLILP/ALP.

[31]  José Meseguer,et al.  Multiparadigm Logic Programming , 1992, ALP.

[32]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[33]  Giorgio Levi,et al.  A Model-Theoretic Reconstruction of the Operational Semantics of Logic Programs , 1993, Inf. Comput..

[34]  Uday S. Reddy,et al.  Narrowing as the Operational Semantics of Functional Languages , 1985, SLP.

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

[36]  Claude Kirchner,et al.  Solving Equations in Abstract Algebras: A Rule-Based Survey of Unification , 1991, Computational Logic - Essays in Honor of Alan Robinson.

[37]  Mario Rodríguez-Artalejo,et al.  A Higher Order Rewriting Logic for Functional Logic Programming , 1997, ICLP.

[38]  Michael Hanus,et al.  The integration of functions into logic programming: a survey , 1994 .

[39]  Bharat Jayaraman Implementation of Subset-Equational Programs , 1992, J. Log. Program..

[40]  Richard S. Bird,et al.  Introduction to functional programming using haskeu , 1998 .

[41]  José Meseguer,et al.  A logical theory of concurrent objects and its realization in the Maude language , 1993 .

[42]  Nachum Dershowitz,et al.  A Rationale for Conditional Equational Programming , 1990, Theor. Comput. Sci..

[43]  Agostino Dovier,et al.  {log}: A Logic Programming Language with Finite Sets , 1991, ICLP.

[44]  Jia-Huai You,et al.  Enumarating Outer Narrowing Derivations for Constructor-Based Term Rewriting Systems , 1989, J. Symb. Comput..

[45]  Razvan Diaconescu,et al.  An overview of CafeOBJ , 1998, WRLA.

[46]  Agostino Dovier,et al.  Integrating Lists, Multisets, and Sets in a Logic Programming Framework , 1996, FroCoS.

[47]  Jesús Manuel Almendros-Jiménez,et al.  Lazy Narrowing with Parametric Order Sorted Types , 1997, ALP/HOA.

[48]  M PaulHudakEt,et al.  Report on the programming language haskell: a non-strict , 1992 .

[49]  Hélène Kirchner,et al.  ELAN: A logical framework based on computational systems , 1996, WRLA.

[50]  Rolf Socher-Ambrosius A Refined Version of General E-Unification , 1994, CADE.

[51]  Michael Hanus,et al.  A Functional and Logic Language with Polymorphic Types (Extended Abstract) , 1990, DISCO.

[52]  Tetsuo Ida,et al.  Lazy Narrowing: Strong Completeness and Eager Variable Elimination , 1996, Theor. Comput. Sci..

[53]  Jean-Marie Hullot,et al.  Canonical Forms and Unification , 1980, CADE.

[54]  Mario Rodríguez-Artalejo,et al.  A Rewriting Logic for Declarative Programming , 1996, ESOP.

[55]  Jean-Marie Jacquet,et al.  Introduction to Logic Programming , 1993, ICLP Workshop on Construction of Logic Programs.

[56]  Agostino Dovier,et al.  A Language for Programming in Logic with Finite Sets , 1996, J. Log. Program..

[57]  Ernesto Pimentel,et al.  Modularity in Functional-Logic Programming , 1997, ICLP.

[58]  Puri Arenas,et al.  A Semantic Framework for Functional Logic Programming with Algebraic Polymorphic Types , 1997, TAPSOFT.

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

[60]  Narciso Martí-Oliet,et al.  Maude: specification and programming in rewriting logic , 2002, Theor. Comput. Sci..

[61]  Michael Thielscher,et al.  Equational Logic Programming Actions, and Change , 1992, JICSLP.

[62]  Heinrich Hußmann,et al.  Nondeterministic Algebraic Specifications and Nonconfluent Term Rewriting , 1992, J. Log. Program..

[63]  Mario Rodríguez-Artalejo,et al.  On the Completeness of Narrowing as the Operational Semantics of Functional Logic Programming , 1992, CSL.