Semantics of Logic Programs with Aggregates

We investigate the semantics of aggregates (count, sum, : : :) in logic programs with function symbols and negation. In particular we address the meaning of programs with recursion through aggregation. We extend the two most successful semantic approaches to the problem of recursion through negation, well founded models and stable models, to programs with aggregates. We examine previously deened classes of aggregate programs: aggregate stratiied, group stratiied, magical stratiied, monotonic and closed semi-ring programs and relate our semantics to those previously deened. The well-founded model gives a semantics to all programs containing aggregates, and agrees with two-valued models already deened for aggregate and group stratiied programs. Stable models give a meaning to many programs with aggregation, including all of the above classes, and captures all the models that have been previously deened. Further, there are programs not captured in any previously deened class where the unique stable model agrees with their \intuitive" semantics.

[1]  Catriel Beeri,et al.  On the power of languages for manipulation of complex objects , 1987, VLDB 1987.

[2]  Anthony C. Klug Equivalence of Relational Algebra and Relational Calculus Query Languages Having Aggregate Functions , 1982, JACM.

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

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

[5]  Jeffrey D. Uuman Principles of database and knowledge- base systems , 1989 .

[6]  K. A. Ross Modular stratification and magic sets for DATALOG programs with negation , 1990, PODS 1990.

[7]  Alberto O. Mendelzon,et al.  Low Complexity Aggregation in GraphLog and Datalog , 1990, Theor. Comput. Sci..

[8]  Kenneth A. Ross,et al.  Unfounded sets and well-founded semantics for general logic programs , 1988, PODS.

[9]  Shamim A. Naqvi,et al.  Set Grouping and Layering in Horn Clause Programs , 1987, ICLP.

[10]  Hamid Pirahesh,et al.  The Magic of Duplicates and Aggregates , 1990, VLDB.

[11]  Gultekin Özsoyoglu,et al.  Extending relational algebra and relational calculus with set-valued attributes and aggregate functions , 1987, TODS.

[12]  Adrian Walker,et al.  Towards a Theory of Declarative Knowledge , 1988, Foundations of Deductive Databases and Logic Programming..

[13]  Kenneth Kunen,et al.  Negation in Logic Programming , 1987, J. Log. Program..

[14]  Carlo Zaniolo,et al.  LDL: A Logic-Based Data Language , 1986, VLDB.

[15]  Melvin Fitting,et al.  A Kripke-Kleene Semantics for Logic Programs , 1985, J. Log. Program..