Hostname: page-component-cd9895bd7-gbm5v Total loading time: 0 Render date: 2024-12-27T10:19:01.809Z Has data issue: false hasContentIssue false

Inlining External Sources in Answer Set Programs

Published online by Cambridge University Press:  11 February 2019

CHRISTOPH REDL*
Affiliation:
Institute of Logic and Computation, Vienna University of Technology, Favoritenstraße 9-11, A-1040 Vienna, Austria (e-mail: redl@kr.tuwien.ac.at)

Abstract

hex-programs are an extension of answer set programs (ASP) with external sources. To this end, external atoms provide a bidirectional interface between the program and an external source. The traditional evaluation algorithm for hex-programs is based on guessing truth values of external atoms and verifying them by explicit calls of the external source. The approach was optimized by techniques that reduce the number of necessary verification calls or speed them up, but the remaining external calls are still expensive. In this paper, we present an alternative evaluation approach based on inlining of external atoms, motivated by existing but less general approaches for specialized formalisms such as DL-programs. External atoms are then compiled away such that no verification calls are necessary. The approach is implemented in the dlvhex reasoner. Experiments show a significant performance gain. Besides performance improvements, we further exploit inlining for extending previous (semantic) characterizations of program equivalence from ASP to hex-programs, including those of strong equivalence, uniform equivalence, and $\langle\mathcal{H},\mathcal{B}\rangle$- equivalence. Finally, based on these equivalence criteria, we characterize also inconsistency of programs w.r.t. extensions. Since well-known ASP extensions (such as constraint ASP) are special cases of hex, the results are interesting beyond the particular formalism.

Type
Original Article
Copyright
Copyright © Cambridge University Press 2019 

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

Footnotes

This article is an extension of preliminary work presented at AAAI 2017 (Redl 2017b; Redl 2017c). This work has been supported by the Austrian Science Fund (FWF) Grant P27730.

References

Alviano, M. 2016. Evaluating answer set programming with non-convex recursive aggregates. Fundamentae Informaticae 149, 1–2, 134.CrossRefGoogle Scholar
Alviano, M., Faber, W. and Gebser, M. 2015. Rewriting recursive aggregates in answer set programming: Back to monotonicity. TPLP 15, 4–5, 559573.Google Scholar
Bajraktari, L., Ortiz, M. and Simkus, M. 2017. Clopen knowledge bases: Combining description logics and answer set programming. In Proceedings of the 30th International Workshop on Description Logics, Montpellier, France, 18–21 July 2017, Artale, A., Glimm, B. and Kontchakov, R., Eds. CEUR Workshop Proceedings, vol. 1879. CEUR-WS.org.Google Scholar
Baumann, R., Dvorák, W., Linsbichler, T. and Woltran, S. 2017. A general notion of equivalence for abstract argumentation. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, IJCAI 2017, Melbourne, Australia, 19–25 Aug. 2017, Sierra, C., Ed. ijcai.org, 800806.CrossRefGoogle Scholar
Bliem, B. and Woltran, S. 2016. Equivalence between answer-set programs under (partially) fixed input. In FoIKS. Lecture Notes in Computer Science, vol. 9616. Springer, 95111.Google Scholar
Calvanese, D., Lembo, D., Lenzerini, M. and Rosati, R. 2007. Tractable reasoning and efficient query answering in description logics: The DL-Lite family. Journal of Automated Reasoning 39, 3, 385429.CrossRefGoogle Scholar
Darwiche, A. and Marquis, P. 2002. A knowledge compilation map. Journal of Artificial Intelligence Research (JAIR) 17, 229264.CrossRefGoogle Scholar
De Rosis, A., Eiter, T., Redl, C. and Ricca, F. 2015. Constraint answer set programming based on hex-programs. In Eighth Workshop on Answer Set Programming and Other Computing Paradigms (ASPOCP 2015), 31 Aug. 2015, Cork, Ireland (2015).Google Scholar
Drescher, C. and Walsh, T. 2012. Answer set solving with lazy nogood generation. In Technical Communications of the 28th International Conference on Logic Programming, ICLP 2012, 4–8 Sept. 2012, Budapest, Hungary, Dovier, A. and Costa, V. S., Eds. LIPIcs, vol. 17. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 188200.Google Scholar
Eiter, T. and Fink, M. 2003. Uniform equivalence of logic programs under the stable model semantics. In Logic Programming, 19th International Conference, ICLP 2003, Mumbai, India, 9–13 Dec. 2003, Proceedings, Palamidessi, C., Ed. Lecture Notes in Computer Science, vol. 2916. Springer, 224238.Google Scholar
Eiter, T., Fink, M., Ianni, G., Krennwallner, T., Redl, C. and Schüller, P. 2016. A model building framework for answer set programming with external computations. TPLP 16, 4, 418464.Google Scholar
Eiter, T., Fink, M., Krennwallner, T. and Redl, C. 2012. Conflict-driven ASP solving with external sources. TPLP 12, 4–5, 659679.Google Scholar
Eiter, T., Fink, M., Krennwallner, T. and Redl, C. 2016. Domain expansion for ASP-programs with external sources. Artificial Intelligence 233, 84121.CrossRefGoogle Scholar
Eiter, T., Fink, M., Krennwallner, T., Redl, C. and Schüller, P. 2014. Efficient hex-program evaluation based on unfounded sets. Journal of Artificial Intelligence Research 49, 269321.CrossRefGoogle Scholar
Eiter, T., Fink, M., Redl, C. and Stepanova, D. 2014. Exploiting support sets for answer set programs with external evaluations. In Proceedings of the Twenty-Eighth AAAI Conference on Artificial Intelligence, Québec City, Québec, Canada, 27–31 July 2014, Brodley, C. E. and Stone, P., Eds. AAAI Press, 10411048.Google Scholar
Eiter, T., Fink, M. and Stepanova, D. 2014. Towards practical deletion repair of inconsistent dl-programs. In Proceedings of the Twenty-First European Conference on Artificial Intelligence, ECAI’14. IOS Press, Amsterdam, The Netherlands, 285290.Google Scholar
Eiter, T., Fink, M., Tompits, H. and Woltran, S. 2005. Strong and uniform equivalence in answer-set programming: Characterizations and complexity results for the non-ground case. In Proceedings, The Twentieth National Conference on Artificial Intelligence and the Seventeenth Innovative Applications of Artificial Intelligence Conference, Pittsburgh, Pennsylvania, USA, 9–13 July 2005, Veloso, M. M. and Kambhampati, S., Eds. AAAI Press/The MIT Press, 695700.Google Scholar
Eiter, T., Ianni, G. and Krennwallner, T. 2009. Answer set programming: A primer. In 5th International Reasoning Web Summer School (RW 2009), Brixen/Bressanone, Italy, 30 Aug.–4 Sept. 2009, Tessaris, S., Franconi, E., Eiter, T., Gutierrez, C., Handschuh, S., Rousset, M.-C. and Schmidt, R. A., Eds. LNCS, vol. 5689. Springer, 40110.Google Scholar
Eiter, T., Ianni, G., Krennwallner, T. and Schindlauer, R. 2008. Exploiting conjunctive queries in description logic programs. Technical Report INFSYS RR-1843-08-02, Institut fürInformationssysteme, TU Wien, Vienna.Google Scholar
Eiter, T., Ianni, G., Lukasiewicz, T., Schindlauer, R. and Tompits, H. 2008. Combining answer set programming with description logics for the semantic web. Artificial Intelligence 172, 12–13, 14951539.CrossRefGoogle Scholar
Faber, W. 2005. Unfounded sets for disjunctive logic programs with arbitrary aggregates. In Proceedings of the Eighth International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR 2005), Diamante, Italy, 5–8 Sept. 2005, vol. 3662. Springer, 4052.CrossRefGoogle Scholar
Faber, W., Leone, N. and Pfeifer, G. 2011. Semantics and complexity of recursive aggregates in answer set programming. Artificial Intelligence 175, 1, 278298.CrossRefGoogle Scholar
Franco, J. and Martin, J. 2009. A History of Satisfiability. Frontiers in Artificial Intelligence and Applications, vol. 185. IOS Press, Chapter 1, 374.Google Scholar
Gebser, M., Kaufmann, B. and Schaub, T. 2012. Conflict-driven answer set solving: From theory to practice. Artificial Intelligence 187–188, 5289.CrossRefGoogle Scholar
Gebser, M., Ostrowski, M. and Schaub, T. 2009. Constraint answer set solving. In Proceedings of the Twenty-Fifth International Conference on Logic Programming (ICLP’09), Hill, P. and Warren, D., Eds. Lecture Notes in Computer Science, vol. 5649. Springer-Verlag, 235249.Google Scholar
Gelfond, M. and Lifschitz, V. 1988. The stable model semantics for logic programming. In Logic Programming: Proceedings of the 5th International Conference and Symposium, Kowalski, R. and Bowen, K., Eds. MIT Press, 10701080.Google Scholar
Gelfond, M. and Lifschitz, V. 1991. Classical negation in logic programs and disjunctive databases. New Generation Computing 9, 3–4, 365386.CrossRefGoogle Scholar
Heymans, S., Eiter, T. and Xiao, G. 2010. Tractable reasoning with DL-programs over datalog-rewritable description logics. In ECAI 2010 - 19th European Conference on Artificial Intelligence, Lisbon, Portugal, 16–20 Aug. 2010, Proceedings, Coelho, H., Studer, R. and Wooldridge, M., Eds. Frontiers in Artificial Intelligence and Applications, vol. 215. IOS Press, 3540.Google Scholar
Lembo, D., Lenzerini, M., Rosati, R., Ruzzi, M. and Savo, D. F. 2011. Query Rewriting for Inconsistent DL-Lite Ontologies. Springer, Berlin, Heidelberg, 155169.Google Scholar
Lifschitz, V., Pearce, D. and Valverde, A. 2001. Strongly equivalent logic programs. ACM Transactions on Computational Logic 2, 4, 526541.CrossRefGoogle Scholar
Mayer, W., Stumptner, M., Bettex, M. and Falkner, A. 2009. On solving complex rack configuration problems using CSP methods. In Proceedings of the Workshop on Configuration at the 21st International Conference on Artificial Intelligence, CEUR-WS.org, Pasadena, CA, USA, Stumptner, M. and Albert, P., Eds., 5360.Google Scholar
Nieuwenhuis, R. and Oliveras, A. 2005. DPLL(T) with exhaustive theory propagation and its application to difference logic. In CAV’05. LNCS, vol. 3576. Springer, 321334.Google Scholar
Ohrimenko, O., Stuckey, P. J. and Codish, M. 2009. Propagation via lazy clause generation. Constraints 14, 3, 357391.CrossRefGoogle Scholar
Ostrowski, M. and Schaub, T. 2012. ASP modulo CSP: The clingcon system. TPLP 12, 4–5, 485503.Google Scholar
Redl, C. 2017a. Conflict-driven ASP solving with external sources and program splits. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence (IJCAI 2017), Melbourne, Australia, 19–25 Aug. 2017. AAAI Press, 12391246.CrossRefGoogle Scholar
Redl, C. 2017b. Efficient evaluation of answer set programs with external sources based on external source inlining. In Proceedings of the Thirty-First AAAI Conference (AAAI 2017), San Francisco, California, USA, 4–9 Feb. 2016. AAAI Press.Google Scholar
Redl, C. 2017c. On equivalence and inconsistency of answer set programs with external sources. In Proceedings of the Thirty-First AAAI Conference (AAAI 2017), San Francisco, California, USA, 4–9 Feb. 2016. AAAI Press.Google Scholar
Truszczyński, M. 2010. Reducts of propositional theories, satisfiability relations, and generalizations of semantics of logic programs. Artificial Intelligence 174, 16, 12851306.CrossRefGoogle Scholar
Woltran, S. 2004. Characterizations for relativized notions of equivalence in answer set programming. In Logics in Artificial Intelligence, 9th European Conference, JELIA 2004, Lisbon, Portugal, 27–30 Sept. 2004, Proceedings, Alferes, J. J. and Leite, J. A., Eds. Lecture Notes in Computer Science, vol. 3229. Springer, 161173.Google Scholar
Woltran, S. 2008. A common view on strong, uniform, and other notions of equivalence in answer-set programming. TPLP 8, 2, 217234.Google Scholar
Xiao, G. and Eiter, T. 2011. Inline evaluation of hybrid knowledge bases - PhD description. In Web Reasoning and Rule Systems - 5th International Conference, RR 2011, Galway, Ireland, 29–30 Aug. 2011. Proceedings, Rudolph, S. and Gutierrez, C., Eds. Lecture Notes in Computer Science, vol. 6902. Springer, 300305.Google Scholar