Skip to main content
    • Aa
    • Aa

A model building framework for answer set programming with external computations*


As software systems are getting increasingly connected, there is a need for equipping nonmonotonic logic programs with access to external sources that are possibly remote and may contain information in heterogeneous formats. To cater for this need, hex programs were designed as a generalization of answer set programs with an API style interface that allows to access arbitrary external sources, providing great flexibility. Efficient evaluation of such programs however is challenging, and it requires to interleave external computation and model building; to decide when to switch between these tasks is difficult, and existing approaches have limited scalability in many real-world application scenarios. We present a new approach for the evaluation of logic programs with external source access, which is based on a configurable framework for dividing the non-ground program into possibly overlapping smaller parts called evaluation units. The latter will be processed by interleaving external evaluation and model building using an evaluation graph and a model graph, respectively, and by combining intermediate results. Experiments with our prototype implementation show a significant improvement compared to previous approaches. While designed for hex-programs, the new evaluation approach may be deployed to related rule-based formalisms as well.

Hide All

This article is a significant extension of Eiter et al. (2011) and parts of Schüller (2012). This work has been supported by the Austrian Science Fund (FWF) Grants P24090 and P27730, and the Scientific and Technological Research Council of Turkey (TUBITAK) Grant 114E430.

Linked references
Hide All

This list contains references from the content that can be linked to their source. For a full set of references and notes please see the PDF or HTML where available.

E. Amir and S. A. McIlraith 2005. Partition-based logical reasoning for first-order and propositional theories. Artificial Intelligence 162, 1–2, 4988.

S. E.-D. Bairakdar , M. Dao-Tran , T. Eiter , M. Fink and T. Krennwallner 2010. The DMCS solver for distributed nonmonotonic multi-context systems. In European Conference on Logics in Artificial Intelligence (JELIA). Springer, 352355.

G. Brewka , T. Eiter and M. Truszczynski 2011. Answer set programming at a glance. Commun. ACM 54, 12, 92103.

F. Calimeri , S. Cozza and G. Ianni 2007. External sources of knowledge and value invention in logic programming. Annals of Mathematics and Artificial Intelligence 50, 3–4, 333361.

E. Clarke , O. Grumberg , S. Jha , Y. Lu and H. Veith 2003. Counterexample-guided abstraction refinement for symbolic model checking. J. ACM 50, 5, 752794.

M. Dao-Tran , T. Eiter and T. Krennwallner 2009. Realizing default logic over description logic knowledge bases. In Symbolic and Quantitative Approaches to Reasoning with Uncertainty. Springer, 602613.

P. M. Dung 1995. On the acceptability of arguments and its fundamental role in nonmonotonic reasoning, logic programming and n-person games. Artificial Intelligence 77, 2, 321357.

T. Eiter , G. Gottlob and H. Mannila 1997. Disjunctive datalog. ACM Transactions on Database Systems 22, 3, 364418.

T. Eiter , G. Ianni , T. Lukasiewicz , R. Schindlauer and H. Tompits 2008. Combining answer set programming with description logics for the semantic web. Artificial Intelligence 172, 12–13, 14951539.

W. Faber , N. Leone and G. Pfeifer 2004. Recursive aggregates in disjunctive logic programs: Semantics and complexity. In European Conference on Logics in Artificial Intelligence (JELIA). Springer, 200212.

M. Gebser , B. Kaufmann and T. Schaub 2009a. Solution enumeration for projected boolean search problems. In Integration of AI and OR Techniques in Constraint Programming for Combinatorial Optimization Problems (CPAIOR). Springer, 7186.

M. Gelfond and V. Lifschitz 1991. Classical negation in logic programs and disjunctive databases. New Generation Computing 9, 3/4, 365386.

R. Hoehndorf , F. Loebe , J. Kelso and H. Herre 2007. Representing default knowledge in biomedical ontologies: Application to the integration of anatomy and phenotype ontologies. BMC Bioinformatics 8, 1, 377.

Y. Lierler 2014. Relating constraint answer set programming languages and algorithms. Artificial Intelligence 207, 122.

V. S. Mellarkod , M. Gelfond and Y. Zhang 2008. Integrating answer set programming and constraint logic programming. Annals of Mathematics and Artificial Intelligenc 53, 1–4, 251287.

I. Niemelä 1999. Logic programming with stable model semantics as constraint programming paradigm. Annals of Mathematics and Artificial Intelligenc 25, 3–4, 241273.

T. C. Przymusinski 1988. On the declarative semantics of deductive databases and logic programs. In Foundations of Deductive Databases and Logic Programming, J. Minker , Ed. Morgan Kaufman, 193216.

T. C. Przymusinski 1991. Stable semantics for disjunctive programs. New Generation Computing 9, 401424.

K. Ross 1994. Modular stratification and magic sets for datalog programs with negation. Journal of the ACM 41, 6, 12161267.

Y. Shen , K. Wang , T. Eiter , M. Fink , C. Redl , T. Krennwallner and J. Deng 2014. FLP answer set semantics without circular justifications for general logic programs. Artificial Intelligence 213, 141.

Y. Wang , J. You , L. Yuan , Y. Shen and M. Zhang 2012. The loop formula based semantics of description logic programs. Theoretical Computer Science 415, 6085.

Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Theory and Practice of Logic Programming
  • ISSN: 1471-0684
  • EISSN: 1475-3081
  • URL: /core/journals/theory-and-practice-of-logic-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *


Type Description Title
Supplementary Materials

Eiter supplementary material
Online Appendix

 PDF (273 KB)
273 KB


Full text views

Total number of HTML views: 0
Total number of PDF views: 19 *
Loading metrics...

Abstract views

Total abstract views: 221 *
Loading metrics...

* Views captured on Cambridge Core between September 2016 - 23rd September 2017. This data will be updated every 24 hours.