New Generation Computing

, 17:255

Aggregation and negation-as-failure

  • Mauricio Osorio
  • Bharat Jayaraman
Regular papers

DOI: 10.1007/BF03037222

Cite this article as:
Osorio, M. & Jayaraman, B. NGCO (1999) 17: 255. doi:10.1007/BF03037222

Abstract

Set-grouping and aggregation are powerful operations of practical interest in database query languages. An aggregate operation is a function that maps a set to some value, e.g., the maximum or minimum in the set, the cardinality of this set, the summation of all its members, etc. Since aggregate operations are typically non-monotonic in nature, recursive programs making use of aggregate operations must be suitably restricted in order that they have a well-defined meaning. In a recent paper we showed that partial-order clauses provide a well-structured means of formulating aggregate operations with recursion. In this paper, we consider the problem of expressing partial-order programs via negation-as-failure (NF), a well-known non-monotonic operation in logic programming. We show a natural translation of partial-order programs to normal logic programs: Anycost-monotonic partial-order programsP is translated to astratified normal program such that the declarative semantics ofP is defined as the stratified semantics of the translated program. The ability to effect such a translation is significant because the resulting normal programs do not make any explicit use of theaggregation capability, yet they are concise and intuitive. The success of this translation is due to the fact that the translated program is a stratified normal program. That would not be the case for other more general classes of programs thancost-monotonic partial-order programs. We therefore develop in stages a refined translation scheme that does not require the translated programs to be stratified, but requires the use of a suitable semantics. The class of normal programs originating from this refined translation scheme is itself interesting: Every program in this class has a clear intended total model, although these programs are in general neither stratified nor call-consistent, and do not have a stable model. The partial model given by the well-founded semantics is consistent with the intended total model and the extended well founded semantics,WFS+, defines the intended model. Since there is a well-defined and efficient operational semantics for partial-order programs14, 15, 21) we conclude that the gap between expression of a problem and computing its solution can be reduced with the right level of notation.

Keywords

Aggregation Negation-As-Failure Well Founded Semantics Partial Order Clauses Database Query Languages Declarative Programming Deductive Databases 

Copyright information

© Ohmsha, Ltd. and Springer 1999

Authors and Affiliations

  • Mauricio Osorio
    • 1
  • Bharat Jayaraman
    • 2
  1. 1.Departamento de Ingenieria en Sistemas ComputacionalesUniversidad de las AmericasPueblaMexico
  2. 2.Department of Computer Science and EngineeringState University of New York at BuffaloBuffaloU.S.A.

Personalised recommendations