Aggregation and negation-as-failure

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.

[1]  Serge Abiteboul,et al.  A rule-based language with functions and sets , 1991, TODS.

[2]  Jürgen Dix,et al.  Disjunctive Semantics based upon Partial and Bottom-Up Evaluation , 1995, ICLP.

[3]  Jürgen Dix,et al.  Characterizations of the Disjunctive Well-founded Semantics: Confluent Calculi and Iterated Gcwa , 1997 .

[4]  Catriel Beeri,et al.  Sets and negation in a logic data base language (LDL1) , 1987, PODS.

[5]  Allen Van Gelder,et al.  The well-founded semantics of aggregation , 1992, PODS.

[6]  Jürgen Dix,et al.  A Classification Theory of Semantics of Normal Logic Programs: II. Weak Properties , 1995, Fundam. Informaticae.

[7]  Chandrabose Aravindan,et al.  Partial Deduction of Logic Programs wrt Well-Founded Semantics , 1992, ALP.

[8]  Sergio Greco,et al.  Minimum and maximum predicates in logic programming , 1991, PODS '91.

[9]  Kenneth Kunen,et al.  Some Remarks on the Completed Database , 1990, ICLP/SLP.

[10]  J. W. Lloyd,et al.  Foundations of logic programming; (2nd extended ed.) , 1987 .

[11]  Teodor C. Przymusinski,et al.  Semantic Issues in Deductive Databases and Logic Programs , 1990 .

[12]  Peter J. Stuckey,et al.  Semantics of Logic Programs with Aggregates , 1991, ISLP.

[13]  Alexandre Lefebvre Towards an efficient evaluation of recursive aggregates in deductive databases , 2009, New Generation Computing.

[14]  Mauricio Osorio,et al.  Partial Order Programming (Revisited) , 1995, AMAST.

[15]  Jürgen Dix,et al.  A Framework for Representing and Characterizing Semantics of Logic Programs , 1992, KR.

[16]  Mengchi Liu,et al.  Relationlog: A Typed Extension to Datalog with Sets and Tuples , 1998, J. Log. Program..

[17]  Kenneth A. Ross,et al.  Monotonic aggregation in deductive databases , 1992, J. Comput. Syst. Sci..

[18]  Teodor C. Przymusinski On the Declarative Semantics of Deductive Databases and Logic Programs , 1988, Foundations of Deductive Databases and Logic Programming..

[19]  Nikolay Pelov,et al.  Semantics of logic programs with aggregates , 2004 .

[20]  John Wylie Lloyd,et al.  Foundations of Logic Programming , 1987, Symbolic Computation.

[21]  Bharat Jayaraman,et al.  Set Constructors, Finite Sets, and Logical Semantics , 1999, J. Log. Program..

[22]  Carlo Zaniolo,et al.  Stable models and non-determinism in logic programs with negation , 1990, PODS.

[23]  John S. Schlipf Formalizing a logic for logic programming , 2005, Annals of Mathematics and Artificial Intelligence.

[24]  Jürgen Dix,et al.  A Classification Theory of Semantics of Normal Logic Programs: I. Strong Properties , 1995, Fundam. Informaticae.

[25]  J. Lloyd Foundations of Logic Programming , 1984, Symbolic Computation.

[26]  Divesh Srivastava,et al.  Extending the Well-Founded and Valid Semantics for Aggregation , 1993, ILPS.

[27]  Kyonghee Moon Implementation of subset logic languages , 1997 .

[28]  Kenneth A. Ross,et al.  The well-founded semantics for general logic programs , 1991, JACM.