IASCAR: Incremental Answer Set Counting by Anytime Refinement

  • Conference paper
  • First Online:
Logic Programming and Nonmonotonic Reasoning (LPNMR 2022)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
EUR 29.95
Price includes VAT (Germany)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
EUR 60.98
Price includes VAT (Germany)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
EUR 79.17
Price includes VAT (Germany)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free ship** worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    Statements marked by “\(\star \)” are proven in appendix https://tinyurl.com/iascar-p.

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

  1. Bogaerts, B., den Broeck, G.V.: Knowledge compilation of logic programs using approximation fixpoint theory. TPLP 15(4–5), 464–480 (2015)

    MathSciNet  MATH  Google Scholar 

  2. Darwiche, A.: Compiling knowledge into decomposable negation normal form. In: IJCAI 1999, pp. 284–289. Morgan Kaufmann (1999)

    Google Scholar 

  3. Darwiche, A., Marquis, P.: A knowledge compilation map. J. Artif. Intell. Res. 17, 229–264 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  4. Eiter, T., Hecher, M., Kiesel, R.: Treewidth-aware cycle breaking for algebraic answer set counting. In: KR 2021, vol. 18, pp. 269–279 (2021)

    Google Scholar 

  5. Fichte, J.K., Gaggl, S.A., Rusovac, D.: Rushing and strolling among answer sets - navigation made easy. In: AAAI 2022 (2022)

    Google Scholar 

  6. Fierens, D., et al.: Inference and learning in probabilistic logic programs using weighted Boolean formulas. TPLP 15(3), 358–401 (2015)

    MathSciNet  MATH  Google Scholar 

  7. Gebser, M., Kaufmann, B., Schaub, T.: Conflict-driven answer set solving: From theory to practice. Artif. Intell. 187–188, 52–89 (2012)

    Article  MathSciNet  MATH  Google Scholar 

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

    Google Scholar 

  9. Lagniez, J.M., Marquis, P.: An improved decision-DDNF compiler. In: IJCAI 2017, pp. 667–673. The AAAI Press (2017)

    Google Scholar 

  10. Lifschitz, V., Razborov, A.: Why are there so many loop formulas? ACM Trans. Comput. Log. 7(2), 261–268 (2006)

    Article  MathSciNet  MATH  Google Scholar 

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

    Chapter  MATH  Google Scholar 

  12. Sang, T., Beame, P., Kautz, H.: Performing Bayesian inference by weighted model counting. In: AAAI 2005. The AAAI Press (2005)

    Google Scholar 

  13. Wang, Y., Lee, J.: Handling uncertainty in answer set programming. In: AAAI 2015, pp. 4218–4219. The AAAI Press (2015)

    Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Dominik Rusovac .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics

Navigation