, Volume 17, Issue 3, pp 255-284

Aggregation and negation-as-failure

Rent the article at a discount

Rent now

* Final gross prices may vary according to local VAT.

Get Access


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.

Mauricio J. Osorio G., Ph.D.: He is an Associate Professor in the Department of Computer Systems Engineering, University of the Americas, Puebla, Mexico. He is the Head of the Laboratory of Theoretical Computer Science of the Center of Research (CENTIA), Puebla, Mexico. His research is currently funded by CENTIA and CONACYT (Ref. #C065-E9605). He is interested in Applications of Logic to Computer Science, with special emphasis on Logic Programming. He received his B.Sc. in Computer Science from the Universidad Autonoma de Puebla, his M.Sc. in Electrical Engineering from CINVESTAV in Mexico, and his Ph.D. from the State University of New York at Buffalo in 1995.
Bharat Jayaraman, Ph.D.: He is an Associate Professor in the Department of Computer Science at the State University of New York at Buffalo. He obtained his bachelors degree in Electronics from the Indian Institute of Technology, Madras in 1975, and his Ph.D. from the University of Utah in 1981. His research interests are in Programming Languages and Declarative Modeling of Complex Systems. He has published over 50 research papers. He has served on the program committees of several conferences in the area of Programming Languages, and he is presently on the Editorial Board of the Journal of Functional and Logic Programming.