2,094 research outputs found

    Logic Programming as Constructivism

    Get PDF
    The features of logic programming that seem unconventional from the viewpoint of classical logic can be explained in terms of constructivistic logic. We motivate and propose a constructivistic proof theory of non-Horn logic programming. Then, we apply this formalization for establishing results of practical interest. First, we show that 'stratification can be motivated in a simple and intuitive way. Relying on similar motivations, we introduce the larger classes of 'loosely stratified' and 'constructively consistent' programs. Second, we give a formal basis for introducing quantifiers into queries and logic programs by defining 'constructively domain independent* formulas. Third, we extend the Generalized Magic Sets procedure to loosely stratified and constructively consistent programs, by relying on a 'conditional fixpoini procedure

    Negative non-ground queries in well founded semantics

    Get PDF
    Dissertação apresentada na Faculdade de Ciências e Tecnologia da Universidade Nova de Lisboa para obtenção do grau de Mestre em Computational LogicThe existing implementations of Well Founded Semantics restrict or forbid the use of variables when using negative queries, something which is essential for using logic programming as a programming language. We present a procedure to obtain results under the Well Founded Semantics that removes this constraint by combining two techniques: the transformation presented in [MMNMH08] to obtain from a program its dual and the derivation procedure presented in [PAP+91] to determine if a query belongs or not to the Well Founded Model of a program. Some problems arise during their combination, mainly due to the original environment for which each one was designed: results obtained in the first one obey a variant of Kunen Semantics and non-ground programs are not allowed (or previously grounded) in the second one. Most of these problems were solved by using abductive techniques, which lead us to observe that the existing implementations of abduction in logic programming disallow the use of variables. The reason for that is the impossibility to evaluate non-ground queries, so it seemed interesting to develop an abductive framework making use of our negation system. Both goals are achieved in this thesis: the capability of solving non-ground queries under Well Founded Semantics and the use of variables in abductive logic programming

    The Expressiveness of Locally Stratified Programs

    Get PDF
    This paper completes an investigation of the logical expressibility of finite, locally stratified, general logic programs. We show that every hyperarithmetic set can be computed by a suitably chosen locally stratified logic program (as a set of values of a predicate over its perfect model). This is an optimal result, since the perfect model of a locally stratified program is itself an implicitly definable hyperarithmetic set (under a recursive coding of the Herbrand base); hence to obtain all hyperarithmetic sets requires something new, in this case selecting one predicate from the model. We find that the expressive power of programs does not increase when one considers the programs which have a unique stable model or a total well-founded model. This shows that all these classes of structures (perfect models of locally stratified logic programs, well-founded models which turn out to be total, and stable models of programs possessing a unique stable model) are all closely connected with Kleene\u27s hyperarithmetical hierarchy. Thus, for general logic programming, negation with respect to two-valued logic is related to the hyperarithmetic hierarchy in the same way as Horn logic is to the class of recursively enumerable sets
    corecore