| J. W. Lloyd, Foundations of Logic Programming, Springer Series in Symbolic Computation, Springer-Verlag, New York, 1984 |
....describes how they relate to other work, and considers future work. Chapter 2 Basic Definitions This chapter provides the background in deductive databases and object oriented databases, which is assumed in the following chapters. The definitions in Section 2. 1 are based on those of Lloyd [77]. The definitions in Section 2.2 are based on those of Atkinson et al. 13] Bertino and Martino [21] and Cattell [31] 2.1 Deductive databases This section provides definitions and reviews research in the areas of deductive databases and logic programming. Deductive databases are closely ....
....and applies the clauses to obtain new facts until all derivable facts have been generated [12] A topdown procedure starts with the goal and verifies the body of the appropriate clauses in order to make the goal true. SLD resolution is a common top down evaluation procedure for definite programs [77]. Optimization techniques make these procedures viable in practice. In particular magic sets [17] focus the procedure on the data relevant to the query for bottom up procedures and tabling [41] eliminates infinite loops when there is recursion in programs for the top down procedures. The ....
[Article contains additional citation context not shown here]
J. W. Lloyd. Foundations of Logic Programming (Second, Extended Edition). Springer Series in Symbolic Computation. Springer-Verlag, New York, 1987.
....Ss) isort(Ns, Ss1) insert(N, Ss1, Ss) insert number into sorted list insert(N, N] insert(N, S.Ss, N.S.Ss) correct insert(N, S.Ss, N.Ss) bug N = S. insert(N, S.Ss0, S. Ss) N S, insert(N, Ss0, Ss) The computation of the wrong answer can be described using a proof tree [Llo84]. Each node in the tree contains an atom which was proved in the computation. If an atom H in a node is derived using the clause instance H : GammaB 1 ; B 2 ; then the children of the node contain the atoms B 1 ; B 2 ; The leaves of a proof tree contain atoms which are instances of facts ....
John W. Lloyd. Foundations of logic programming. Springer series in symbolic computation. Springer-Verlag, New York, 1984.
....Ss1, Ss) insert number into sorted list insert(N, N] insert(N, S.Ss, N.S.Ss) Gamma correct insert(N, S.Ss, N.Ss) Gamma bug N = S. insert(N, S.Ss0, S. Ss) Gamma N S, insert(N, Ss0, Ss) It is possible to describe the computation of the wrong answer using a proof tree [Llo84]. Each node in the tree contains an atom that was proved in the computation. If an atom H in a node is derived using the clause instance H : GammaB 1 ; B 2 ; then the children of the node contain the atoms B 1 ; B 2 ; The leaves of a proof tree contain atoms that are instances of ....
John W. Lloyd. Foundations of Logic Programming. Springer Series in Symbolic Computation. Springer-Verlag, Berlin, Germany, 1984.
....of the software life cycle. Here our aim is to provide theoretical support which can allow programmers to reason about the correctness of their code more easily. The starting point for this work was declarative debugging of logic programs. The conventional view of the semantics of logic programs [Llo84] and declarative debugging [Sha83] Llo87] is as follows. Every ground atom is either true or false in the intended interpretation of the program. True atoms should succeed and false atoms should fail. Declarative debuggers compare the behaviour of programs with the intended interpretation ....
....semantics, model theoretic semantics and the relationships between them. We make some comments about how negation could be handled before concluding. 2 Previous approaches to semantics 2. 1 Traditional untyped semantics The traditional approach to the semantics of logic programs, described in [Llo84], includes model theory, fixpoint theory and an operational semantics. Here we just discuss the theory as it applies to successful computations using Horn Clauses. That is, we do not deal with failure or negation, which lead to significant additional complication and various conflicting proposed ....
[Article contains additional citation context not shown here]
John W. Lloyd. Foundations of logic programming. Springer series in symbolic computation. Springer-Verlag, New York, 1984.
....modes. 5.1 Parametric polymorphic modes Determining if a set M is a superset of the success set is undecidable in general. Our polymorphic mode checking algorithm is based on the sufficient condition that M SS(P ) if M T P (M ) where T P is the immediate consequence operator for the program [Llo84]. That is, it checks M (the set of ground atoms defined by the mode declarations) is a model of the program. Mergesort with [ replaced with and the breadth first traversal code with = replaced by = are well moded in the sense that M SS(P ) However, the mode sets are not models: M 6 T ....
John W. Lloyd. Foundations of logic programming. Springer series in symbolic computation. Springer-Verlag, New York, 1984.
....technique. Furthermore, unlike the general class of modularly stratified programs, recognizing these programs is a solvable problem. 2 Terminology Where possible, we usually use the standard terminology and definitions for logic programs and deductive databases similar to those found in Lloyd [19] and in Ullman [29, 30] The terminology and definitions used for aggregates are the same as those given in [13] which was, in turn, based on work done by others on the semantics of negation (cf. 31] and aggregates (cf. 22] 2.1 Common notation and terminology We use the following ....
J.W. Lloyd. Foundations of logic programming. Springer Series in Symbolic Computation. Springer Verlag, New York, second edition, 1987.
....the work in the paper of the same title presented at the Second ICLP Workshop on deductive databases, June 1994, pages 143 158. 2 Terminology Where possible, we usually use the standard terminology and definitions for logic programs and deductive databases similar to those found in Lloyd [9] and in Ullman [14, 15] The terminology and definitions used for aggregates are the same as those given in [6] which was, in turn, based on work done by others on the semantics of negation and aggregates (such as [17] and [11] In some of our examples, program rules might contain expressions ....
J.W. Lloyd. Foundations of logic programming. Springer Series in Symbolic Computation. Springer Verlag, New York, second edition, 1987.
....M a model of comp(P ) If SLDNF resolution of P [f Gg terminates normally for all solutions, with computed answer substitutions f 1 ; 2 ; N g then these are the only instances of G which are true in M . Proof This theorem is closely related to the soundness of SLDNF resolution (see [Llo87]) which is the basis of our proof. Suppose N = 0: G finitely fails. We assume w.l.o.g. that there is a procedure g defined by the clause g G. SLDNF resolution of P [f :gg would succeed so :g must be true in all models (by the soundness of SLDNF resolution) and hence there is no model in ....
John W. Lloyd. Foundations of logic programming (second, extended edition). Springer series in symbolic computation. Springer-Verlag, New York, 1987.
....semantics. This approach is related to work on nonmonotonic reasoning and inheritance networks in artificial intelligence [15] but is more general in that it assumes property (or method) values can be defined by deductive rules. We assume the reader has some knowledge of logic programming [16], deductive databases [8] and object oriented databases [6, 10] For simplicity, we restrict attention to ground answers throughout. For brevity, we omit proofs of our results; these can be found in [11] 2 Syntax In this section we describe our language through an extended example. Our language ....
....model MP of P . 5 Top down evaluation In this section we outline an alternative evaluation procedure which might be more efficient in practice. This top down procedure is based on typed unification and a variant of SLD resolution. The unification procedure is similar to that described in [16], except that our procedure must deal with a type hierarchy (cf. 12] The resolution procedure differs from SLD resolution as computed answers for each subgoal are computed independently, filtered to eliminate overridden answers, and then combined. In this section we omit variable typings where ....
J. W. Lloyd. Foundations of Logic Programming (Second, Extended Edition). Springer Series in Symbolic Computation. SpringerVerlag, New York, 1987.
....becomes conjunction in the body of the corresponding rule Similarly, when a conjunction occurs on the r.h.s. of a subclass axiom, it becomes conjunction in the head of the corresponding D1 (x) D2 (x) C(x) This is then easily transformed (via the Lloyd Topor transformations [14]) into a pair of def Horn rules: Disjunction (DL A DL class can be formed from a disjunction of existing classes, e.g. C #D. From Figure 4 it can be seen that this corresponds to a disjunction of unary predicates. When a disjunction occurs on the l.h.s. of a subclass axiom it simply ....
J. W. Lloyd. Foundations of logic programming (second, extended edition). Springer series in symbolic computation. Springer-Verlag, New York, 1987.
....axiom, it simply becomes conjunction in the body of the corresponding rule Similarly, when a conjunction occurs on the r.h.s. of a subclass axiom, it becomes conjunction in the head of the corresponding This is then easily transformed (via the Lloyd Topor transformations [18]) into a pair of def Horn rules: Disjunction (DL A DL class can be formed from a disjunction of existing classes, e.g. C #D. From Figure 5 it can be seen that this corresponds to a disjunction of unary predicates. When a disjunction occurs on the Note that, technically, this is ....
J. W. Lloyd. Foundations of logic programming (second, extended edition). Springer series in symbolic computation. Springer-Verlag, New York, 1987.
....a Prolog program is written the programmer intends certain calls to succeed and others to fail. The intended declarative semantics is a formalisation of this. The program is treated as a formula in logic and an intended interpretation assigns the value true or false to each atom of the program [Llo84]. For example, app( a,b] c,d] a,b,c,d] would be assigned true whereas app( a,b] c,d] a,b] would be assigned false, assuming app is interpreted as the predicate for appending lists. Declarative diagnosis algorithms analyse a computation which produced an incorrect result and isolate the bug ....
....than diagnosing wrong answers. Diagnosing a wrong answer involves searching an incorrect proof tree. For missing answers there is no proof tree; there is a complex failed attempt to build a proof tree. An alternative way to compare wrong and missing answer diagnosis is to consider SLD trees [Llo84]. A wrong answer corresponds to a single incorrect branch in an SLD tree whereas a missing answer corresponds to a missing branch in the tree (so the diagnosis algorithm may have to examine the whole tree rather than a single branch) Treatments of missing answer diagnosis normally do not refer to ....
John W. Lloyd. Foundations of logic programming. Springer series in symbolic computation. Springer-Verlag, New York, 1984.
....pairFstadd1SumSnd(A, SPs, S (A Ps) map(snd, SPs, Ps) foldr(compose(plus, fst) 1, SPs, S) Our final example is a different style of meta interpreter. The structure of solvea is based on proof trees. The more traditional way to describe the Prolog proof procedure is with SLD trees [Llo87]. Each node contains a goal. The children of a node are found by resolving the selected literal in the goal with matching program clauses. Prolog uses a depth first search for a path from the root of the SLD tree to a leaf node with an empty goal. The connected predicate defined earlier can be ....
.... In general, a call with plus as an argument will have different answers to a call with converse(plus) surprise(plus, A, B, C) plus(A, B, C) surprise(converse(plus) A, B, C) append(A, B, C) By insisting that syntactic and semantic equality are equivalent, the Clark equality axioms (see [Llo87]) prevent a high level interpretation. Instead we must think at a lower level and interpret plus as a representation of the addition relation. The more abstract view of programs requires a different approach to semantics and restrictions on programs so predicates such as surprise cannot be used. ....
John W. Lloyd. Foundations of logic programming (second, extended edition). Springer series in symbolic computation. Springer-Verlag, New York, 1987.
....pairFstadd1SumSnd(A, SPs, S (A Ps) map(snd, SPs, Ps) foldr(compose(plus, fst) 1, SPs, S) Our nal example is a dioeerent style of meta interpreter. The structure of solvea is based on proof trees. The more traditional way to describe the Prolog proof procedure is with SLD trees [Llo87]. Each node contains a goal. The children of a node are found by resolving the selected literal in the goal with matching program clauses. Prolog uses a depth rst search for a path from the root of the SLD tree to a leaf node with an empty goal. The connected predicate de ned earlier can be ....
.... In general, a call with plus as an argument will have dioeerent answers to a call with converse(plus) surprise(plus, A, B, C) plus(A, B, C) surprise(converse(plus) A, B, C) append(A, B, C) By insisting that syntactic and semantic equality are equivalent, the Clark equality axioms (see [Llo87]) prevent a high level interpretation. Instead we must think at a lower level and interpret plus as a representation of the addition relation. The more abstract view of programs requires a dioeerent approach to semantics and restrictions on programs so predicates such as surprise cannot be used. ....
John W. Lloyd. Foundations of logic programming (second, extended edition). Springer series in symbolic computation. Springer-Verlag, New York, 1987.
No context found.
J. W. Lloyd, Foundations of Logic Programming, Springer Series in Symbolic Computation, Springer-Verlag, New York, 1984
No context found.
J. W. Lloyd. Foundations of logic programming (second, extended edition). Springer series in symbolic computation. Springer-Verlag, New York, 1987.
No context found.
J. W. Lloyd. Foundations of logic programming (second, extended edition). Springer series in symbolic computation. Springer-Verlag, New York, 1987.
No context found.
J. W. Lloyd. Foundations of logic programming (second, extended edition). Springer series in symbolic computation. Springer-Verlag, New York, 1987.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC