16 research outputs found
On completeness of logic programs
Program correctness (in imperative and functional programming) splits in
logic programming into correctness and completeness. Completeness means that a
program produces all the answers required by its specification. Little work has
been devoted to reasoning about completeness. This paper presents a few
sufficient conditions for completeness of definite programs. We also study
preserving completeness under some cases of pruning of SLD-trees (e.g. due to
using the cut).
We treat logic programming as a declarative paradigm, abstracting from any
operational semantics as far as possible. We argue that the proposed methods
are simple enough to be applied, possibly at an informal level, in practical
Prolog programming. We point out importance of approximate specifications.Comment: 20 page
The Finite Stages of Inductive Definitions
. In general, the least fixed point of a positive elementary inductive definition over the Herbrand universe is # 1 1 and has no computational meaning. The finite stages, however, are computable, since validity of equality formulas in the Herbrand universe is decidable. We set up a formal system BID for the finite stages of positive elementary inductive definitions over the Herbrand universe and show that the provably total functions of the system are exactly that of Peano arithmetic. The formal system BID contains the so-called inductive extension of a logic program as a special case. This first-order theory can be used to prove termination and correctness properties of pure Prolog programs, since notions like negation-as-failure and left-termination can be turned into positive inductive definitions. 1 Why inductive definitions over the Herbrand universe? In traditional logic programming, the semantics of a program is always given by the least fixed point of a monotonic operator over the Herbrand universe. The first example is the well-known van Emden-Kowalski operator for definite Horn clause programs in [25]. This operator is defined by a purely existential formula and is therefore continuous. The least fixed point of the operator is recursively enumerable. Moreover, the finite stages of the inductive definition are exactly what is computed by SLD-resolution. In [11], Fitting has generalized the van Emden-Kowalski operator using threevalued logic to programs which may also contain negation in the bodies of the clauses. Although Fitting's operator is still monotonic it is no longer continuous. It follows from Blair [2] and Kunen [14] that the least fixed point of this operator can be # 1 1 -complete and that the closure ordinal can be # CK 1 even for definite Horn..