Aggregation and negation-as-failure
Rent the article at a discountRent 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.
- Abiteboul, S. and Grumbach, S., “A Rule-Based Language with Functions and Sets,”ACM Trans. on Database Systems, 16, 1, pp. 1–30, 1991. CrossRef
- Aravindam, C. and Dung, P. M., “Partial deduction of Logic Programs wrt Well-Founded Semantics,”New Generation Computing, 13, pp. 45–74, 1994. CrossRef
- Brass, S. and Dix, J., “Disjunctive Semantics based upon Partial and Bottom-Up Evaluation,” inProc. of the 12th International Conf. on Logic Programming (Leon Sterling, ed.), Tokyo, MIT Press, pp. 199–213, Jun. 1995.
- Brass, S. and Dix, J., “Characterizations of the Disjunctive Well-founded Semantics: Confluent Calculi and Iterated GCWA,” to appear inJournal of Automated Reasoning, 1997. Extended abstract appeared in: “Characterizing D-WFS: Confluence and Iterated GCWA,”Logics in Artificial Intelligence, JELIA '96, LNCS 1126, Springer-Verlag, pp. 268–283, 1996.
- Beeri, C. and Naqvi, S. et al, “Sets and Negation in a Logic Database Language (LDL1),” inProc. 6th ACM Symp. on Principles of Database Systems, pp. 21–37, 1987.
- Dix, J., “A framework for representing and characterizing semantics of Logic Programs,” inProc. 3rd International Conf. on Principles of Knowledge Representation and Reasoning, pp. 591–602, 1992.
- Dix, J., “A Classification-Theory of Semantics of Normal Logic Programs: I. Strong Properties,”Fundamenta Informaticae XXII, 3, pp. 227–255, 1995.
- Dix, J., “A Classification-Theory of Semantics of Normal Logic Programs: II. Weak Properties,”Fundamenta Informaticae XXII, 3, pp. 257–288, 1995.
- Dix, J. and Osorio, M., “Towards Well-behaved Semantics Suitable for Aggregation,”Research Report, 11–97, University of Koblenz, Germany. Also,poster paper, ILPS97.
- Dix, J. and Osorio, M., “Provability Closures in Logic Programming,” inProc. International Symp. of Computer Science, Mexico City, Oct. 1997.
- Ganguly, G., Greco, S. and Zaniolo, C., “Minimum and maximum predicates in logic programs,” inProc. 10th ACM Symp. on Principles of Database Systems, pp. 154–163, 1991.
- Gelfond, M. and Lifschitz, V., “The Stable Model Semantics for Logic Programming,” inProc. 5th International Conf. of Logic Programming, Seattle, pp. 1070–1080, Aug. 1988.
- Jana, D. and Jayaraman, B., “Set constructors, Finite Sets, and Logical Semantics,”Journal of Logic Programming, 38, 1, pp. 55–77, 1999. CrossRef
- Jayaraman, B. and Moon, K., “Subset-Logic Programs and Their Implementation,” to appear inJournal of Logic Programming.
- Jayaraman, B., Osorio, M. and Moon, K., “partial Order Programming (revisited),” inProc. Algebraic Methodology and Software Technology, Springer-Verlag, Jul. 1995.
- Kemp, D. B. and Stuckey, P. J., “Semantics of logic programs with aggregates,” inInternational Logic Programming Symp., pp. 387–401, 1991.
- Kunen, K., “Some remarks on the completed database,”Technical Report, 775, Univ. of Wisconsin, Madison, WI, 1988.
- Lefebvre, A., “Towards and Efficient Evaluation of Recursive Aggregates in Deductive Databases,”New Generation Computing, 12, pp. 131–160, 1994.
- Liu, M., “Relationlog: A typed Extension to Datalog with Sets and Tuples,” inProc. International Symp. of Logic Programming, pp. 83–97, 1995.
- Lloyd, J.,Foundations of Logic Programming (2nd ed.), Springer-Verlag, Berlin, 1987.
- Moon, K., “Implementation of Subset Logic Languages,”Ph.D. dissertation, Department of Computer Science, SUNY-Buffalo, 1997.
- Przymusinski, T. C., “On the Declarative Semantics of Stratified Deductive Databases,” inFoundations of Deducive Databases and Logic Programming (J. Minker, ed.), pp. 193–216, 1988.
- Przymusinski, T. C. and Przymusinska, H., “Semantic Issues in Deductive Databases and Logic Programs,” inFormal Techniques in Artificial Intelligence (R. B. Banerji, ed.), pp. 321–367, 1990.
- Ross, K. A. and Sagiv, Y., “Monotonic Aggregation in Deductive Databases,” inProc. 11th ACM Symp. on Principles of Database Systems, San Diego, pp. 114–126, 1992.
- Schlipf, J., “Formalizing a Logic for Logic Programming,”Annals of Mathematics and Artificial Intelligence, 5, pp. 279–302, 1992. CrossRef
- Sudarshan, S., Srivastava, D., Ramakrishnan, R. and Beeri, C., “Extending the Well-Founded and Valid Semantics for Aggregation,” inProc. International Logic Programming Symp., pp. 590–608, 1993.
- Sacca, D. and Zaniolo, C., “Stable models and non-determinism in logic programs with negation,” inProc. 9th ACM Symp. on Principles of Database Systems, pp. 205–217, 1990.
- Van Gelder, A., “The Well-Founded Semantics of Aggregation,” inProc. ACM 11th Principles of Database Systems, San Diego, pp. 127–138, 1992.
- Van Gelder, A., Ross, K. A. and Schlipf, J. S., “The Well-Founded Semantics for General Logic Programs,”JACM, 38, 3, pp. 620–650.
- Aggregation and negation-as-failure
New Generation Computing
Volume 17, Issue 3 , pp 255-284
- Cover Date
- Print ISSN
- Online ISSN
- Additional Links
- Well Founded Semantics
- Partial Order Clauses
- Database Query Languages
- Declarative Programming
- Deductive Databases
- Industry Sectors
- Author Affiliations
- 1. Departamento de Ingenieria en Sistemas Computacionales, Universidad de las Americas, Sta. Catarina Martir, Cholula, 72820, Puebla, Mexico
- 2. Department of Computer Science and Engineering, State University of New York at Buffalo, 14260, Buffalo, NY, U.S.A.