Skip to main content

Answer Set Programs with Queries over Subprograms

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

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 10377))

  • 764 Accesses

Abstract

Answer-Set Programming (ASP) is a declarative programming paradigm. In this paper we discuss two related restrictions and present a novel modeling technique to overcome them: (1) Meta-reasoning about the collection of answer sets of a program is in general only possible by external postprocessing, but not within the program. This prohibits the direct continuation of reasoning based on the answer to the query over a (sub)program’s answer sets. (2) The saturation programming technique exploits the minimality criterion for answer sets of a disjunctive ASP program to solve co-\(\mathsf {NP}\)-hard problems, which typically involve checking if a property holds for all objects in a certain domain. However, the technique is advanced and not easily applicable by average ASP users; moreover, the use of default-negation within saturation encodings is limited.

In this paper, we present an approach which allows for brave and cautious query answering over normal subprograms within a disjunctive program in order to address restriction (1). The query answer is represented by a dedicated atom within each answer set of the overall program, which paves the way also for a more intuitive alternative to saturation encodings and allows also using default-negation within such encodings, which addresses restriction (2).

This research has been supported by the Austrian Science Fund (FWF) project P27730.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    On the non-ground level, this might be simulated using conditional literals as supported by some reasoners, cf. [9] and below.

References

  1. Bogaerts, B., Janhunen, T., Tasharrofi, S.: Stable-unstable semantics: beyond NP with normal logic programs. TPLP 16(5–6), 570–586 (2016). doi:10.1017/S1471068416000387

    MathSciNet  Google Scholar 

  2. Eiter, T., Gottlob, G.: On the computational cost of disjunctive logic programming: propositional case. Ann. Math. Artif. Intell. 15(3–4), 289–323 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  3. Eiter, T., Ianni, G., Krennwallner, T.: Answer set programming: a primer. In: Tessaris, S., Franconi, E., Eiter, T., Gutierrez, C., Handschuh, S., Rousset, M.-C., Schmidt, R.A. (eds.) Reasoning Web 2009. LNCS, vol. 5689, pp. 40–110. Springer, Heidelberg (2009). doi:10.1007/978-3-642-03754-2_2

    Chapter  Google Scholar 

  4. Eiter, T., Krennwallner, T., Redl, C.: HEX-programs with nested program calls. In: Tompits, H., Abreu, S., Oetsch, J., Pührer, J., Seipel, D., Umeda, M., Wolf, A. (eds.) INAP/WLP -2011. LNCS (LNAI), vol. 7773, pp. 269–278. Springer, Heidelberg (2013). doi:10.1007/978-3-642-41524-1_15

    Chapter  Google Scholar 

  5. Eiter, T., Polleres, A.: Towards automated integration of guess and check programs in answer set programming: a meta-interpreter and applications. TPLP 6(1–2), 23–60 (2006)

    MathSciNet  MATH  Google Scholar 

  6. Eiter, T., Redl, C., Schüller, P.: Problem solving using the HEX family. In: Computational Models of Rationality, pp. 150–174. College Publications (2016)

    Google Scholar 

  7. Faber, W., Leone, N., Pfeifer, G.: Semantics and complexity of recursive aggregates in answer set programming. Artif. Intell. 175(1), 278–298 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  8. Faber, W., Woltran, S.: Manifold answer-set programs and their applications. In: Balduccini, M., Son, T.C. (eds.) Logic Programming, Knowledge Representation, and Nonmonotonic Reasoning. LNCS (LNAI), vol. 6565, pp. 44–63. Springer, Heidelberg (2011). doi:10.1007/978-3-642-20832-4_4

    Chapter  Google Scholar 

  9. Gebser, M., Kaminski, R., Kaufmann, B., Schaub, T.: Answer Set Solving in Practice. Synthesis Lectures on AI and Machine Learning. Morgan and Claypool Publishers (2012)

    Google Scholar 

  10. Gebser, M., Kaminski, R., Schaub, T.: Complex optimization in answer set programming. CoRR abs/1107.5742 (2011)

    Google Scholar 

  11. Gebser, M., Kaufmann, B., Schaub, T.: Solution enumeration for projected boolean search problems. In: Hoeve, W.-J., Hooker, J.N. (eds.) CPAIOR 2009. LNCS, vol. 5547, pp. 71–86. Springer, Heidelberg (2009). doi:10.1007/978-3-642-01929-6_7

    Chapter  Google Scholar 

  12. Gebser, M., Pührer, J., Schaub, T., Tompits, H.: A meta-programming technique for debugging answer-set programs. In: AAAI, pp. 448–453. AAAI Press (2008)

    Google Scholar 

  13. Gelfond, M., Lifschitz, V.: Classical negation in logic programs and disjunctive databases. New Gener. Comput. 9(3–4), 365–386 (1991)

    Article  MATH  Google Scholar 

  14. Oetsch, J., Pührer, J., Tompits, H.: Catching the ouroboros: on debugging non-ground answer-set programs. TPLP 10(4–6), 513–529 (2010)

    MathSciNet  MATH  Google Scholar 

  15. Tari, L., Baral, C., Anwar, S.: A language for modular answer set programming: application to ACC tournament scheduling. In: Vos, M.D., Provetti, A. (eds.) Answer Set Programming, Advances in Theory and Implementation, Proceedings of the 3rd International ASP 2005 Workshop, Bath, UK, 27–29 September 2005, vol. 142. CEUR Workshop Proceedings (2005)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Christoph Redl .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Cite this paper

Redl, C. (2017). Answer Set Programs with Queries over Subprograms. In: Balduccini, M., Janhunen, T. (eds) Logic Programming and Nonmonotonic Reasoning. LPNMR 2017. Lecture Notes in Computer Science(), vol 10377. Springer, Cham. https://doi.org/10.1007/978-3-319-61660-5_15

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-61660-5_15

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-61659-9

  • Online ISBN: 978-3-319-61660-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics