Skip to main content

Translating Answer-Set Programs into Bit-Vector Logic

  • Conference paper
  • First Online:
Book cover Applications of Declarative Programming and Knowledge Management (INAP 2011, WLP 2011)

Abstract

Answer set programming (ASP) is a paradigm for declarative problem solving where problems are first formalized as rule sets, i.e., answer-set programs, in a uniform way and then solved by computing answer sets for programs. The satisfiability modulo theories (SMT) framework follows a similar modelling philosophy but the syntax is based on extensions of propositional logic rather than rules. Quite recently, a translation from answer-set programs into difference logic was provided—enabling the use of particular SMT solvers for the computation of answer sets. In this paper, the translation is revised for another SMT fragment, namely that based on fixed-width bit-vector theories. Consequently, even further SMT solvers can be harnessed for the task of computing answer sets. The results of a preliminary experimental comparison are also reported. They suggest a level of performance which is similar to that achieved via difference logic.

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.

    http://combination.cs.uiowa.edu/smtlib/

  2. 2.

    However, variables in SMT are syntactically represented by (functional) constants having a free interpretation over a specific domain such as integers or reals.

  3. 3.

    http://www.tcs.hut.fi/Software/lp2diff/

  4. 4.

    Compatible interpretations assign the same truth values to their joint atoms.

  5. 5.

    http://goedel.cs.uiowa.edu/smtlib/papers/pdpar-proposal.pdf

  6. 6.

    We use typically symbols \(x,y,z\) to denote such free (functional) constants and symbols \(a,b,c\) to denote propositional atoms.

  7. 7.

    The constants and operators appearing in a well-formed term \(t\) are based on a fixed width \(m\). Moreover, the width \({\mathrm {w}}(x)\) of each free constant \(x\in {\mathrm {FC}}(T)\) must be the same throughout \(T\).

  8. 8.

    However, the form in (13) is used in our implementation, since \(+_{m}\) and \(<_{m}\) are amongst the base operators of the boolector system.

  9. 9.

    A special variable \(z\) is used as a placeholder for the constant \(0\) in the translation \({\mathrm {DL}}(P)\) [18].

  10. 10.

    http://www.tcs.hut.fi/Software/asptools/

  11. 11.

    http://www.tcs.hut.fi/Software/lp2diff/

  12. 12.

    http://www.tcs.hut.fi/Software/smodels/

  13. 13.

    http://fmv.jku.at/boolector/

  14. 14.

    http://research.microsoft.com/en-us/um/redmond/projects/z3/

  15. 15.

    http://www.cs.uni-potsdam.de/clasp/

  16. 16.

    http://www.tcs.hut.fi/Software/smodels/

  17. 17.

    One observation is that the performance of systems based on lp2bv is quite stable: even when we extended the time limit to 20 minutes, the results did not change much (differences of only one or two instances were perceived in most cases).

  18. 18.

    In this benchmark, normalization does not affect the size of grounded programs significantly.

  19. 19.

    http://goedel.cs.uiowa.edu/smtlib/papers/smt-lib-reference-v2.0-r10.12.21.pdf

References

  1. Apt, K., Blair, H., Walker, A.: Towards a theory of declarative knowledge. In: Minker, J. (ed.) Foundations of Deductive Databases and Logic Programming, pp. 89–148. Morgan Kaufmann, Los Altos (1988)

    Google Scholar 

  2. Balduccini, M.: Industrial-size scheduling with ASP+CP. In: Delgrande, J.P. (ed.) LPNMR 2011. LNCS, vol. 6645, pp. 284–296. Springer, Heidelberg (2011)

    Google Scholar 

  3. Barrett, C., Sebastiani, R., Seshia, S., Tinelli, C.: Satisfiability modulo theories. In: Biere, A., Heule, M.J.H., van Maaren, H., Walsh, T. (eds.) Handbook of Satisfiability. Frontiers in Artificial Intelligence and Applications, vol. 185, pp. 825–885. IOS Press, Amsterdam (2009)

    Google Scholar 

  4. Biere, A., Heule, M., van Maaren, H., Walsh, T. (eds.): Handbook of Satisfiability. Frontiers in Artificial Intelligence and Applications, vol. 185. IOS Press, Amsterdam (2009)

    Google Scholar 

  5. Brewka, G., Eiter, T., Truszczynski, M.: Answer set programming at a glance. Commun. ACM 54(12), 92–103 (2011)

    Article  Google Scholar 

  6. Brummayer, R., Biere, A.: Boolector: an efficient SMT solver for bit-vectors and arrays. In: Kowalewski, S., Philippou, A. (eds.) TACAS 2009. LNCS, vol. 5505, pp. 174–177. Springer, Heidelberg (2009)

    Google Scholar 

  7. Calimeri, F., et al.: The third answer set programming competition: preliminary report of the system competition track. In: Delgrande, J.P., Faber, W. (eds.) LPNMR 2011. LNCS, vol. 6645, pp. 388–403. Springer, Heidelberg (2011)

    Google Scholar 

  8. Clark, K.: Negation as failure. In: Gallaire, H., Minker, J. (eds.) Logic and Data Bases, pp. 293–322. Plenum Press, New York (1977)

    Google Scholar 

  9. de Moura, L., Bjørner, N.S.: Z3: An Efficient SMT Solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008)

    Google Scholar 

  10. Denecker, M., Vennekens, J., Bond, S., Gebser, M., Truszczyński, M.: The Second Answer Set Programming Competition. In: Erdem, E., Lin, F., Schaub, T. (eds.) LPNMR 2009. LNCS, vol. 5753, pp. 637–654. Springer, Heidelberg (2009)

    Google Scholar 

  11. Gebser, M., Kaufmann, B., Neumann, A., Schaub, T.: clasp: a conflict-driven answer set solver. In: Baral, C., Brewka, G., Schlipf, J. (eds.) LPNMR 2007. LNCS (LNAI), vol. 4483, pp. 260–265. Springer, Heidelberg (2007)

    Google Scholar 

  12. Gebser, M., Ostrowski, M., Schaub, T.: Constraint answer set solving. In: Hill, P.M., Warren, D.S. (eds.) ICLP 2009. LNCS, vol. 5649, pp. 235–249. Springer, Heidelberg (2009)

    Google Scholar 

  13. Gelfond, M., Leone, N.: Logic programming and knowledge representation - the A-Prolog perspective. Artif. Intell. 138(1–2), 3–38 (2002)

    Article  MathSciNet  Google Scholar 

  14. Gelfond, M., Lifschitz, V.: The stable model semantics for logic programming. In: ICLP/SLP, pp. 1070–1080 (1988)

    Google Scholar 

  15. Janhunen, T.: Some (in)translatability results for normal logic programs and propositional theories. J. Appl. Non-Classical Logics 16(1–2), 35–86 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  16. Janhunen, T., Liu, G., Niemelä, I.: Tight integration of non-ground answer set programming and satisfiability modulo theories. In: Working Notes of Grounding and Transformations for Theories with Variables, Vancouver, Canada, pp. 1–13, May 2011

    Google Scholar 

  17. Janhunen, T., Niemelä, I.: Compact Translations of Non-disjunctive Answer Set Programs to Propositional Clauses. In: Balduccini, M., Son, T.C. (eds.) Logic programming, knowledge representation, and nonmonotonic reasoning, vol. 6565, pp. 111–130. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  18. Janhunen, T., Niemelä, I., Sevalnev, M.: Computing stable models via reductions to difference logic. In: Erdem, E., Lin, F., Schaub, T. (eds.) LPNMR 2009. LNCS, vol. 5753, pp. 142–154. Springer, Heidelberg (2009)

    Google Scholar 

  19. Liu, G., Janhunen, T., Niemelä, I.: Answer set programming via mixed integer programming. In: Proceedings of the 13th International Conference on Principles of Knowledge Representation and Reasoning (KR), pp. 32–42. AAAI Press (2012)

    Google Scholar 

  20. Marek, V., Subrahmanian, V.: The relationship between stable, supported, default and autoepistemic semantics for general logic programs. Theor. Comput. Sci. 103(2), 365–386 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  21. Marek, V.W., Truszczyński, M.: Stable models and an alternative logic programming paradigm. In: Apt, K.R., et al. (eds.) The Logic Programming Paradigm: A 25-Year Perspective, pp. 375–398. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  22. Mellarkod, V.S., Gelfond, M.: Integrating answer set reasoning with constraint solving techniques. In: Garrigue, J., Hermenegildo, M.V. (eds.) FLOPS 2008. LNCS, vol. 4989, pp. 15–31. Springer, Heidelberg (2008)

    Google Scholar 

  23. Niemelä, I.: Logic programs with stable model semantics as a constraint programming paradigm. Ann. Math. Artif. Intell. 25(3–4), 241–273 (1999)

    Article  MATH  Google Scholar 

  24. Niemelä, I.: Stable models and difference logic. Ann. Math. Artif. Intell. 53(1–4), 313–329 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  25. Nieuwenhuis, R., Oliveras, A.: DPLL(T) with exhaustive theory propagation and its application to difference logic. In: Etessami, K., Rajamani, S.K. (eds.) CAV 2005. LNCS, vol. 3576, pp. 321–334. Springer, Heidelberg (2005)

    Google Scholar 

  26. Oikarinen, E., Janhunen, T.: Achieving compositionality of the stable model semantics for smodels programs. Theory Pract. Logic Program. 8(5–6), 717–761 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  27. Simons, P., Niemelä, I., Soininen, T.: Extending and implementing the stable model semantics. Artif. Intell. 138(1–2), 181–234 (2002)

    Article  MATH  Google Scholar 

Download references

Acknowledgments.

This research has been partially funded by the Academy of Finland under the project“Methods for Constructing and Solving Large Constraint Models” (MCM, #122399).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Tomi Janhunen .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Nguyen, M., Janhunen, T., Niemelä, I. (2013). Translating Answer-Set Programs into Bit-Vector Logic. In: Tompits, H., et al. Applications of Declarative Programming and Knowledge Management. INAP WLP 2011 2011. Lecture Notes in Computer Science(), vol 7773. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-41524-1_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-41524-1_6

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-41523-4

  • Online ISBN: 978-3-642-41524-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics