Hostname: page-component-848d4c4894-nmvwc Total loading time: 0 Render date: 2024-06-22T00:45:43.615Z Has data issue: false hasContentIssue false

The power of non-ground rules in Answer Set Programming

Published online by Cambridge University Press:  14 October 2016

MANUEL BICHLER
Affiliation:
TU Wien, Vienna, Austria (e-mails: bichler@dbai.tuwien.ac.at, morak@dbai.tuwien.ac.at, woltran@dbai.tuwien.ac.at)
MICHAEL MORAK
Affiliation:
TU Wien, Vienna, Austria (e-mails: bichler@dbai.tuwien.ac.at, morak@dbai.tuwien.ac.at, woltran@dbai.tuwien.ac.at)
STEFAN WOLTRAN
Affiliation:
TU Wien, Vienna, Austria (e-mails: bichler@dbai.tuwien.ac.at, morak@dbai.tuwien.ac.at, woltran@dbai.tuwien.ac.at)

Abstract

Answer set programming (ASP) is a well-established logic programming language that offers an intuitive, declarative syntax for problem solving. In its traditional application, a fixed ASP program for a given problem is designed and the actual instance of the problem is fed into the program as a set of facts. This approach typically results in programs with comparably short and simple rules. However, as is known from complexity analysis, such an approach limits the expressive power of ASP; in fact, an entire NP-check can be encoded into a single large rule body of bounded arity that performs both a guess and a check within the same rule. Here, we propose a novel paradigm for encoding hard problems in ASP by making explicit use of large rules which depend on the actual instance of the problem. We illustrate how this new encoding paradigm can be used, providing examples of problems from the first, second, and even third level of the polynomial hierarchy. As state-of-the-art solvers are tuned towards short rules, rule decomposition is a key technique in the practical realization of our approach. We also provide some preliminary benchmarks which indicate that giving up the convenient way of specifying a fixed program can lead to a significant speed-up.

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2016 

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

References

Alviano, M., Dodaro, C., Faber, W., Leone, N. and Ricca, F. 2013. WASP: A native ASP solver based on constraint learning. In Proc. LPNMR, 54–66.Google Scholar
Alviano, M., Faber, W., Leone, N., Perri, S., Pfeifer, G. and Terracina, G. 2010. The disjunctive datalog system DLV. In Datalog Reloaded. Revised Selected Papers, 282–301.Google Scholar
Arnborg, S., Corneil, D. G. and Proskurowski, A. 1987. Complexity of finding embeddings in a k-tree. SIAM J. Algeb. Discr. Meth. 8, 2, 277284.Google Scholar
ASP-Core-2 2015. ASP Core 2 Standard, v2.03c. https://www.mat.unical.it/aspcomp2013/ASPStandardization. Accessed: 2016-04-28.Google Scholar
Bichler, M. 2015. Optimizing non-ground answer set programs via rule decomposition. BSc Thesis, TU Wien. http://dbai.tuwien.ac.at/proj/lpopt/thesis.pdf.Google Scholar
Bodlaender, H. L. 1996. A linear-time algorithm for finding tree-decompositions of small treewidth. SIAM J. Comput. 25, 6, 13051317.Google Scholar
Bonatti, P. A., Pontelli, E. and Son, T. C. 2008. Credulous resolution for answer set programming. In Proc. AAAI, 418–423.Google Scholar
Brewka, G., Delgrande, J. P., Romero, J. and Schaub, T. 2015. asprin: Customizing answer set preferences without a headache. In Proc. AAAI, 1467–1474.Google Scholar
Brewka, G., Eiter, T. and Truszczynski, M. 2011. Answer set programming at a glance. Commun. ACM 54, 12, 92103.Google Scholar
Chandra, A. K. and Merlin, P. M. 1977. Optimal implementation of conjunctive queries in relational data bases. In Proc. STOC, 77–90.Google Scholar
Dantsin, E., Eiter, T., Gottlob, G. and Voronkov, A. 2001. Complexity and expressive power of logic programming. ACM Comput. Surv. 33, 3, 374425.Google Scholar
de Cat, B., Denecker, M. and Stuckey, P. J. 2012. Lazy model expansion by incremental grounding. In Proc. ICLP, 201–211.Google Scholar
Dermaku, A., Ganzow, T., Gottlob, G., McMahan, B. J., Musliu, N. and Samer, M. 2008. Heuristic methods for hypertree decomposition. In Proc. MICAI, 1–11.Google Scholar
Eiter, T., Faber, W., Fink, M. and Woltran, S. 2007. Complexity results for answer set programming with bounded predicate arities and implications. Ann. Math. Artif. Intell. 51, 2–4, 123165.Google Scholar
Eiter, T., Faber, W. and Mushthofa, M. 2010. Space efficient evaluation of ASP programs with bounded predicate arities. In Proc. AAAI, 303–308.Google Scholar
Eiter, T. and Gottlob, G. 1995. On the computational cost of disjunctive logic programming: Propositional case. Ann. Math. Artif. Intell. 15, 3–4, 289323.Google Scholar
Eiter, T., Gottlob, G. and Leone, N. 1997. Abduction from logic programs: Semantics and complexity. Theor. Comput. Sci. 189, 1–2, 129177.CrossRefGoogle Scholar
Eiter, T. and Polleres, A. 2006. Towards automated integration of guess and check programs in answer set programming: a meta-interpreter and applications. Theory and Practice of Logic Programming 6, 1–2, 2360.CrossRefGoogle Scholar
Elkabani, I., Pontelli, E. and Son, T. C. 2005. Smodels A - A system for computing answer sets of logic programs with aggregates. In Proc. LPNMR, 427–431.Google Scholar
Gebser, M., Kaminski, R., Kaufmann, B. and Schaub, T. 2012. Answer Set Solving in Practice. Synthesis Lectures on Artificial Intelligence and Machine Learning. Morgan & Claypool Publishers.Google Scholar
Gebser, M., Kaminski, R. and Schaub, T. 2011. Complex optimization in answer set programming. Theory and Practice of Logic Programming 11, 4–5, 821839.CrossRefGoogle Scholar
Gebser, M., Kaufmann, B. and Schaub, T. 2012. Conflict-driven answer set solving: From theory to practice. Artif. Intell. 187, 5289.Google Scholar
Gelfond, M. and Lifschitz, V. 1988. The stable model semantics for logic programming. In Proc. ICLP/SLP, 1070–1080.Google Scholar
Gottlob, G., Miklós, Z. and Schwentick, T. 2009. Generalized hypertree decompositions: NP-hardness and tractable variants. J. ACM 56, 6, article no. 30.Google Scholar
Gottlob, G. and Papadimitriou, C. H. 2003. On the complexity of single-rule datalog queries. Inf. Comput. 183, 1, 104122.Google Scholar
Gottlob, G. and Schwentick, T. 2012. Rewriting ontological queries into small nonrecursive datalog programs. In Proc. KR, 254–263.Google Scholar
Janhunen, T., Niemelä, I., Seipel, D., Simons, P. and You, J. 2006. Unfolding partiality and disjunctions in stable model semantics. ACM Trans. Comput. Log. 7, 1, 137.Google Scholar
Lefèvre, C., Béatrix, C., Stéphan, I. and Garcia, L. 2015. ASPeRiX, a first order forward chaining approach for answer set computing. CoRR abs/1503.07717.Google Scholar
Lonsing, F., Bacchus, F., Biere, A., Egly, U. and Seidl, M. 2015. Enhancing search-based QBF solving by dynamic blocked clause elimination. In Proc. LPAR, 418–433.Google Scholar
Marek, V. W. and Truszczyński, M. 1999. Stable Models – an Alternative Logic Programming Paradigm. In The Logic Programming Paradigm – A 25-Year Perspective. Springer, 375398.Google Scholar
Morak, M. and Woltran, S. 2012. Preprocessing of complex non-ground rules in answer set programming. In Proc. ICLP, 247–258.Google Scholar
Palù, A. D., Dovier, A., Pontelli, E. and Rossi, G. 2009. GASP: answer set programming with lazy grounding. Fundam. Inform. 96, 3, 297322.Google Scholar