Skip to main content
Log in

Aggregation and negation-as-failure

  • Regular papers
  • Published:
New Generation Computing Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Abiteboul, S. and Grumbach, S., “A Rule-Based Language with Functions and Sets,”ACM Trans. on Database Systems, 16, 1, pp. 1–30, 1991.

    Article  MathSciNet  Google Scholar 

  2. Aravindam, C. and Dung, P. M., “Partial deduction of Logic Programs wrt Well-Founded Semantics,”New Generation Computing, 13, pp. 45–74, 1994.

    Article  Google Scholar 

  3. 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.

    Google Scholar 

  4. 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.

  5. 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.

  6. 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.

  7. Dix, J., “A Classification-Theory of Semantics of Normal Logic Programs: I. Strong Properties,”Fundamenta Informaticae XXII, 3, pp. 227–255, 1995.

    MathSciNet  Google Scholar 

  8. Dix, J., “A Classification-Theory of Semantics of Normal Logic Programs: II. Weak Properties,”Fundamenta Informaticae XXII, 3, pp. 257–288, 1995.

    MathSciNet  Google Scholar 

  9. Dix, J. and Osorio, M., “Towards Well-behaved Semantics Suitable for Aggregation,”Research Report, 11–97, University of Koblenz, Germany. Also,poster paper, ILPS97.

  10. Dix, J. and Osorio, M., “Provability Closures in Logic Programming,” inProc. International Symp. of Computer Science, Mexico City, Oct. 1997.

  11. 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.

  12. 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.

  13. Jana, D. and Jayaraman, B., “Set constructors, Finite Sets, and Logical Semantics,”Journal of Logic Programming, 38, 1, pp. 55–77, 1999.

    Article  MATH  MathSciNet  Google Scholar 

  14. Jayaraman, B. and Moon, K., “Subset-Logic Programs and Their Implementation,” to appear inJournal of Logic Programming.

  15. Jayaraman, B., Osorio, M. and Moon, K., “partial Order Programming (revisited),” inProc. Algebraic Methodology and Software Technology, Springer-Verlag, Jul. 1995.

  16. Kemp, D. B. and Stuckey, P. J., “Semantics of logic programs with aggregates,” inInternational Logic Programming Symp., pp. 387–401, 1991.

  17. Kunen, K., “Some remarks on the completed database,”Technical Report, 775, Univ. of Wisconsin, Madison, WI, 1988.

    Google Scholar 

  18. Lefebvre, A., “Towards and Efficient Evaluation of Recursive Aggregates in Deductive Databases,”New Generation Computing, 12, pp. 131–160, 1994.

    MATH  Google Scholar 

  19. Liu, M., “Relationlog: A typed Extension to Datalog with Sets and Tuples,” inProc. International Symp. of Logic Programming, pp. 83–97, 1995.

  20. Lloyd, J.,Foundations of Logic Programming (2nd ed.), Springer-Verlag, Berlin, 1987.

    MATH  Google Scholar 

  21. Moon, K., “Implementation of Subset Logic Languages,”Ph.D. dissertation, Department of Computer Science, SUNY-Buffalo, 1997.

  22. 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.

  23. 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.

  24. 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.

  25. Schlipf, J., “Formalizing a Logic for Logic Programming,”Annals of Mathematics and Artificial Intelligence, 5, pp. 279–302, 1992.

    Article  MATH  MathSciNet  Google Scholar 

  26. 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.

  27. 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.

  28. Van Gelder, A., “The Well-Founded Semantics of Aggregation,” inProc. ACM 11th Principles of Database Systems, San Diego, pp. 127–138, 1992.

  29. Van Gelder, A., Ross, K. A. and Schlipf, J. S., “The Well-Founded Semantics for General Logic Programs,”JACM, 38, 3, pp. 620–650.

Download references

Author information

Authors and Affiliations

Authors

Additional information

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.

About this article

Cite this article

Osorio, M., Jayaraman, B. Aggregation and negation-as-failure. NGCO 17, 255–284 (1999). https://doi.org/10.1007/BF03037222

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF03037222

Keywords

Navigation