Translating Answer-Set Programs into Bit-Vector Logic

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7773)


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.


Propositional Atom Satisfiability Modulo Theory Difference Logic Strongly Connect Component Normal Program 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.



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


  1. 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. 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. 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. 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. 5.
    Brewka, G., Eiter, T., Truszczynski, M.: Answer set programming at a glance. Commun. ACM 54(12), 92–103 (2011)CrossRefGoogle Scholar
  6. 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. 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. 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. 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. 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. 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. 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. 13.
    Gelfond, M., Leone, N.: Logic programming and knowledge representation - the A-Prolog perspective. Artif. Intell. 138(1–2), 3–38 (2002)MathSciNetCrossRefGoogle Scholar
  14. 14.
    Gelfond, M., Lifschitz, V.: The stable model semantics for logic programming. In: ICLP/SLP, pp. 1070–1080 (1988)Google Scholar
  15. 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)MathSciNetCrossRefMATHGoogle Scholar
  16. 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 2011Google Scholar
  17. 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)CrossRefGoogle Scholar
  18. 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. 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. 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)MathSciNetCrossRefMATHGoogle Scholar
  21. 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)CrossRefGoogle Scholar
  22. 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. 23.
    Niemelä, I.: Logic programs with stable model semantics as a constraint programming paradigm. Ann. Math. Artif. Intell. 25(3–4), 241–273 (1999)CrossRefMATHGoogle Scholar
  24. 24.
    Niemelä, I.: Stable models and difference logic. Ann. Math. Artif. Intell. 53(1–4), 313–329 (2008)MathSciNetCrossRefMATHGoogle Scholar
  25. 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. 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)MathSciNetCrossRefMATHGoogle Scholar
  27. 27.
    Simons, P., Niemelä, I., Soininen, T.: Extending and implementing the stable model semantics. Artif. Intell. 138(1–2), 181–234 (2002)CrossRefMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  1. 1.Department of Information and Computer ScienceAalto University School of ScienceEspooFinland

Personalised recommendations