Skip to main content

The Hexlite Solver

Lightweight and Efficient Evaluation of HEX Programs

  • Conference paper
  • First Online:
Logics in Artificial Intelligence (JELIA 2019)

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

Included in the following conference series:

Abstract

\(\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.

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 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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.

    https://github.com/hexhex/hexlite.

  2. 2.

    Formally, this is the set \(\{ y_i(v_1,\ldots ,v_{t_i}) \in I \}\).

  3. 3.

    \(\textsc {dlvhex}\) replaces them with an ordinary replacement atom, guesses truth of replacement atoms with extra rules, and accepts only answer set candidates I where guessed truth values correspond with external computations wrt. I, see Sect. 4.

  4. 4.

    In that case \(m=0\) so the replacement atom does not include \(X_1,\ldots ,X_m\).

  5. 5.

    A propagator is a program module that interfaces with the search process of \(\textsc {clasp}\) and can (a) infer truth values and (b) add ground clauses based on a partial model.

  6. 6.

    The FLP check implemented in \(\textsc {hexlite}\) is described in Proposition 1 in [8]. The FLP check can be deactivated if it is not required (this is another example of Programmer Responsibility). The custom \(\textsc {python}\) propagator is re-used in the FLP checker.

  7. 7.

    https://bitbucket.org/knowlp/asp-fo-abduction.

  8. 8.

    To permit a fairer comparison, we used only objective functions \(\textsc {card}\) and \(\textsc {coh}\) (\(\textsc {dlvhex}\) is incompatible with objective function \(\textsc {wa}\)) and we removed all facts of the form comment(\(\ldots \)). which served only an informational purpose (\(\textsc {dlvhex}\) is significantly slower if these facts are included).

  9. 9.

    This generalizes the termination mechanism for reasoning as it was implemented in the original \(\textsc {accel}\) reasoner [28].

  10. 10.

    Dataset retrieved from https://old.datahub.io/dataset/colinda.

  11. 11.

    We used git hash 5a1ee06d from git@github.com:hexhex/core.git because the stable version 2.5.0 performed significantly worse.

  12. 12.

    Git hash d0e7896eb from git@github.com:hexhex/hexlite.git.

References

  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). https://doi.org/10.1007/978-3-642-40564-8_6

    Chapter  Google Scholar 

  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). https://doi.org/10.1007/978-3-319-23264-5_5

    Chapter  Google Scholar 

  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. 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). https://doi.org/10.1007/978-3-642-15675-5_31

    Chapter  MATH  Google Scholar 

  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)

    Article  MathSciNet  Google Scholar 

  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). https://doi.org/10.1007/978-3-319-70169-1_13

    Chapter  Google Scholar 

  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)

    Article  MathSciNet  Google Scholar 

  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)

    Article  MathSciNet  Google Scholar 

  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. 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. Eiter, T., Fink, M., Krennwallner, T., Redl, C.: Domain expansion for ASP-programs with external sources. Artif. Intell. 233, 84–121 (2016)

    Article  MathSciNet  Google Scholar 

  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)

    Article  MathSciNet  Google Scholar 

  13. Eiter, T., et al.: The DLVHEX system. KI - Künstliche Intelligenz 32(2), 187–189 (2018). http://www.kr.tuwien.ac.at/research/systems/dlvhex/

    Article  Google Scholar 

  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)

    Article  MathSciNet  Google Scholar 

  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. 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). https://doi.org/10.1007/11762256_22

    Chapter  Google Scholar 

  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). https://doi.org/10.1007/978-3-319-48758-8_15

    Chapter  Google Scholar 

  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). https://doi.org/10.1007/978-3-319-61033-7_7

    Chapter  Google Scholar 

  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)

    Article  MathSciNet  Google Scholar 

  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)

    Article  MathSciNet  Google Scholar 

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

    Article  MathSciNet  Google Scholar 

  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). https://doi.org/10.1007/978-3-642-40564-8_31

    Chapter  Google Scholar 

  23. Gebser, M., Kaminski, R., Kaufmann, B., Schaub, T.: Multi-shot ASP solving with clingo. Theory Practi. Log. Program. 19, 1–56 (2018)

    MathSciNet  Google Scholar 

  24. Gelfond, M., Lifschitz, V.: Classical negation in logic programs and deductive databases. New Gener. Comput. 9, 365–385 (1991)

    Article  Google Scholar 

  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)

    Article  MathSciNet  Google Scholar 

  26. Lassila, O., Swick, R.: Resource description framework (RDF) model and syntax specification (1999). www.w3.org/TR/1999/REC-rdf-syntax-19990222

  27. Lierler, Y.: Relating constraint answer set programming languages and algorithms. Artif. Intell. 207, 1–22 (2014)

    Article  MathSciNet  Google Scholar 

  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. 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. Schüller, P.: Modeling variations of first-order Horn abduction in answer set programming. Fundamenta Informaticae 149(1–2), 159–207 (2016)

    Article  MathSciNet  Google Scholar 

  31. Softic, S.: Conference Linked Data (COLINDA), version 1.0, last updated 30 July 2016. 149020 triples. http://www.colinda.org

Download references

Acknowledgements

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

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Peter Schüller .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Schüller, P. (2019). The Hexlite Solver. In: Calimeri, F., Leone, N., Manna, M. (eds) Logics in Artificial Intelligence. JELIA 2019. Lecture Notes in Computer Science(), vol 11468. Springer, Cham. https://doi.org/10.1007/978-3-030-19570-0_39

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-19570-0_39

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-19569-4

  • Online ISBN: 978-3-030-19570-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics