## Logic Programming, Functional Programming, and Inductive Definitions (1991)

Venue: | In Extensions of Logic Programming, volume 475 of LNCS |

Citations: | 10 - 0 self |

### BibTeX

@INPROCEEDINGS{Paulson91logicprogramming,,

author = {Lawrence C. Paulson and Lawrence C. Paulson and Andrew W. Smith and Andrew W. Smith},

title = {Logic Programming, Functional Programming, and Inductive Definitions},

booktitle = {In Extensions of Logic Programming, volume 475 of LNCS},

year = {1991},

pages = {283--310},

publisher = {Springer-Verlag}

}

### OpenURL

### Abstract

Machine. It is incomplete due to depth-first search, but presumably there could be a version using iterative deepening. An OR-parallel machine such as DelPhi [12] could support such languages in future. Functions make explicit the granularity for OR-parallelism: evaluation is deterministic while search is not.

### Citations

964 |
A machine-oriented logic based on the resolution principle
- Robinson
- 1965
(Show Context)
Citation Context ...ins(X,J,V), U>Vs6 Lawrence C. Paulson and Andrew W. Smith 3.1 Logic programs as first-order theories Prolog is descended from Robinson’s resolution principle for proving theorems in first-order logi=-=c [37]. Ev-=-ery clause in a pure Prolog program stands for a first-order formula; we are programming in logic. To illustrate this orthodox view, consider the traditional ‘family relationships’ example: grandp... |

752 |
Structure and Interpretation of Computer Programs
- Abelson, Sussman
- 1996
(Show Context)
Citation Context ...gram — probably the first ever — and it is written in Lisp. A realist functional programmer might use Lisp or ML. These languages support a functional style but do not enforce it. Abelson and Suss=-=man [1]-=- illustrate the realist approach using Scheme, a dialect of Lisp. Many of their examples are purely functional. The realists and the purists share some common ground. Many Lisp and ML programmers stri... |

723 | Predicate Logic as a Programming Language
- Kowalski
- 1974
(Show Context)
Citation Context ...odel, each predicate holds just when it must. The least model is the interesting one, for it corresponds to our intuition that our logic program defines a set of relationships. Van Emden and Kowalski =-=[43]-=- observed that the model-theoretic semantics of a logic program is best given by the least Herbrand model, which is the intersection of all Herbrand models. This coincides with the operational and fix... |

187 |
Contributions to the theory of logic programming
- Apt, Emden
- 1982
(Show Context)
Citation Context ...wise the two sets of arguments are unified. 3. Otherwise one term must be a function application. It is rewritten by narrowing (see later) to some new term, which must unify with the other term. Only =-=(3) d-=-istinguishes this from ordinary unification.sLogic Programming and Inductive Definitions 21 Rewriting A function application is rewritten using a rewrite rule from the function’s definition. In a fu... |

176 |
An Introduction to Inductive Definitions
- Aczel
- 1977
(Show Context)
Citation Context ...set of theorems in a logical system is the least set containing all axioms and closed under all applications of inference rules. As Aczel explains, this is the general form of an inductive definition =-=[2]-=-. What has this to do with logic programming? We can regard a logic program as an inductive definition by taking its clauses as axioms and inference rules. We regard our family relationships database ... |

157 |
Logic for Computer Science: Foundations of Automatic Theorem
- Gallier
- 1986
(Show Context)
Citation Context ...,2,8,6,4,7,1] 6.3 Example: A Propositional calculus theorem prover Wang’s Algorithm for the propositional calculus [32] works by constructing a backwards proof using the rules of the sequent calculu=-=s [21]. -=-The following program also constructs a proof tree. Each label names some sequent calculus rule, such as andl for ∧-left. The subtrees represent proofs of the premises of the rule. This program demo... |

141 |
A polimorphic type system for prolog
- Mycroft, O’Keefe
(Show Context)
Citation Context ...lared as follows: function f (type1 ,type2 ,...) =>> type. For example: function mult(nat,nat) =>> nat. function app(list(A),list(A)) =>> list(A). The type checking scheme follows Mycroft and O’Keef=-=e [35]-=- with a straightforward extension to include function rewrite rules. A typeless version of the language could be envisaged. Type information is required by the built in equality function.sLogic Progra... |

131 |
Negation as Failure Using Tight Derivations for General Logic Programs
- Gelder
- 1989
(Show Context)
Citation Context ...must be acyclic). The database can then be interpreted as an iterated inductive definition (via some treatment of finite failure.) Such databases are called stratified or free from recursive negation =-=[44]-=-. The main stream of (sound) research into negation [34] uses the mathematics of fixedpoints, ordinals, and inductive definitions, not that of classical first-order logic. In different situations, eit... |

126 |
Derivation of logic programs
- Hogger
- 1981
(Show Context)
Citation Context ...lly. We also must find a compiler clever enough to execute interchange(X,I,J,Z) without copying. Perhaps it is unfair to bear down on this little example. But the literature offers few others. Hogger =-=[26] w-=-rites at length about pure logic programs, typically to reverse a list or test for list membership. By comparison, the pure functional programs in Bird and Wadler [7] perform α-β search, construct H... |

104 |
Eqlog: equality, types and generic modules for logic programming
- Goguen, Meseguer
- 1986
(Show Context)
Citation Context ...st be confluent, left-linear, and terminating. In short, the equalities must take the form of function definitions. The model theory of Horn Clauses with equality, as developed by Goguen and Meseguer =-=[22]-=-, conveys no clear picture of what their programs compute. An inductive definition has an intuitive reading as a process generating a set of results using some rules. The function definitions help to ... |

102 | A prolog technology theorem prover: implementation by an extended prolog compiler
- Stickel
- 1988
(Show Context)
Citation Context ...orm A1,...,Am ⊢ B1,...,Bn; a standard Prolog interpreter handles the case where these resemble definite clauses. Many similar proposals have appeared since. Stickel’s Prolog Technology Theorem Pro=-=ver [41]-=- exploits the sophistication of current Prolog implementations. He extends them to full first-order logic using sound unification with occurs check, the model-elimination inference rule, and depth-fir... |

92 |
SLOG: A Logic Programming Language Interpreter Based on Clausal Superposition and Rewriting
- Fribourg
- 1985
(Show Context)
Citation Context ...of lazy narrowing — where a function’s arguments are evaluated only when necessary — in the hope of postponing the discovery that a variable is uninstantiated. Fribourg has dealt with the strict=-= case [18]. Tr-=-eatments of negation and ‘cut’ The cut, written (!), curtails backtracking. Cuts can speed the search exponentially by pruning redundant parts of the search space. Cuts also compensate for impleme... |

85 |
N-Prolog: An extension of Prolog with hypothetical implications
- Gabbay, Reyle
- 1984
(Show Context)
Citation Context ...on-ground answer substitutions directly, not as the set of ground instances. Their language of Generalized Horn Clauses resembles earlier proposals for permitting nested implications in clause bodies =-=[20, 33]-=-, but they obtain a much simpler treatment of free variables by distinguishing assumptions from program clauses. Nested implication falls outside the framework of monotone inductive definitions (as re... |

70 |
A proof-theoretic approach to logic programming. 1. Clauses as rules
- Hallnas, Schroeder-Heister
- 1990
(Show Context)
Citation Context ...dural interpretation of predicate logic ...Some resolution procedures are more clearly understood in terms of deduction, even if deduction and refutation are equivalent. Hallnäs and Schroeder-Heister=-= [25] advance-=- a view of logic programming based on inductive definitions. Calling the traditional view ‘clauses-as-formulae’, they advocate instead ‘clauses-as-rules’: the clauses are a system of inference... |

54 | Natural deduction as higher-order resolution
- Paulson
- 1986
(Show Context)
Citation Context ...d in goals. The full incorporation of function variables would require higher-order equational unification. Our experience with higher-order unification shows that it can be effective in simple cases =-=[36], b-=-ut it also suggests that ambitious applications are impractical. Descriptions Descriptions, or η-terms, call the predicate level from the function level. The term eta(X,G) means ‘some X such that G... |

46 |
The relation between logic and functional languages: a survey
- Bellia, Levi
- 1986
(Show Context)
Citation Context .................................. 25sLogic Programming and Inductive Definitions 3 1 Introduction The unification of logic and functional programming, like the Holy Grail, is sought by countless people =-=[6, 14]-=-. In reporting our attempt, we first discuss the motivation. We argue that logic programming is still immature, compared with functional programming, because few logic programs are both useful and pur... |

42 | A theory of modules for logic programming
- Miller
- 1986
(Show Context)
Citation Context ...on-ground answer substitutions directly, not as the set of ground instances. Their language of Generalized Horn Clauses resembles earlier proposals for permitting nested implications in clause bodies =-=[20, 33]-=-, but they obtain a much simpler treatment of free variables by distinguishing assumptions from program clauses. Nested implication falls outside the framework of monotone inductive definitions (as re... |

28 |
Why Horn formulas matter for computer science: Initial structures and generic examples
- Makowsky
- 1987
(Show Context)
Citation Context .... Makowsky has formalized the least model property in terms of initial structures and generic examples. He shows that Horn clauses are the largest fragment of first-order logic enjoying this property =-=[30]. -=-By regarding logic programs as inductive definitions, we come to the same conclusion at once. Makowsky’s work is rigorous confirmation of our intuitive idea. 4.2 Other work concerning inductive defi... |

26 |
Functional programs as executable specifications
- Turner
- 1985
(Show Context)
Citation Context ... functional languages with no side-effects whatever. David Turner’s presentation to the Royal Society includes quick sort, a topological sort, and a program to find a Knight’s tour of the chess bo=-=ard [42]-=-. He also gives some simple proofs and program derivations. Bird and Wadler [7] give a fuller account of the purist approach; they derive functional programs from formal specifications. Purists avoid ... |

24 |
of the DelPhi parallel inference machine
- Clocksin
- 1987
(Show Context)
Citation Context ... and then into a modified Warren Abstract Machine. It is incomplete due to depth-first search, but presumably there could be a version using iterative deepening. An OR-parallel machine such as DelPhi =-=[12]-=- could support such languages in future. Functions make explicit the granularity for OR-parallelism: evaluation is deterministic while search is not. Acknowledgements. This work was supported by the A... |

21 | LOGLlSP: An alternative to PROLOG - Robinson, Sibert |

18 | The Relation Between Logic Programming and Logic Specification - Kowalski - 1984 |

15 |
Enumerating Outer Narrowing Derivations for Constructor-Based Term Rewriting Systems
- You
- 1989
(Show Context)
Citation Context ... the search because [] and [X3 | app(U3,V)] cannot be unified. This is essentially narrowing, a special case of the paramodulation rule used in unification algorithms for suitable equational theories =-=[46]. Ther-=-e are several implementations [19, 27] and many variations. We have chosen a form of lazy narrowing — where a function’s arguments are evaluated only when necessary — in the hope of postponing t... |

14 |
IDEAL: An Ideal Deductive Applicative Language
- Bosco, Giovannetti
- 1986
(Show Context)
Citation Context ... be the solution. Equational unification treats functions in a natural way, retaining Prolog’s bidirectionality: functions can be inverted. We have implemented such a language; a similar one is Idea=-=l [9]-=-. An inductive view of functions in clauses Viewing logic programs as inductive definitions gives a framework for a logic language with functions. Recall that the inference rules in an inductive defin... |

13 |
The programming language GCLA: A definitional approach to logic programming
- Aronsson, Eriksson, et al.
- 1990
(Show Context)
Citation Context ...head p. If we then are told that p happens to be true, then the body of some introduction rule must also be true. This gives a form of Negation as Failure and non-monotonic reasoning. Aronsson et al. =-=[4]-=- describe the language in more detail and discuss a prototype implementation.sLogic Programming and Inductive Definitions 13 4.3 The language Loglisp Loglisp, by Robinson and Sibert, is one of the ear... |

13 |
An algorithm for unification in equational theories
- Martelli, Moiso, et al.
- 1986
(Show Context)
Citation Context ...pe The interpreter is essentially Prolog with a modified unification algorithm to allow defined functions within terms. The unification algorithm is similar to that given by Martelli, Moiso and Rossi =-=[31]. It-=- effectively uses a selection strategy for narrowing described as ‘outer narrowing’ by You [45, 46]. You describes a matching algorithm; we have extended this to a unification algorithm but have n... |

11 |
Foundation of logic programming based on inductive definition
- Hagiya, Sakurai
- 1984
(Show Context)
Citation Context ...ms as inductive definitions, we come to the same conclusion at once. Makowsky’s work is rigorous confirmation of our intuitive idea. 4.2 Other work concerning inductive definitions Hagiya and Sakura=-=i [23]-=- present a formal system for logic programming, based on the theory of iterative inductive definitions. This system captures the least fixedpoint semantics of a set of clauses and formally justifies N... |

9 |
Programming with full first-order logic
- Bowen
- 1982
(Show Context)
Citation Context ...e with functions. 4.1 Larger fragments of first-order logic If our goal is to program in logic then we should go beyond Horn clauses, aiming ultimately at programming in full first-order logic. Bowen =-=[10] p-=-roposed a complete theorem-prover where programs consist of sequents of the form A1,...,Am ⊢ B1,...,Bn; a standard Prolog interpreter handles the case where these resemble definite clauses. Many sim... |

8 |
Partial Inductive Definitions. Theoretical Computer Science 87
- Hallnäs
- 1991
(Show Context)
Citation Context ... assumptions from program clauses. Nested implication falls outside the framework of monotone inductive definitions (as remarked above) but programs can be understood as partial inductive definitions =-=[24]-=-. Their approach includes a new idea, similar to elimination rules in natural deduction. A predicate p is inductively defined by its set of introduction rules, namely the clauses with head p. If we th... |

7 |
Extended unification algorithms for the integration of functional programming into logic programming
- Dincbas, Hentenryck
- 1987
(Show Context)
Citation Context ...alls. Loglisp leaves such variables unchanged during expression reduction, so the result can depend on the order in which goals are solved. Dincbas and van Hentenryck show how this leads to anomalies =-=[15]. But Lo-=-glisp’s Horn clause interpreter — thanks to a form of best-first search — is complete. Although Prolog’s depth-first search strategy is incomplete, this only matters if the search space is inf... |

7 |
Beyond LogLisp: combining functional and relational programming in a reduction setting
- Robinson
- 1988
(Show Context)
Citation Context ...Loglisp views the clauses as an inductive definition of solution sets; the Lisp half operates on lists of solutions from the Logic half. This resembles Prolog’s setof predicate. Robinson’s later w=-=ork [38]-=- aims to integrate the functional and logic components using a single reduction semantics for both. 4.4 A logic language with functions Though many combined languages have appeared since Loglisp, few ... |

2 |
A two-level approach to logic plus functional programming integration
- Bellia, Bosco, et al.
- 1987
(Show Context)
Citation Context ...(int,int,list(int)). safe(_,_,[]). safe(I,Q,[Q1|B]) :- (I eq abs(Q-Q1))=false, safe(I+1,Q,B). Our interpreter is slow, taking six minutes to find the first three solutions. | ?- solve(queens(8,B)). B==-=[4,2,7,3,6,8,5,1] ;-=- yes B=[5,2,4,7,3,8,6,1] ; B=[3,5,2,8,6,4,7,1] 6.3 Example: A Propositional calculus theorem prover Wang’s Algorithm for the propositional calculus [32] works by constructing a backwards proof using... |

2 |
IDEAL & K-LEAF implementation: A progress report
- Bosco, Cecchi, et al.
- 1989
(Show Context)
Citation Context ...(int,int,list(int)). safe(_,_,[]). safe(I,Q,[Q1|B]) :- (I eq abs(Q-Q1))=false, safe(I+1,Q,B). Our interpreter is slow, taking six minutes to find the first three solutions. | ?- solve(queens(8,B)). B==-=[4,2,7,3,6,8,5,1] ;-=- yes B=[5,2,4,7,3,8,6,1] ; B=[3,5,2,8,6,4,7,1] 6.3 Example: A Propositional calculus theorem prover Wang’s Algorithm for the propositional calculus [32] works by constructing a backwards proof using... |

2 |
A programming calculus based on partial inductive definitions, with an introduction to the theory of partial inductive definitions
- Eriksson, Hallnäs
- 1988
(Show Context)
Citation Context ...then S is some fixedpoint of f. Replacing ↔ by ← picks out the least fixedpoint. These fixedpoints could differ, as they did above. The theory of inductive definitions could lead to better techniq=-=ues [16]-=-. 4 Extended logic programming languages Many extended logic programming languages aim to increase the power of pure declarative programming. Most extensions adopt the first-order logic viewpoint, but... |

1 |
Prolog with simplification, In Programming of Future Generation
- Fribourg
- 1988
(Show Context)
Citation Context ...V)] cannot be unified. This is essentially narrowing, a special case of the paramodulation rule used in unification algorithms for suitable equational theories [46]. There are several implementations =-=[19, 27] and m-=-any variations. We have chosen a form of lazy narrowing — where a function’s arguments are evaluated only when necessary — in the hope of postponing the discovery that a variable is uninstantiat... |

1 |
Rapid prototyping for algebraic specifications — R A P system user’s manual
- Hussmann
- 1985
(Show Context)
Citation Context ...V)] cannot be unified. This is essentially narrowing, a special case of the paramodulation rule used in unification algorithms for suitable equational theories [46]. There are several implementations =-=[19, 27] and m-=-any variations. We have chosen a form of lazy narrowing — where a function’s arguments are evaluated only when necessary — in the hope of postponing the discovery that a variable is uninstantiat... |

1 |
Negation in logic programming
- Shepherson
- 1988
(Show Context)
Citation Context ... first-order logic as the Closed World Assumption, augmenting the database with the negations of all ground atoms that do not hold in the least model. Shepherdson shows how this leads to difficulties =-=[40].-=- First-order logic is simply too weak to characterize the least model. 4 Horn clause logic is even weaker. But the least model can be directly expressed by an inductive definition. 4 By the Skolem-Lö... |

1 |
Solving equations in an equational language
- You
- 1988
(Show Context)
Citation Context ...ctions within terms. The unification algorithm is similar to that given by Martelli, Moiso and Rossi [31]. It effectively uses a selection strategy for narrowing described as ‘outer narrowing’ by =-=You [45, 46]-=-. You describes a matching algorithm; we have extended this to a unification algorithm but have not attempted a proof of correctness. The occurs check during unification could perhaps be omitted by al... |