Skip to main content Accessibility help

Beyond NP: Quantifying over Answer Sets



Answer Set Programming (ASP) is a logic programming paradigm featuring a purely declarative language with comparatively high modeling capabilities. Indeed, ASP can model problems in NP in a compact and elegant way. However, modeling problems beyond NP with ASP is known to be complicated, on the one hand, and limited to problems in $\[\Sigma _2^P\]$ on the other. Inspired by the way Quantified Boolean Formulas extend SAT formulas to model problems beyond NP, we propose an extension of ASP that introduces quantifiers over stable models of programs. We name the new language ASP with Quantifiers (ASP(Q)). In the paper we identify computational properties of ASP(Q); we highlight its modeling capabilities by reporting natural encodings of several complex problems with applications in artificial intelligence and number theory; and we compare ASP(Q) with related languages. Arguably, ASP(Q) allows one to model problems in the Polynomial Hierarchy in a direct way, providing an elegant expansion of ASP beyond the class NP.

    • Send article to Kindle

      To send this article to your Kindle, first ensure is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about sending to your Kindle. Find out more about sending to your Kindle.

      Note you can select to send to either the or variations. ‘’ emails are free but can only be sent to your device when it is connected to wi-fi. ‘’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

      Find out more about the Kindle Personal Document Service.

      Beyond NP: Quantifying over Answer Sets
      Available formats

      Send article to Dropbox

      To send this article to your Dropbox account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your <service> account. Find out more about sending content to Dropbox.

      Beyond NP: Quantifying over Answer Sets
      Available formats

      Send article to Google Drive

      To send this article to your Google Drive account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your <service> account. Find out more about sending content to Google Drive.

      Beyond NP: Quantifying over Answer Sets
      Available formats



Hide All
Alviano, M., Amendola, G., Dodaro, C., Leone, N., Maratea, M., and Ricca, F. 2019. Evaluation of disjunctive programs in WASP. In LPNMR. Lecture Notes in Computer Science, vol. 11481. Springer, 241255.
Alviano, M., Dodaro, C., Leone, N., and Ricca, F. 2015. Advances in WASP. In LPNMR. LNCS, vol. 9345. Springer, 4054.
Amendola, G. 2018. Towards quantified answer set programming. In RCRA@FLoC. CEUR Workshop Proceedings, vol. 2271.
Ben-Eliyahu, R. and Dechter, R. 1996. On computing minimal models. Ann. Math. Artif. Intell. 18, 1, 327.10.1007/BF02136172
Biere, A., Heule, M., van Maaren, H., and Walsh, T., Eds. 2009. Handbook of Satisfiability. Frontiers in Artificial Intelligence and Applications, vol. 185. IOS Press.
Blumer, A., Ehrenfeucht, A., Haussler, D., and Warmuth, M. K. 1989. Learnability and the Vapnik-Chervonenkis dimension. J. ACM 36, 4, 929965.10.1145/76359.76371
Bogaerts, B., Janhunen, T., and Tasharrofi, S. 2016. Stable-unstable semantics: Beyond NP with normal logic programs. TPLP 16, 5-6, 570586.
Bordeaux, L. and Monfroy, E. 2002. Beyond NP: arc-consistency for quantified constraints. In CP. LNCS, vol. 2470. Springer, 371386.
Brewka, G., Eiter, T., and Truszczynski, M. 2011. Answer set programming at a glance. Commun. ACM 54, 12, 92103.10.1145/2043174.2043195
Buccafurri, F., Leone, N., and Rullo, P. 2000. Enhancing disjunctive datalog by constraints. IEEE Trans. Knowl. Data Eng. 12, 5, 845860.10.1109/69.877512
Cadoli, M., Eiter, T., and Gottlob, G. 1997. Default logic as a query language. IEEE Trans. Knowl. Data Eng. 9, 3, 448463.10.1109/69.599933
Cao, F., Du, D.-Z., Gao, B., Wan, P.-J., and Pardalos, P. M. 1995. Minimax Problems in Combinatorial Optimization. Springer US, Boston, MA, 269292.
Chung, F. R. 1989. Pebbling in hypercubes. SIAM J. Discret. Math. 2, 4 (Nov.), 467472.10.1137/0402041
Dantsin, E., Eiter, T., Gottlob, G., and Voronkov, A. 2001. Complexity and expressive power of logic programming. ACM Comput. Surv. 33, 3, 374425.10.1145/502807.502810
Denecker, M., Lierler, Y., Truszczynski, M., and Vennekens, J. 2012. A Tarskian informal semantics for answer set programming. In ICLP-TC. LIPIcs, vol. 17. 277289.
Denecker, M. and Vennekens, J. 2014. The well-founded semantics is the principle of inductive definition, revisited. In KR. AAAI Press.
Dodaro, C., Gasteiger, P., Leone, N., Musitsch, B., Ricca, F., and Schekotihin, K. 2016. Combining answer set programming and domain heuristics for solving hard industrial problems (application paper). TPLP 16, 5-6, 653669.
Eiter, T., Faber, W., Leone, N., and Pfeifer, G. 2000. Declarative problem-solving using the dlv system. In Logic-based Artificial Intelligence. 79103.
Eiter, T. and Gottlob, G. 1995. On the computational cost of disjunctive logic programming: Propositional case. Ann. Math. Artif. Intell. 15, 3-4, 289323.10.1007/BF01536399
Eiter, T., Ianni, G., Lukasiewicz, T., Schindlauer, R., and Tompits, H. 2008. Combining answer set programming with description logics for the semantic web. Artif. Intell. 172, 12-13, 14951539.
Eiter, T. and Polleres, A. 2006. Towards automated integration of guess and check programs in answer set programming: a meta-interpreter and applications. TPLP 6, 1-2, 2360.
Erdem, E., Gelfond, M., and Leone, N. 2016. Applications of answer set programming. AI Magazine 37, 3, 5368.10.1609/aimag.v37i3.2678
Faber, W. and Woltran, S. 2009. A framework for programming with module consequences. In SEA. CEUR Workshop Proceedings, vol. 546., 3448.
Faber, W. and Woltran, S. 2011. Manifold answer-set programs and their applications. In Logic Programming, Knowledge Representation, and Nonmonotonic Reasoning. LNCS, vol. 6565. 4463.
Gebser, M., Kaminski, R., Kaufmann, B., Romero, J., and Schaub, T. 2015. Progress in clasp series 3. In LPNMR. LNCS, vol. 9345. Springer, 368383.
Gebser, M., Kaminski, R., and Schaub, T. 2011. Complex optimization in answer set programming. TPLP 11, 4-5, 821839.
Gebser, M., Leone, N., Maratea, M., Perri, S., Ricca, F., and Schaub, T. 2018. Evaluation techniques and systems for answer set programming: a survey. In IJCAI., 54505456.
Gebser, M., Maratea, M., and Ricca, F. 2017. The sixth answer set programming competition. J. Artif. Intell. Res. 60, 4195.
Gebser, M., Obermeier, P., Schaub, T., Ratsch-Heitmann, M., and Runge, M. 2018. Routing driverless transport vehicles in car assembly with answer set programming. TPLP 18, 3-4, 520534.
Gebser, M. and Schaub, T. 2016. Modeling and language extensions. AI Magazine 37, 3, 3344.10.1609/aimag.v37i3.2673
Gelfond, M. and Lifschitz, V. 1991. Classical negation in logic programs and disjunctive databases. New Generation Comput. 9, 3/4, 365386.10.1007/BF03037169
Hurlbert, G. 1999. A Survey of Graph Pebbling. Congr. Num. 139, math.CO/0406024, 4164.
Ko, , Ker-Iand Lin, C.-L. 1995. On the Complexity of Min-Max Optimization Problems and their Approximation. Springer US, Boston, MA, 219239.
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 Trans. Comput. Log. 7, 3, 499562.10.1145/1149114.1149117
Lifschitz, V. 2002. Answer set programming and plan generation. Artif. Intell. 138, 1-2, 3954.
Milans, K. and Clark, B. 2006. The complexity of graph pebbling. SIAM J. Discret. Math. 20, 3 (Mar.), 769798.10.1137/050636218
Oikarinen, E. and Janhunen, T. 2006. Modular equivalence for normal logic programs. In ECAI. Frontiers in Artificial Intelligence and Applications, vol. 141. IOS Press, 412416.
Redl, C. 2017. Explaining inconsistency in answer set programs and extensions. In LPNMR. LNCS, vol. 10377. Springer, 176190.
Romero, J., Schaub, T., and Son, T. C. 2017. Generalized answer set planning with incomplete information. CEUR Workshop Proceedings 1868.
Rossi, F., van Beek, P., and Walsh, T. 2006. Introduction. In Handbook of Constraint Programming. Foundations of Artificial Intelligence, vol. 2. Elsevier, 312.10.1016/S1574-6526(06)80005-2
Schaefer, M. 1999. Deciding the Vapnik-Chervonenkis dimension in $\[\Sigma _3^p\]$-complete. J. Comput. Syst. Sci. 58, 1, 177182.
Stockmeyer, L. J. 1976. The polynomial-time hierarchy. Theor. Comput. Sci. 3, 1, 122.
Stockmeyer, L. J. and Meyer, A. R. 1973. Word problems requiring exponential time: Preliminary report. In STOC. ACM, 19.
Vapnik, V. 1998. Statistical learning theory. Wiley.
Vapnik, V. N. and Chervonenkis, A. Y. 2015. On the Uniform Convergence of Relative Frequencies of Events to Their Probabilities. Springer International Publishing, Cham, 1130.


Type Description Title
Supplementary materials

Amendola et al. supplementary material
Online Appendix

 PDF (105 KB)
105 KB

Beyond NP: Quantifying over Answer Sets



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