Hostname: page-component-848d4c4894-ndmmz Total loading time: 0 Render date: 2024-05-05T07:26:53.848Z Has data issue: false hasContentIssue false

Optimizing Answer Set Computation via Heuristic-Based Decomposition

Published online by Cambridge University Press:  28 February 2019

FRANCESCO CALIMERI*
Affiliation:
Department of Mathematics and Computer Science, University of Calabria, Rende, Italy (e-mails: calimeri@mat.unical.it, perri@mat.unical.it, zangari@mat.unical.it)
SIMONA PERRI
Affiliation:
Department of Mathematics and Computer Science, University of Calabria, Rende, Italy (e-mails: calimeri@mat.unical.it, perri@mat.unical.it, zangari@mat.unical.it)
JESSICA ZANGARI
Affiliation:
Department of Mathematics and Computer Science, University of Calabria, Rende, Italy (e-mails: calimeri@mat.unical.it, perri@mat.unical.it, zangari@mat.unical.it)

Abstract

Answer Set Programming (ASP) is a purely declarative formalism developed in the field of logic programming and non-monotonic reasoning: computational problems are encoded by logic programs whose answer sets, corresponding to solutions, are computed by an ASP system. Different, semantically equivalent, programs can be defined for the same problem; however, performance of systems evaluating them might significantly vary. We propose an approach for automatically transforming an input logic program into an equivalent one that can be evaluated more efficiently. One can make use of existing tree-decomposition techniques for rewriting selected rules into a set of multiple ones; the idea is to guide and adaptively apply them on the basis of proper new heuristics, to obtain a smart rewriting algorithm to be integrated into an ASP system. The method is rather general: it can be adapted to any system and implement different preference policies. Furthermore, we define a set of new heuristics tailored at optimizing grounding, one of the main phases of the ASP computation; we use them in order to implement the approach into the ASP system DLV, in particular into its grounding subsystem ℐ-DLV, and carry out an extensive experimental activity for assessing the impact of the proposal.

Type
Rapid Communication
Copyright
© Cambridge University Press 2019 

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Footnotes

*

This work has been partially supported by the Italian region Calabria under project “DLV Large Scale” (CUP J28C17000220006) POR Calabria FESR 2014–2020 and by both the European Union and the Italian Ministry of Economic Development under the project EU H2020 PON I&C 2014–2020 “Smarter Solutions in the Big Data World – S2BDW” (CUP B28I17000250008). This work is the extended version of a paper originally appeared in the Proceedings of 20th Symposium on Practical Aspects of Declarative Languages (PADL 2018), January 8–9, 2018, Los Angeles, USA. Program chairs were Kevin Hamlen and Nicola Leone. The paper presents new material that integrates and extends what has been reported in the original paper; in particular, it provides the reader with proper preliminaries (omitted in the original paper for space constraints), more detailed discussions on the proposed techniques and richer comparisons with related approaches, along with an extended number of examples. Furthermore, a more thorough experimental activity is presented, discussed in part in the main text and in part in Appendices in the Supplementary Material, that covers also new domains that were unexplored in the original paper.

References

Abseher, M., Musliu, N. and Woltran, S. 2017. htd – A free, open-source framework for (customized) tree decompositions and beyond. In Proceedings of Integration of AI and OR Techniques in Constraint Programming – 14th International Conference, CPAIOR 2017, Padua, Italy, June 5–8, 2017, Salvagnin, D. and Lombardi, M., Eds. Lecture Notes in Computer Science, vol. 10335. Springer, 376386.Google Scholar
Alviano, M., Calimeri, F., Dodaro, C., Fuscà, D., Leone, N., Perri, S., Ricca, F., Veltri, P. and Zangari, J. 2017. The ASP system DLV2. In Proceedings of Logic Programming and Nonmonotonic Reasoning – 14th International Conference, LPNMR 2017, Espoo, Finland, July 3–6, 2017, Balduccini, M. and Janhunen, T., Eds. Lecture Notes in Computer Science, vol. 10377. Springer, 215221.Google Scholar
Alviano, M., Dodaro, C., Leone, N. and Ricca, F. 2015. Advances in WASP. In Proceedings of Logic Programming and Nonmonotonic Reasoning – 13th International Conference, LPNMR 2015, Lexington, KY, USA, September 27–30, 2015, Calimeri, F., Ianni, G. and Truszczynski, M., Eds. Lecture Notes in Computer Science, vol. 9345. Springer, 4054.Google Scholar
Alviano, M., Faber, W., Greco, G. and Leone, N. 2012. Magic sets for disjunctive datalog programs. Artificial Intelligence 187, 156192.10.1016/j.artint.2012.04.008CrossRefGoogle Scholar
Ben-Eliyahu, R. and Dechter, R. 1994. Propositional semantics for disjunctive logic programs. Annals of Mathematics and Artificial Intelligence 12, 1–2, 5387.10.1007/BF01530761CrossRefGoogle Scholar
Ben-Eliyahu-Zohary, R. and Palopoli, L. 1997. Reasoning with minimal models: Efficient algorithms and applications. Artificial Intelligence 96, 2, 421449.10.1016/S0004-3702(97)00060-XCrossRefGoogle Scholar
Bichler, M., Morak, M. and Woltran, S. 2016a. lpopt: A rule optimization tool for answer set programming. In Logic-Based Program Synthesis and Transformation – 26th International Symposium, LOPSTR 2016, Edinburgh, UK, September 6–8, 2016, Revised Selected Papers, Hermenegildo, M. V. and López-Garca, P., Eds. Lecture Notes in Computer Science, vol. 10184. Springer, 114130.Google Scholar
Bichler, M., Morak, M. and Woltran, S. 2016b. The power of non-ground rules in answer set programming. Theory and Practice of Logic Programming 16, 5–6, 552569.10.1017/S1471068416000338CrossRefGoogle Scholar
Bliem, B., Moldovan, M., Morak, M. and Woltran, S. 2017. The impact of treewidth on ASP grounding and solving. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, IJCAI 2017, Melbourne, Australia, August 19–25, 2017, Sierra, C., Ed. ijcai.org, 852858.Google Scholar
Brewka, G., Eiter, T. and Truszczynski, M. 2011. Answer set programming at a glance. Communications of the ACM 54, 12, 92103.10.1145/2043174.2043195CrossRefGoogle Scholar
Calimeri, F., Faber, W., Gebser, M., Ianni, G., Kaminski, R., Krennwallner, T., Leone, N., Ricca, F. and Schaub, T. 2013. ASP-Core-2: 4th ASP competition official input language format. https://www.mat.unical.it/aspcomp2013/files/ASP-CORE-2.01c.pdf.Google Scholar
Calimeri, F., Fuscà, D., Perri, S. and Zangari, J. 2017a. The ASP instantiator I-DLV. In PAoASP. Espoo, Finland.Google Scholar
Calimeri, F., Fuscà, D., Perri, S. and Zangari, J. 2017b. I-DLV: the new intelligent grounder of DLV. Intelligenza Artificiale 11, 1, 520.10.3233/IA-170104CrossRefGoogle Scholar
Calimeri, F., Gebser, M., Maratea, M. and Ricca, F. 2016. Design and results of the fifth answer set programming competition. Artificial Intelligence 231, 151181.10.1016/j.artint.2015.09.008CrossRefGoogle Scholar
Calimeri, F., Perri, S. and Ricca, F. 2008. Experimenting with parallelism for the instantiation of ASP programs. Journal of Algorithms 63, 1–3, 3454.10.1016/j.jalgor.2008.02.003CrossRefGoogle Scholar
Dantsin, E., Eiter, T., Gottlob, G. and Voronkov, A. 2001. Complexity and expressive power of logic programming. ACM Computing Surveys 33, 3, 374425.10.1145/502807.502810CrossRefGoogle Scholar
Dao-Tran, M., Eiter, T., Fink, M., Weidinger, G. and Weinzierl, A. 2012. Omiga : An open minded grounding on-the-fly answer set solver. In Proceedings of Logics in Artificial Intelligence – 13th European Conference, JELIA 2012, Toulouse, France, September 26–28, 2012., del Cerro, L. F., Herzig, A. and Mengin, J., Eds. Lecture Notes in Computer Science, vol. 7519. Springer, 480483.Google Scholar
Eiter, T., Gottlob, G. and Mannila, H. 1997. Disjunctive datalog. ACM Transactions on Database Systems 22, 3, 364418.10.1145/261124.261126CrossRefGoogle Scholar
Eiter, T., Kaminski, T. and Weinzierl, A. 2017. Lazy-grounding for answer set programs with external source access. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, IJCAI 2017, Melbourne, Australia, August 19–25, 2017, Sierra, C., Ed. ijcai.org, 10151022.Google Scholar
Faber, W., Leone, N. and Perri, S. 2012. The intelligent grounder of DLV. In Correct Reasoning – Essays on Logic-Based AI in Honour of Vladimir Lifschitz. Lecture Notes in Computer Science, vol. 7265, Springer 247264.Google Scholar
Fuscà, D., Calimeri, F., Zangari, J. and Perri, S. 2017. I-DLV+MS: preliminary report on an automatic ASP solver selector. In Proceedings of the 24th RCRA International Workshop on Experimental Evaluation of Algorithms for Solving Problems with Combinatorial Explosion 2017 co-located with the 16th International Conference of the Italian Association for Artificial Intelligence (AI*IA 2017), Bari, Italy, November 14–15, 2017., Maratea, M. and Serina, I., Eds. CEUR Workshop Proceedings, vol. 2011. CEUR-WS.org, 2632.Google Scholar
Gebser, M., Kaminski, R., Kaufmann, B., Romero, J. and Schaub, T. 2015. Progress in clasp series 3. In Proceedings of Logic Programming and Nonmonotonic Reasoning – 13th International Conference, LPNMR 2015, Lexington, KY, USA, September 27–30, 2015, Calimeri, F., Ianni, G. and Truszczynski, M., Eds. Lecture Notes in Computer Science, vol. 9345. Springer, 368383.Google Scholar
Gebser, M., Kaminski, R., Kaufmann, B. and Schaub, T. 2014. Clingo = ASP + control: Preliminary report. CoRR abs/1405.3694.Google Scholar
Gebser, M., Kaminski, R., König, A. and Schaub, T. 2011. Advances in gringo series 3. In Proceedings of Logic Programming and Nonmonotonic Reasoning – 11th International Conference, LPNMR 2011, Vancouver, Canada, May 16–19, 2011, Delgrande, J. P. and Faber, W., Eds. Lecture Notes in Computer Science, vol. 6645. Springer, 345351.Google Scholar
Gebser, M., Kaufmann, B. and Schaub, T. 2012. Conflict-driven answer set solving: From theory to practice. Artificial Intelligence 187, 5289.10.1016/j.artint.2012.04.001CrossRefGoogle Scholar
Gebser, M., Maratea, M. and Ricca, F. 2015. The design of the sixth answer set programming competition – report. In Proceedings of Logic Programming and Nonmonotonic Reasoning – 13th International Conference, LPNMR 2015, Lexington, KY, USA, September 27–30, 2015, Calimeri, F., Ianni, G. and Truszczynski, M., Eds. Lecture Notes in Computer Science, vol. 9345. Springer, 531544.Google Scholar
Gebser, M., Maratea, M. and Ricca, F. 2016. What’s hot in the answer set programming competition. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, February 12–17, 2016, Phoenix, Arizona, USA, Schuurmans, D. and Wellman, M. P., Eds. AAAI Press, 43274329.Google Scholar
Gebser, M., Maratea, M. and Ricca, F. 2017. The design of the seventh answer set programming competition. In Logic Programming and Nonmonotonic Reasoning – 14th International Conference, LPNMR 2017, Espoo, Finland, July 3–6, 2017, Balduccini, M. and Janhunen, T., Eds. Lecture Notes in Computer Science, vol. 10377. Springer, 39.Google Scholar
Gelfond, M. and Lifschitz, V. 1991. Classical negation in logic programs and disjunctive databases. New Generation Computing 9, 3/4, 365386.10.1007/BF03037169CrossRefGoogle Scholar
Giunchiglia, E., Lierler, Y. and Maratea, M. 2006. Answer set programming based on propositional satisfiability. Journal of Automated Reasoning 36, 4, 345377.10.1007/s10817-006-9033-2CrossRefGoogle Scholar
Gottlob, G., Greco, G., Leone, N. and Scarcello, F. 2016. Hypertree decompositions: Questions and answers. In Proceedings of the 35th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, PODS 2016, San Francisco, CA, USA, June 26–July 01, 2016, Milo, T. and Tan, W., Eds. ACM, 5774.Google Scholar
Gottlob, G., Grohe, M., Musliu, N., Samer, M. and Scarcello, F. 2005. Hypertree decompositions: Structure, algorithms, and applications. In Graph-Theoretic Concepts in Computer Science, 31st International Workshop, WG 2005, Metz, France, June 23–25, 2005, Revised Selected Papers, Kratsch, D., Ed. Lecture Notes in Computer Science, vol. 3787. Springer, 115.Google Scholar
Gottlob, G., Leone, N. and Scarcello, F. 2001. Hypertree decompositions: A survey. In Proceedings of Mathematical Foundations of Computer Science 2001, 26th International Symposium, MFCS 2001 Marianske Lazne, Czech Republic, August 27–31, 2001, Sgall, J., Pultr, A. and Kolman, P., Eds. Lecture Notes in Computer Science, vol. 2136. Springer, 3757.Google Scholar
Janhunen, T., Niemelä, I., Seipel, D., Simons, P. and You, J. 2006. Unfolding partiality and disjunctions in stable model semantics. ACM Transactions on Computational Logic 7, 1, 137.10.1145/1119439.1119440CrossRefGoogle Scholar
Kaufmann, B., Leone, N., Perri, S. and Schaub, T. 2016. Grounding and solving in answer set programming. AI Magazine 37, 3, 2532.10.1609/aimag.v37i3.2672CrossRefGoogle Scholar
Lefèvre, C., Béatrix, C., Stéphan, I. and Garcia, L. 2017. Asperix, a first-order forward chaining approach for answer set computing. Theory and Practice of Logic Programming 17, 3, 266310.10.1017/S1471068416000569CrossRefGoogle Scholar
Leone, N., Perri, S. and Scarcello, F. 2001. Improving ASP instantiators by join-ordering methods. In Proceedings of Logic Programming and Nonmonotonic Reasoning, 6th International Conference, LPNMR 2001, Vienna, Austria, September 17–19, 2001, Eiter, T., Faber, W. and Truszczynski, M., Eds. Lecture Notes in Computer Science, vol. 2173. Springer, 280294.Google Scholar
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, 499562.10.1145/1149114.1149117CrossRefGoogle Scholar
Lifschitz, V. 1999. Answer set planning. In Logic Programming: The 1999 International Conference, Las Cruces, New Mexico, USA, November 29 – December 4, 1999, Schreye, D. D., Ed. MIT Press, 2337.Google Scholar
Morak, M. and Woltran, S. 2012. Preprocessing of complex non-ground rules in answer set programming. In Technical Communications of the 28th International Conference on Logic Programming, ICLP 2012, September 4–8, 2012, Budapest, Hungary, Dovier, A. and Costa, V. S., Eds. LIPIcs, vol. 17. Schloss Dagstuhl – Leibniz–Zentrum fuer Informatik, 247258.Google Scholar
Palù, A. D., Dovier, A., Pontelli, E. and Rossi, G. 2009. GASP: answer set programming with lazy grounding. Fundamenta Informaticae 96, 3, 297322.Google Scholar
Perri, S., Ricca, F. and Sirianni, M. 2013. Parallel instantiation of ASP programs: techniques and experiments. TPLP 13, 2, 253278.Google Scholar
Perri, S., Scarcello, F., Catalano, G. and Leone, N. 2007. Enhancing DLV instantiator by backjumping techniques. Annals of Mathematics and Artificial Intelligence 51, 2–4, 195228.10.1007/s10472-008-9090-9CrossRefGoogle Scholar
Robertson, N. and Seymour, P. D. 1986. Graph minors. II. algorithmic aspects of tree-width. J. Algorithms 7, 3, 309322.10.1016/0196-6774(86)90023-4CrossRefGoogle Scholar
Simona, P., and Zangari, J. 2018. Optimizing answer set computation via heuristic-based decomposition. In Practical Aspects of Declarative Languages - 20th International Symposium, PADL 2018, Los Angeles, CA, USA, January 8-9, 2018, Proceedings, Calimeri, F., Hamlen, K. W. and Leone, N., Eds. Lecture Notes in Computer Science, vol. 10702. Springer, 135151.Google Scholar
Simons, P., Niemelä, I. and Soininen, T. 2002. Extending and implementing the stable model semantics. Artificial Intelligence 138, 1–2, 181234.10.1016/S0004-3702(02)00187-XCrossRefGoogle Scholar
Syrjänen, T. 2001. Omega-restricted logic programs. In Proceedings of Logic Programming and Nonmonotonic Reasoning, 6th International Conference, LPNMR 2001, Vienna, Austria, September 17–19, 2001, Eiter, T., Faber, W. and Truszczynski, M., Eds. Lecture Notes in Computer Science, vol. 2173. Springer, 267279.Google Scholar
Ullman, J. D. 1988. Principles of Database and Knowledge-Base Systems, Volume I. Principles of computer science series, vol. 14. Computer Science Press.Google Scholar
Ward, J. and Schlipf, J. S. 2004. Answer set programming with clause learning. In Proceedings of Logic Programming and Nonmonotonic Reasoning, 7th International Conference, LPNMR 2004, Fort Lauderdale, FL, USA, January 6–8, 2004, Lifschitz, V. and Niemelä, I., Eds. Lecture Notes in Computer Science, vol. 2923. Springer, 302313.Google Scholar
Weinzierl, A. 2017. Blending lazy-grounding and CDNL search for answer-set solving. In Proceedings of Logic Programming and Nonmonotonic Reasoning – 14th International Conference, LPNMR 2017, Espoo, Finland, July 3–6, 2017, Balduccini, M. and Janhunen, T., Eds. Lecture Notes in Computer Science, vol. 10377. Springer, 191204.Google Scholar
Supplementary material: PDF

Calimeri supplementary material

Calimeri supplementary material 1

Download Calimeri supplementary material(PDF)
PDF 88.4 KB