The Hexlite Solver

Lightweight and Efficient Evaluation of HEX Programs
  • Peter SchüllerEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11468)


\(\textsc {hexlite}\) is a lightweight solver for the \(\textsc {hex}\) formalism which integrates Answer Set Programming (ASP) with external computations. The main goal of \(\textsc {hexlite}\) is efficiency and simplicity, both in implementation as well as in installation of the system. We define the Pragmatic \(\textsc {hex}\) Fragment which permits to partition external computations into two kinds: those that can be evaluated during the program instantiation phase, and those that need to be evaluated during the answer set search phase. \(\textsc {hexlite}\) is written in \(\textsc {python}\) and suitable for evaluating this fragment with external computations that are realized in \(\textsc {python}\). Most performance-critical tasks are delegated to the \(\textsc {python}\) module of \(\textsc {clingo}\). We demonstrate that the Pragmatic \(\textsc {hex}\) Fragment is sufficient for many use cases and that it permits \(\textsc {hexlite}\) to have superior performance compared to the \(\textsc {dlvhex}\) system in relevant application scenarios.



We are grateful to Stefano Germano, Tobias Kaminski, Christoph Redl, Antonius Weinzierl and the anonymous reviewers for feedback about the \(\textsc {hexlite}\) system and this manuscript. This work has received funding from the Austrian Federal Ministry of Transport, Innovation and Technology (BMVIT) under grant agreement 861263 (DynaCon), and from the European Union’s Horizon 2020 research and innovation programme under grant agreement 825619 (AI4EU).


  1. 1.
    Alviano, M., Dodaro, C., Faber, W., Leone, N., Ricca, F.: WASP: a native ASP solver based on constraint learning. In: Cabalar, P., Son, T.C. (eds.) LPNMR 2013. LNCS (LNAI), vol. 8148, pp. 54–66. Springer, Heidelberg (2013). Scholar
  2. 2.
    Alviano, M., Dodaro, C., Leone, N., Ricca, F.: Advances in WASP. In: Calimeri, F., Ianni, G., Truszczynski, M. (eds.) LPNMR 2015. LNCS (LNAI), vol. 9345, pp. 40–54. Springer, Cham (2015). Scholar
  3. 3.
    Basol, S., Erdem, O., Fink, M., Ianni, G.: HEX programs with action atoms. In: LIPIcs-Leibniz International Proceedings in Informatics, vol. 7. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik (2010)Google Scholar
  4. 4.
    Bögl, M., Eiter, T., Fink, M., Schüller, P.: The mcs-ie system for explaining inconsistency in multi-context systems. In: Janhunen, T., Niemelä, I. (eds.) JELIA 2010. LNCS (LNAI), vol. 6341, pp. 356–359. Springer, Heidelberg (2010). Scholar
  5. 5.
    Calì, A., Gottlob, G., Kifer, M.: Taming the infinite chase: query answering under expressive relational constraints. J. Artif. Intell. Res. 48, 115–174 (2013)MathSciNetCrossRefGoogle Scholar
  6. 6.
    Calimeri, F., Fuscà, D., Perri, S., Zangari, J.: External computations and interoperability in the new DLV grounder. In: Esposito, F., Basili, R., Ferilli, S., Lisi, F. (eds.) AI*IA 2017. LNCS, vol. 10640, pp. 172–185. Springer, Cham (2017). Scholar
  7. 7.
    Cuteri, B., Dodaro, C., Ricca, F., Schüller, P.: Constraints, lazy constraints, or propagators in ASP solving: an empirical analysis. Theory Pract. Log. Program. 17(5–6), 780–799 (2017)MathSciNetCrossRefGoogle Scholar
  8. 8.
    Eiter, T., Fink, M., Ianni, G., Krennwallner, T., Redl, C., Schüller, P.: A model building framework for answer set programming with external computations. Theory Pract. Log. Program. 16(4), 418–464 (2016)MathSciNetCrossRefGoogle Scholar
  9. 9.
    Eiter, T., Fink, M., Krennwallner, T., Redl, C.: HEX-programs with existential quantification. In: Workshop on Logic Programming, pp. 99–117 (2013)Google Scholar
  10. 10.
    Eiter, T., Fink, M., Krennwallner, T., Redl, C.: Liberal safety for answer set programs with external sources. In: AAAI Conference on Artificial Intelligence, pp. 267–275 (2013)Google Scholar
  11. 11.
    Eiter, T., Fink, M., Krennwallner, T., Redl, C.: Domain expansion for ASP-programs with external sources. Artif. Intell. 233, 84–121 (2016)MathSciNetCrossRefGoogle Scholar
  12. 12.
    Eiter, T., Fink, M., Krennwallner, T., Redl, C., Schüller, P.: Efficient HEX-program evaluation based on unfounded sets. J. Artif. Intell. Res. 49, 269–321 (2014)MathSciNetCrossRefGoogle Scholar
  13. 13.
    Eiter, T., et al.: The DLVHEX system. KI - Künstliche Intelligenz 32(2), 187–189 (2018). Scholar
  14. 14.
    Eiter, T., Ianni, G., Lukasiewicz, T., Schindlauer, R., Tompits, H.: Combining answer set programming with description logics for the semantic web. Artif. Intell. 172(12–13), 1495–1539 (2008)MathSciNetCrossRefGoogle Scholar
  15. 15.
    Eiter, T., Ianni, G., Schindlauer, R., Tompits, H.: A uniform integration of higher-order reasoning and external evaluations in answer-set programming. In: International Joint Conference on Artificial Intelligence (IJCAI), pp. 90–96 (2005)Google Scholar
  16. 16.
    Eiter, T., Ianni, G., Schindlauer, R., Tompits, H.: Effective integration of declarative rules with external evaluations for semantic-web reasoning. In: Sure, Y., Domingue, J. (eds.) ESWC 2006. LNCS, vol. 4011, pp. 273–287. Springer, Heidelberg (2006). Scholar
  17. 17.
    Eiter, T., Kaminski, T.: Exploiting contextual knowledge for hybrid classification of visual objects. In: Michael, L., Kakas, A. (eds.) JELIA 2016. LNCS (LNAI), vol. 10021, pp. 223–239. Springer, Cham (2016). Scholar
  18. 18.
    Eiter, T., Kaminski, T., Redl, C., Schüller, P., Weinzierl, A.: Answer set programming with external source access. In: Ianni, G., et al. (eds.) Reasoning Web 2017. LNCS, vol. 10370, pp. 204–275. Springer, Cham (2017). Scholar
  19. 19.
    Eiter, T., Kaminski, T., Redl, C., Weinzierl, A.: Exploiting partial assignments for efficient evaluation of answer set programs with external source access. J. Artif. Intell. Res. 62, 665–727 (2018)MathSciNetCrossRefGoogle Scholar
  20. 20.
    Erdem, E., Patoglu, V., Schüller, P.: A systematic analysis of levels of integration between low-level reasoning and task planning. AI Commun. 29(2), 319–349 (2016)MathSciNetCrossRefGoogle Scholar
  21. 21.
    Faber, W., Pfeifer, G., Leone, N.: Semantics and complexity of recursive aggregates in answer set programming. Artif. Intell. 175(1), 278–298 (2011)MathSciNetCrossRefGoogle Scholar
  22. 22.
    Fink, M., Germano, S., Ianni, G., Redl, C., Schüller, P.: ActHEX: implementing HEX programs with action atoms. In: Cabalar, P., Son, T.C. (eds.) LPNMR 2013. LNCS (LNAI), vol. 8148, pp. 317–322. Springer, Heidelberg (2013). Scholar
  23. 23.
    Gebser, M., Kaminski, R., Kaufmann, B., Schaub, T.: Multi-shot ASP solving with clingo. Theory Practi. Log. Program. 19, 1–56 (2018)MathSciNetGoogle Scholar
  24. 24.
    Gelfond, M., Lifschitz, V.: Classical negation in logic programs and deductive databases. New Gener. Comput. 9, 365–385 (1991)CrossRefGoogle Scholar
  25. 25.
    Kaminski, T., Eiter, T., Inoue, K.: Exploiting answer set programming with external sources for meta-interpretive learning. Theory Pract. Log. Program. 18(3–4), 571–588 (2018)MathSciNetCrossRefGoogle Scholar
  26. 26.
    Lassila, O., Swick, R.: Resource description framework (RDF) model and syntax specification (1999).
  27. 27.
    Lierler, Y.: Relating constraint answer set programming languages and algorithms. Artif. Intell. 207, 1–22 (2014)MathSciNetCrossRefGoogle Scholar
  28. 28.
    Ng, H.T., Mooney, R.J.: Abductive plan recognition and diagnosis: a comprehensive empirical evaluation. In: Knowledge Representation and Reasoning (KR), pp. 499–508 (1992)Google Scholar
  29. 29.
    Rosis, A.D., Eiter, T., Redl, C., Ricca, F.: Constraint answer set programming based on HEX-programs. In: Proceedings of Workshop on Answer Set Programming and Other Computing Paradigms (ASPOCP) (2015)Google Scholar
  30. 30.
    Schüller, P.: Modeling variations of first-order Horn abduction in answer set programming. Fundamenta Informaticae 149(1–2), 159–207 (2016)MathSciNetCrossRefGoogle Scholar
  31. 31.
    Softic, S.: Conference Linked Data (COLINDA), version 1.0, last updated 30 July 2016. 149020 triples.

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.Institut für Logic and Computation, Knowledge-Based Systems GroupTechnische Universität WienViennaAustria

Personalised recommendations