Skip to main content Accessibility help
×
Home

Design and implementation of aggregate functions in the DLV system*

  • WOLFGANG FABER (a1), GERALD PFEIFER (a1), NICOLA LEONE (a1), TINA DELL'ARMI (a1) and GIUSEPPE IELPA (a1)...

Abstract

Disjunctive logic programming (DLP) is a very expressive formalism. It allows for expressing every property of finite structures that is decidable in the complexity class ΣP2(=NPNP). Despite this high expressiveness, there are some simple properties, often arising in real-world applications, which cannot be encoded in a simple and natural manner. Especially properties that require the use of arithmetic operators (like sum, times, or count) on a set or multiset of elements, which satisfy some conditions, cannot be naturally expressed in classic DLP. To overcome this deficiency, we extend DLP by aggregate functions in a conservative way. In particular, we avoid the introduction of constructs with disputed semantics, by requiring aggregates to be stratified. We formally define the semantics of the extended language (called ), and illustrate how it can be profitably used for representing knowledge. Furthermore, we analyze the computational complexity of , showing that the addition of aggregates does not bring a higher cost in that respect. Finally, we provide an implementation of in DLV—a state-of-the-art DLP system—and report on experiments which confirm the usefulness of the proposed extension also for the efficiency of computation.

Copyright

References

Hide All
Apt, K. R., Blair, H. A. and Walker, A. 1988. Towards a theory of declarative knowledge. In Foundations of Deductive Databases and Logic Programming, Minker, J., Ed. Morgan Kaufmann Publishers, Inc., Washington, DC, 89148.
Baral, C. 2003. Knowledge Representation, Reasoning and Declarative Problem Solving. Cambridge University Press, Cambridge, UK.
Ben-Eliyahu, R. and Dechter, R. 1994. Propositional semantics for disjunctive logic programs. Annals of Mathematics and Artificial Intelligence 12, 5387.
Buccafurri, F., Leone, N. and Rullo, P. 2000. Enhancing disjunctive datalog by constraints. IEEE Transactions on Knowledge and Data Engineering 12,5, 845860.
Calimeri, F., Faber, W., Leone, N. and Perri, S. 2005. Declarative and computational properties of logic programs with aggregates. In Nineteenth International Joint Conference on Artificial Intelligence (IJCAI-05). 406–411.
Chimenti, D., Gamboa, R., Krishnamurthy, R., Naqvi, S. A., Tsur, S. and Zaniolo, C. 1990. The LDL system prototype. IEEE Transactions on Knowledge and Data Engineering 2, 1, 7690.
Dell'Armi, T., Faber, W., Ielpa, G., Leone, N. and Pfeifer, G. 2003. Aggregate functions in DLV. In Proceedings ASP03—Answer Set Programming: Advances in Theory and Implementation, M. de Vos and A. Provetti, Eds. Messina, Italy, 274–288. Online at http://CEUR-WS.org/Vol-78/
Dowling, W. F. and Gallier, J. H. 1984. Linear-time algorithms for testing the satisfability of propositional horn formulae. Journal of Logic Programming 3, 267284.
Eiter, T., Faber, W., Leone, N. and Pfeifer, G. 2000. Declarative problem-solving using the DLV system. In Logic-Based Artificial Intelligence, Minker, J., Ed. Kluwer Academic Publishers, Norwell, MA, USA, 79103.
Eiter, T. and Gottlob, G. 1995. On the computational cost of disjunctive logic programming: prepositional case. Annals of Mathematics and Artificial Intelligence 15, 3/4, 289323.
Eiter, T., Gottlob, G. and Mannila, H. 1997a. Disjunctive datalog. ACM Transactions on Database Systems 22, 3 (Sept.), 364418.
Eiter, T., Gottlob, G. and Veith, H. 1997b. Modular logic programming and generalized quantifiers. In Proceedings of the 4th International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR-97), Dix, J., Furbach, U., and Nerode, A., Eds. Lecture Notes in Computer Science, vol. 1265. Springer, Berlin, Germany, 290309.
Elkabani, I., Pontelli, E. and Son, T. C. 2005. SmodelsA—a system for computing answer sets of logic programs. In Logic Programming and Nonmonotonic Reasoning — 8th International Conference, LPNMR'05, Diamante, Italy, September 2005, Baral, C., Greco, G., Leone, N., and Terracina, G., Eds. Lecture Notes in Computer Science, vol. 3662. Springer-Verlag, Berlin, Germany, 427431.
Faber, W. 2002. Enhancing Efficiency and Expressiveness in Answer Set Programming Systems. Ph.D. thesis, Institut für Informationssysteme, Technische Universität Wien.
Faber, W. 2005. Unfounded sets for disjunctive logic programs with arbitrary aggregates. In Logic Programming and Nonmonotonic Reasoning—8th International Conference, LPNMR'05, Diamante, Italy, September 2005, Baral, C., Greco, G., Leone, N., and Terracina, G., Eds. Lecture Notes in Computer Science, vol. 3662. Springer-Verlag, Berlin, Germany, 4052.
Faber, W., Leone, N., Mateis, C. and Pfeifer, G. 1999. Using database optimization techniques for nonmonotonic reasoning. In Proceedings of the 7th International Workshop on Deductive Databases and Logic Programming (DDLP'99), INAP Organizing Committee, Ed. Prolog Association of Japan, 135–139.
Faber, W., Leone, N. and Pfeifer, G. 1999. Pushing goal derivation in DLP computations. In Proceedings of the 5th International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR'99), Gelfond, M., Leone, N., and Pfeifer, G., Eds. Lecture Notes in AI (LNAI), vol. 1730. Springer Verlag, El Paso, TX, 177191.
Faber, W., Leone, N. and Pfeifer, G. 2001. Experimenting with heuristics for answer set programming. In Proceedings of the Seventeenth International Joint Conference on Artificial Intelligence (IJCAI) 2001. Morgan Kaufmann Publishers, Seattle, WA, USA, 635–640.
Faber, W., Leone, N. and Pfeifer, G. 2004. Recursive aggregates in disjunctive logic programs: Semantics and complexity. In Proceedings of the 9th European Conference on Artificial Intelligence (JELIA 2004), Alferes, J. J. and Leite, J., Eds. Lecture Notes in AI (LNAI), vol. 3229. Springer-Verlag, Berlin, Germany, 200212.
Ferraris, P. 2005. Answer sets for prepositional theories. In Logic Programming and Nonmonotonic Reasoning—8th International Conference, LPNMR'05, Diamante, Italy, September 2005, Baral, C., Greco, G., Leone, N., and Terracina, G., Eds. Lecture Notes in Computer Science, vol. 3662. Springer-Verlag, Berlin, Germany, 119131.
Ferraris, P. and Lifschitz, V. 2005. Weight constraints as nested expressions. Theory and Practice of Logic Programming 5, 1/2, 4574.
Gebser, M., Kaufmann, B., Neumann, A. and Schaub, T. 2007. Conflict-driven answer set solving. In Twentieth International Joint Conference on Artificial Intelligence (IJCAI-07). Morgan Kaufmann Publishers, San Francisco, CA, USA, 386392.
Gebser, M., Liu, L., Namasivayam, G., Neumann, A., Schaub, T. and Truszczyński, M. 2007. The first answer set programming system competition. In Logic Programming and Nonmonotonic Reasoning—9th International Conference, LPNMR'07, C. Baral, G. Brewka, and J. Schlipf, Eds. Lecture Notes in Computer Science, vol. 4483. Springer-Verlag, Tempe, AZ, 3–17.
Gelfond, M. 2002. Representing knowledge in A-prolog. In Computational Logic. Logic Programming and Beyond, Kakas, A. C. and Sadri, F., Eds. Lecture Notes in Computer Science, vol. 2408. Springer, Berlin, Germany, 413451.
Gelfond, M. and Lifschitz, V. 1991. Classical negation in logic programs and disjunctive databases. New Generation Computing 9, 365385.
Gottlob, G., Leone, N. and Veith, H. 1999. Succinctness as a source of expression complexity. Annals of Pure and Applied Logic 97, 1–3, 231260.
Hella, L., Libkin, L., Nurmonen, J. and Wong, L. 2001. Logics with aggregate operators. Journal of the ACM 48, 4, 880907.
Kemp, D. B. and Ramamohanarao, K. 1998. Efficient recursive aggregation and negation in deductive databases. IEEE Transactions on Knowledge and Data Engineering 10, 727745.
Leone, N., Perri, S. and Scarcello, F. 2001. Improving ASP instantiators by join-ordering methods. In Logic Programming and Nonmonotonic Reasoning—6th International Conference, LPNMR'01, Vienna, Austria, Eiter, T., Faber, W., and Truszczyński, M., Eds. Lecture Notes in AI (LNAI), vol. 2173. Springer-Verlag, Berlin, Germany, 280294.
Leone, N., Pfeifer, G., Faber, W., Eiter, T., Gottlob, G., Perri, S. and Scarcello, F. 2006. The DLV system for knowledge representation and reasoning. ACM Transactions on Computational Logic 7, 3 (July), 499562.
Leone, N., Rullo, P. and Scarcello, F. 1997. Disjunctive stable models: Unfounded sets, fixpoint semantics and computation. Information and Computation 135, 2 (June), 69112.
Lierler, Y. 2005. Cmodels for tight disjunctive logic programs. In W(C)LP 19th Workshop on (Constraint) Logic Programming, Ulm, Germany. Ulmer Informatik-Berichte. Universität Ulm, Germany, 163166.
Liu, L. and Truszczyński, M. 2005. Properties of programs with monotone and convex constraints. In Proceedings of the 20th National Conference on Artificial Intelligence (AAAI'05), Veloso, M. M. and Kambhampati, S., Eds. The MIT Press, Cambridge, MA, USA, 701706.
Marek, V. W., Niemelä, I. and Truszczyński, M. 2004. Logic programming with monotone cardinality atom. In Proceedings of the 7th International Conference on Logic Programming and Non-Monotonic Reasoning (LPNMR-7), Lifschitz, V. and Niemelä, I., Eds. Lecture Notes in AI(LNAI), vol. 2923. Springer, Berlin, Germany, 154166.
Marek, V. W. and Remmel, J. B. 2002. On logic programs with cardinality constraints. In Proceedings of the 9th International Workshop on Non-Monotonic Reasoning (NMR'2002), Ben-ferhat, S. and Giunchiglia, E., Eds. Toulouse, France, 219228.
Marek, V. W. and Truszczyński, M. 1991. Autoepistemic logic. Journal of the ACM 38, 3, 588619.
Minker, J. 1982. On indefinite data bases and the closed world assumption. In Proceedings 6th Conference on Automated Deduction (CADE '82), Loveland, D. W., Ed. Lecture Notes in Computer Science, vol. 138. Springer, New York, 292308.
Minoux, M. 1988. LTUR: A simplified linear-time unit resolution algorithm for horn formulae and computer implementation. Information Processing Letters 29, 112.
Niemelä, I., Simons, P. and Soininen, T. 1999. Stable model semantics of weight constraint rules. In Proceedings of the 5th International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR'99), Gelfond, M., Leone, N., and Pfeifer, G., Eds. Lecture Notes in AI (LNAI), vol. 1730. Springer Verlag, El Paso, TX, 107116.
Pelov, N. 2004. Semantics of Logic Programs with Aggregates. Ph.D. thesis, Katholieke Univer-siteit Leuven, Leuven, Belgium.
Pelov, N., Denecker, M. and Bruynooghe, M. 2004. Partial stable models for logic programs with aggregates. In Proceedings of the 7th International Conference on Logic Programming and Non-Monotonic Reasoning (LPNMR-7). Lecture Notes in AI (LNAI), vol. 2923. Springer, Berlin, Germany, 207219.
Przymusinski, T. C. 1988. On the declarative semantics of deductive databases and logic programs. In Foundations of Deductive Databases and Logic Programming, Minker, J., Ed. Morgan Kaufmann Publishers, San Francisco, CA, USA, 193216.
Ross, K. A. and Sagiv, Y. 1997. Monotonic aggregation in deductive databases. Journal of Computer and System Sciences 54, 1 (February), 7997.
Simons, P., Niemelä, I. and Soininen, T. 2002. Extending and implementing the stable model semantics. Artificial Intelligence 138, 181234.
Son, T. C. and Pontelli, E. 2007. A constructive semantic characterization of aggregates in ASP. Theory and Practice of Logic Programming 7, 355375.
Son, T. C., Pontelli, E. and Elkabani, I. 2005. On logic programming with aggregates. Technical Report NMSU-CS-2005-006, New Mexico State University.
Syrjänen, T. 2002. Lparse 1.0 User's Manual. http://www.tcs.hut.fi/Software/smodels/lparse.ps.gz.
Ullman, J. D. 1989. Principles of Database and Knowledge Base Systems. Computer Science Press. New York, NY, USA.

Keywords

Metrics

Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed