## A New Perspective on Integrating Functional and Logic Languages (1992)

Venue: | Languages, Proceedings of the 3rd International Conference on Fifth Generation Computer Systems |

Citations: | 16 - 0 self |

### BibTeX

@INPROCEEDINGS{Darlington92anew,

author = {John Darlington and Yi-ke Guo and Helen Pull},

title = {A New Perspective on Integrating Functional and Logic Languages},

booktitle = {Languages, Proceedings of the 3rd International Conference on Fifth Generation Computer Systems},

year = {1992},

pages = {682--693},

publisher = {IOS Press}

}

### OpenURL

### Abstract

Traditionally the integration of functional and logic languages is performed by attempting to integrate their semantic logics in some way. Many languages have been developed by taking this approach, but none manages to exploit fully the programming features of both functional and logic languages and provide a smooth integration of the two paradigms. We propose that improved integrated systems can be constructed by taking a broader view of the underlying semantics of logic programming. A novel integrated language paradigm, Definitional Constraint Programming (DCP), is proposed. DCP generalises constraint logic programming by admitting user-defined functions via a purely functional subsystem and enhances it with the power to solve constraints over functional programs. This constraint approach to integration results in a homogeneous unified system in which functional and logic programming features are combined naturally. 1 Introduction During the past ten years the integration of funct...

### Citations

1627 | The Definition of Standard ML
- Milner, Tofte, et al.
- 1990
(Show Context)
Citation Context ...nstructors and the domain D ! D of all continuous functions. A subdomain A of C (D) : A = B? +C (A) is distinguished as the domain of data terms in the language (which is defined by the eq-type of ML =-=[Mil84]-=-). We use T to denote all complete objects of A. For a functional program, the semantic function P [[]] computes the value of the program in terms of the function D[[]] : Decl ! (Var ! D) ! (Var ! D) ... |

814 | Constraint logic programming
- Jaffar, Lassez
- 1987
(Show Context)
Citation Context .... These two approaches may be combined to form a powerful constraint programming system in which both the domain of discourse and constraint relations are user-definable. The logic programming scheme =-=[JL87]-=-, in which a program is regarded as a relational extension of the Herbrand E-constraint system defined by the equational subprogram, takes this route, although this was not the original semantics of t... |

275 |
Domains for denotational semantics
- Scott
- 1982
(Show Context)
Citation Context ...ture with a nullary constructor [] and a binary constructor :, and functions length and ++ which are defined by recursion equations. The semantics of a functional program is given in the standard way =-=[Sco89]-=-. The semantic domain D of the program is an algebraic CPO which is the minimal solution of the domain equation : D = B? + C (D) +D ! D D contains the domain B? of basic types (real numbers, boolean v... |

179 |
General Logics
- Meseguer
- 1989
(Show Context)
Citation Context ...nventional assumption that a logic program defines a logical theory has been criticized in many circumstances because: "there is no reference to the models that the theory is a linguistic device =-=for" [Mes89]-=-. A logical theory may have many models, however when we are programming we always have a particular intended model in mind. This alternative school of thought regards a program as a linguistic descri... |

171 |
Canonical forms and unification
- Hullot
- 1980
(Show Context)
Citation Context ...am. Another way to restrict the computational explosiveness of general equational deduction is to use equational clauses as directed rewrite rules. A full discussion may be found in [DO88]. Narrowing =-=[Hul80]-=- (resp. conditional narrowing [DO88]) is employed to solve equations in a rewriting system (resp. conditional rewriting system). Many languages have been developed along this line, e.g. RITE [DP86], K... |

114 |
Narrowing as the Operational Semantics of Functional Languages
- Reddy
- 1985
(Show Context)
Citation Context ...of values corresponding to every correctly typed instantiation of its free variables. Narrowing has been proposed as the operational model for computing all possible values of a nonground expressions =-=[Red84]-=-. In the theorem proving context, enumerating narrowing derivations provides a complete E-unification procedure for equational theories defined by convergent rewriting systems. This use of narrowing m... |

92 |
SLOG: A Logic Programming Language Interpreter Based on Clausal Superposition and Rewriting
- Fribourg
- 1985
(Show Context)
Citation Context ...goal directed inference system. Systems which aim to support the full power of Horn clause logic with equality include Eqlog [GM84], which exploits fully the order-sorted variation of the logic, SLOG =-=[Fri85]-=- in which a completion procedure is used as the computational model, and Yukawa's system [Yuk88] which uses an explicit axiomatization of equality. The computational difficulties of constructing a pra... |

73 |
The Definition and Implementation of a Computer Programming Language Based on Constraints
- Steele
- 1980
(Show Context)
Citation Context ...elations are used together to define constraint systems. 3 Constraint Programming In this section, we present a framework for constraint programming which has it origins in the seminal work of Steele =-=[Ste80]-=-. From the mathematical point of view, constraints are associated with well-studied domains in which some privileged predicates, such as equality and various forms of inequalities, are available. Rela... |

72 |
1.4: A non-strict, purely functional language
- Haskell
- 1997
(Show Context)
Citation Context ...that is strongly typed, employs a polymorphic type system and algebraic data types, and supports higher-order functions and lazy evaluation. Examples of such languages are Miranda [Tur85] and Haskell =-=[Com90]-=-. To investigate constraint solving we put aside the statical features of a functional language such as its type system, and concentrate on its dynamic semantics. We use a kernel functional language w... |

59 | Logic Programming over Polymorphically Order-Sorted Types
- Smolka
- 1989
(Show Context)
Citation Context ...ts the flexibility to define Horn clauses over arbitrary domains. Relations become constraints over the domain of discourse, which coincides with the general framework of Constraint Logic Programmings=-=[Smo89]-=-. In this paper, we take this idea one step further by using a functional programming language to define the domain over which relations are defined. A novel definitional constraint programming system... |

50 |
Equational programming
- Dershowitz, Plaisted
- 1988
(Show Context)
Citation Context ...g [Hul80] (resp. conditional narrowing [DO88]) is employed to solve equations in a rewriting system (resp. conditional rewriting system). Many languages have been developed along this line, e.g. RITE =-=[DP86], K-Leaf [-=-EGP86]. They represent enhanced Prolog systems in which a "rewrite" relation is defined over the Herband space. Syntactic restrictions guarantee the confluency of this rewrite relation so th... |

43 |
Models and equality for logical programming
- Goguen, Meseguer
- 1987
(Show Context)
Citation Context ...der equational logic as the semantic logic of functional languages and combine it with Horn clause logic. A comprehensive presentation of the theory of Horn clause logic with equality may be found in =-=[GM87]-=- and [Yuk88]. This shows that for every theory in Horn clause logic with equality, its initial model (called the least Herbrand E-model in [Yuk88], and the least Herbrand model in [Sny90]) always exis... |

28 |
Opening the Prolog III Universe
- Colmerauer
- 1987
(Show Context)
Citation Context ...ced by solving a set of constraints via the underlying solver. Whenever it can be established that the set of constraints is unsolvable, finite failure results. For example, the following CLP program =-=[Col87]-=-: InCap ([], 0) InCap (i :x, c ) :\Gamma InCap (x, 1.1*c - i ) can be used to compute a series of instalments which will repay capital borrowed at a 10% interest rate. The first rule states that there... |

26 | Residuation and Guarded Rules for Constraint Logic Programming
- Smolka
- 1993
(Show Context)
Citation Context ... that the solution set is non-empty, but transforms it to an equivalent, more informative form, from which solutions are easily derived. Such a form is called a solved form. As suggested by Smolka in =-=[Smo91]-=-, constraint solving can be modeled by a rewriting system which simplifies a constraint to its equivalent solved form. Since, in the programming context, we are interested in solving goals, rewriting ... |

24 |
A Proof Theory for General Unification
- Snyder
- 1991
(Show Context)
Citation Context ...y be found in [GM87] and [Yuk88]. This shows that for every theory in Horn clause logic with equality, its initial model (called the least Herbrand E-model in [Yuk88], and the least Herbrand model in =-=[Sny90]-=-) always exists. Crucially, the initial model is the intended model of a logic programming system, since, according to the Herbrand theorem, the model is complete with respect to solving a query. For ... |

21 |
A constraint sequent calculus
- Lassez, McAloon
- 1990
(Show Context)
Citation Context ...nd preferably complete. A sufficient condition for completeness is well-foundness of the solver. This notion of constraint programming is a generalization of the approach of Steele [Ste80] and Lassez =-=[LM89]. Here the constrain-=-t system is assumed to be "built-in" and therefore, "programming" simply means imposing constraints. When designing a constraint programming language it is essential to develop a s... |

15 |
Equality, types, modules, and (why not ?) generics for logic programming
- Goguen, Meseguer
- 1984
(Show Context)
Citation Context ...e computational model was proposed recently by Snyder et. al. [Sny90] as a goal directed inference system. Systems which aim to support the full power of Horn clause logic with equality include Eqlog =-=[GM84]-=-, which exploits fully the order-sorted variation of the logic, SLOG [Fri85] in which a completion procedure is used as the computational model, and Yukawa's system [Yuk88] which uses an explicit axio... |

12 |
Foundation of Logic Programming Based on Inductive Definition
- Hagiya, Sakurai
- 1984
(Show Context)
Citation Context ...is not a first-order theory but a set of relations over the Herbrand space. This view of logic programming has also been taken by researchers wishing to extend Prolog-like systems. Hagiya and Sakurai =-=[MT84]-=- present a formal system for logic programming based on the theory of iterative inductive definitions. A similar approach is taken by Hallnas and Schroeder-Heister to develop the framework of General ... |

10 |
GCLA: a definitional approach to logic programming
- Aronsson, Eriksson, et al.
- 1990
(Show Context)
Citation Context ... for logic programming based on the theory of iterative inductive definitions. A similar approach is taken by Hallnas and Schroeder-Heister to develop the framework of General Horn Clause Programming =-=[AEHK89]-=-. Paulson and Smith proposed an integrated system in which a logic subprogram is regarded as an inductive definition of relations [PS89]. This definitional view of logic programming suggests the flexi... |

10 |
Formal structures for computation and deduction
- Huet
- 1986
(Show Context)
Citation Context ...em 5.1.1 For any expression e and term t, if e ; ffi t, then the corresponding reduction derivation ffie ! t is always a lazy derivation. Such a reduction derivation is called a standard reduction in =-=[Hue86]-=-. Enumerating pattern-driven derivations is optimal and complete in the sense that any other derivation is subsumed by a patterndriven derivation. We conclude that pattern-driven narrowing provides a ... |

10 | Logic programming, functional programming, and inductive definitions
- Paulson, Smith
- 1989
(Show Context)
Citation Context ...r to develop the framework of General Horn Clause Programming [AEHK89]. Paulson and Smith proposed an integrated system in which a logic subprogram is regarded as an inductive definition of relations =-=[PS89]-=-. This definitional view of logic programming suggests the flexibility to define Horn clauses over arbitrary domains. Relations become constraints over the domain of discourse, which coincides with th... |

10 |
a non-strict language with polymorphic types
- Miranda
- 1985
(Show Context)
Citation Context ...functional language that is strongly typed, employs a polymorphic type system and algebraic data types, and supports higher-order functions and lazy evaluation. Examples of such languages are Miranda =-=[Tur85]-=- and Haskell [Com90]. To investigate constraint solving we put aside the statical features of a functional language such as its type system, and concentrate on its dynamic semantics. We use a kernel f... |

9 |
Conditional equational programming and the theory of conditional term rewriting
- Dershowitz, Okada
- 1988
(Show Context)
Citation Context ...quational subprogram. Another way to restrict the computational explosiveness of general equational deduction is to use equational clauses as directed rewrite rules. A full discussion may be found in =-=[DO88]-=-. Narrowing [Hul80] (resp. conditional narrowing [DO88]) is employed to solve equations in a rewriting system (resp. conditional rewriting system). Many languages have been developed along this line, ... |

4 |
Functional Logic Languages, Part 1
- Reddy
- 1986
(Show Context)
Citation Context ... notation, the above constraint may be represented as the set-valued expression: f l1 j l1 ++ l2 = [a1, a2, : : : , an ], length l1 = 10 g Reddy's proposal of "Functional Logic Programming" =-=languages [Red86]-=- also exploits this solving capability in functional programs. However, his description of functional logic programming as functional syntax with logic operational semantics fails to capture the essen... |

3 | The Unification of Functional and Logic Languages - J, Pull - 1986 |

3 | Falcon: Functional And Logic language with CONonstraints--language definition - Guo, Pull - 1991 |

3 |
Logical programming scheme
- Jaffar, Lassez
- 1986
(Show Context)
Citation Context ...and semantic restrictions on the paradigm. They all aim either to restrict the use of, or to weaken, defined equality. An example of the first approach is Jaffer and Lassez's Logic Programming Scheme =-=[JL86]-=-, in which the equality part of a program is defined separately from predicate definitions. A program uses a first-order equational sublanguage to define abstract data types over which a definite clau... |

2 |
Narrowing and Unification in Functional Programming
- Darlington, Guo
- 1989
(Show Context)
Citation Context ...n derivations are lazy should be enumerated. This notion of lazy narrowing is mentioned by Reddy in [Red84]. A lazy narrowing procedure, pattern-driven narrowing, is proposed by Darlington and Guo in =-=[DG89]-=- for evaluating absolute set abstractions. A similar procedure was independently developed by You for constructor based equational programming systems [You88]. Here we present a lazy narrowing model f... |

2 |
Kernel Leaf: An experimental logic plus functional language - its syntax, semantics and computational model. ESPRIT Project 415, Second Year Report
- Giovannetti, Levi, et al.
- 1986
(Show Context)
Citation Context .... conditional narrowing [DO88]) is employed to solve equations in a rewriting system (resp. conditional rewriting system). Many languages have been developed along this line, e.g. RITE [DP86], K-Leaf =-=[EGP86]. They rep-=-resent enhanced Prolog systems in which a "rewrite" relation is defined over the Herband space. Syntactic restrictions guarantee the confluency of this rewrite relation so that equational lo... |

2 |
A classification for the integration of functional and logic languages
- Guo, Lock, et al.
- 1990
(Show Context)
Citation Context ...troduction During the past ten years the integration of functional and logic programming languages has attracted much research. An extensive survey and classification of their results can be found in =-=[GLDD90]. Traditio-=-nally this integration is performed by attempting to integrate the respective semantic logics of functional and logic languages in some way, resulting in a "super logic language". The conven... |

2 |
Gonzalez-Moreno and Mario Rodriguez-Artalejo. A Functional Logic Language with Higher Order Logic Variiables
- Carlos
- 1991
(Show Context)
Citation Context ... in functional languages. In [Pul90], Pull uses unification on data terms as the underlying solver and combines it with lazy narrowing to solve equational constraints in lazy functional languages. In =-=[JCGMRA91]-=-, a more general constraint system over data terms is adopted in which disunification is also exploited to deal with negative equational constraints. This model can be regarded as an instantiation of ... |

2 |
Equation Solving in Lazy Functional Languages
- Pull
- 1990
(Show Context)
Citation Context ...h the underlying constraint system, the scheme provides a complete enhanced solver. The scheme provides a generic model to enhance a constraint system to solve constraints in functional languages. In =-=[Pul90]-=-, Pull uses unification on data terms as the underlying solver and combines it with lazy narrowing to solve equational constraints in lazy functional languages. In [JCGMRA91], a more general constrain... |

2 |
Applicative logic programming
- Yukawa
- 1988
(Show Context)
Citation Context ...nal logic as the semantic logic of functional languages and combine it with Horn clause logic. A comprehensive presentation of the theory of Horn clause logic with equality may be found in [GM87] and =-=[Yuk88]-=-. This shows that for every theory in Horn clause logic with equality, its initial model (called the least Herbrand E-model in [Yuk88], and the least Herbrand model in [Sny90]) always exists. Cruciall... |

1 |
Outer Narrowing for Equational Theories Based on Constructors
- You
- 1988
(Show Context)
Citation Context ...wing, is proposed by Darlington and Guo in [DG89] for evaluating absolute set abstractions. A similar procedure was independently developed by You for constructor based equational programming systems =-=[You88]-=-. Here we present a lazy narrowing model following the constraint solving approach. The model is central to the CFP paradigm. Consider reducing a non-ground expression of form fe by a defining rule ft... |