Abstract
Answer set programming (ASP) is a popular declarative programming paradigm with various applications. Programs can easily have so many answer sets that they cannot be enumerated in practice, but counting still allows to quantify solution spaces. If one counts under assumptions on literals, one obtains a tool to comprehend parts of the solution space, so called answer set navigation. But navigating through parts of the solution space requires counting many times, which is expensive in theory. There, knowledge compilation compiles instances into representations on which counting works in polynomial time. However, these techniques exist only for CNF formulas and compiling ASP programs into CNF formulas can introduce an exponential overhead. In this paper, we introduce a technique to iteratively count answer sets under assumptions on knowledge compilations of CNFs that encode supported models. Our anytime technique uses the principle of inclusion-exclusion to systematically improve bounds by over- and undercounting. In a preliminary empirical analysis we demonstrate promising results. After compiling the input (offline phase) our approach quickly (re)counts.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
Statements marked by “\(\star \)” are proven in appendix https://tinyurl.com/iascar-p.
- 2.
Note that external supports are sets of literals. However, we can simulate such a set by introducing an auxiliary atom; hence one atom, as in this definition, is sufficient [7].
- 3.
See https://tinyurl.com/iascar-b for a Linux binary, instances, and raw data.
gringo cuts off trivial supported models when grounding, not affecting us here.
References
Bogaerts, B., den Broeck, G.V.: Knowledge compilation of logic programs using approximation fixpoint theory. TPLP 15(4–5), 464–480 (2015)
Darwiche, A.: Compiling knowledge into decomposable negation normal form. In: IJCAI 1999, pp. 284–289. Morgan Kaufmann (1999)
Darwiche, A., Marquis, P.: A knowledge compilation map. J. Artif. Intell. Res. 17, 229–264 (2002)
Eiter, T., Hecher, M., Kiesel, R.: Treewidth-aware cycle breaking for algebraic answer set counting. In: KR 2021, vol. 18, pp. 269–279 (2021)
Fichte, J.K., Gaggl, S.A., Rusovac, D.: Rushing and strolling among answer sets - navigation made easy. In: AAAI 2022 (2022)
Fierens, D., et al.: Inference and learning in probabilistic logic programs using weighted Boolean formulas. TPLP 15(3), 358–401 (2015)
Gebser, M., Kaufmann, B., Schaub, T.: Conflict-driven answer set solving: From theory to practice. Artif. Intell. 187–188, 52–89 (2012)
Kabir, M., Everardo, F., Shukla, A., Fichte, J.K., Hecher, M., Meel, K.: ApproxASP - a scalable approximate answer set counter. In: AAAI 2022 (2022, in Press)
Lagniez, J.M., Marquis, P.: An improved decision-DDNF compiler. In: IJCAI 2017, pp. 667–673. The AAAI Press (2017)
Lifschitz, V., Razborov, A.: Why are there so many loop formulas? ACM Trans. Comput. Log. 7(2), 261–268 (2006)
Marek, V.W., Truszczyński, M.: Stable models and an alternative logic programming paradigm. In: Apt, K.R., Marek, V.W., Truszczynski, M., Warren, D.S. (eds.) The Logic Programming Paradigm, pp. 375–398. Springer, Heidelberg (1999). https://doi.org/10.1007/978-3-642-60085-2_17
Sang, T., Beame, P., Kautz, H.: Performing Bayesian inference by weighted model counting. In: AAAI 2005. The AAAI Press (2005)
Wang, Y., Lee, J.: Handling uncertainty in answer set programming. In: AAAI 2015, pp. 4218–4219. The AAAI Press (2015)
Acknowledgements
Research was funded by the DFG through the Collaborative Research Center, Grant TRR 248 project ID 389792660, the BMBF, Grant 01IS20056_NAVAS, the Vienna Science and Technology Fund (WWTF) grant ICT19-065, and the Austrian Science Fund (FWF) grants P32830 and Y698.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Fichte, J.K., Gaggl, S.A., Hecher, M., Rusovac, D. (2022). IASCAR: Incremental Answer Set Counting by Anytime Refinement. In: Gottlob, G., Inclezan, D., Maratea, M. (eds) Logic Programming and Nonmonotonic Reasoning. LPNMR 2022. Lecture Notes in Computer Science(), vol 13416. Springer, Cham. https://doi.org/10.1007/978-3-031-15707-3_17
Download citation
DOI: https://doi.org/10.1007/978-3-031-15707-3_17
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-15706-6
Online ISBN: 978-3-031-15707-3
eBook Packages: Computer ScienceComputer Science (R0)