aspartame: Solving Constraint Satisfaction Problems with Answer Set Programming

  • Mutsunori Banbara
  • Martin Gebser
  • Katsumi Inoue
  • Max Ostrowski
  • Andrea Peano
  • Torsten SchaubEmail author
  • Takehide Soh
  • Naoyuki Tamura
  • Matthias Weise
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9345)


Encoding finite linear CSPs as Boolean formulas and solving them by using modern SAT solvers has proven to be highly effective by the award-winning sugar system. We here develop an alternative approach based on ASP that serves two purposes. First, it provides a library for solving CSPs as part of an encompassing logic program. Second, it furnishes an ASP-based CP solver similar to sugar. Both tasks are addressed by using first-order ASP encodings that provide us with a high degree of flexibility, either for integration within ASP or for easy experimentation with different implementations. When used as a CP solver, the resulting system aspartame re-uses parts of sugar for parsing and normalizing CSPs. The obtained set of facts is then combined with an ASP encoding that can be grounded and solved by off-the-shelf ASP systems. We establish the competitiveness of our approach by empirically contrasting aspartame and sugar.


Linear Inequality Constraint Satisfaction Problem Integer Variable Conjunctive Normal Form Function Term 
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.


  1. 1.
    Banbara, M., Gebser, M., Inoue, K., Schaub, T., Soh, T., Tamura, N., Weise, M.: Aspartame: solving CSPs with ASP. In: ASPOCP, abs/1312.6113, CoRR (2013)Google Scholar
  2. 2.
    Rossi, F., v Beek, P., Walsh, T. (eds.): Handbook of Constraint Programming. Elsevier, Melbourne (2006)zbMATHGoogle Scholar
  3. 3.
    Biere, A., Heule, M., v Maaren, H., Walsh, T. (eds.): Handbook of Satisfiability. IOS, Amsterdam (2009)zbMATHGoogle Scholar
  4. 4.
    Crawford, J., Baker, A.: Experimental results on the application of satisfiability algorithms to scheduling problems. In: AAAI, pp. 1092–1097. AAAI Press (1994)Google Scholar
  5. 5.
    Tamura, N., Taga, A., Kitagawa, S., Banbara, M.: Compiling finite linear CSP into SAT. Constraints 14, 254–272 (2009)zbMATHMathSciNetCrossRefGoogle Scholar
  6. 6.
    Baral, C.: Knowledge Representation.Reasoning and Declarative Problem Solving. Cambridge University Press, Cambridge (2003)CrossRefGoogle Scholar
  7. 7.
    Gebser, M., Kaminski, R., Kaufmann, B., Schaub, T.: Answer Set Solving in Practice. Morgan and Claypool Publishers, San Rafael (2012)Google Scholar
  8. 8.
    Beldiceanu, N., Simonis, H.: A constraint seeker: finding and ranking global constraints from examples. In: Lee, J. (ed.) CP 2011. LNCS, vol. 6876, pp. 12–26. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  9. 9.
    Tamura, N., Banbara, M., Soh, T.: Compiling pseudo-boolean constraints to SAT with order encoding. In: ICTAI, pp. 1020–1027. IEEE (2013)Google Scholar
  10. 10.
    Gent, I., Nightingale, P.: A new encoding of alldifferent into SAT. In: Workshop on Modelling and Reformulating Constraint Satisfaction Problems (2004)Google Scholar
  11. 11.
    Bessiere, C., Katsirelos, G., Narodytska, N., Quimper, C., Walsh, T.: Decompositions of all different, global cardinality and related constraints. In: IJCAI, pp. 419–424 (2009)Google Scholar
  12. 12.
    Soh, T., Inoue, K., Tamura, N., Banbara, M., Nabeshima, H.: A SAT-based method for solving the two-dimensional strip packing problem. Fund. Informaticae 102, 467–487 (2010)zbMATHMathSciNetGoogle Scholar
  13. 13.
    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) CrossRefGoogle Scholar
  14. 14.
    Balduccini, M.: Representing constraint satisfaction problems in answer set programming. In: ASPOCP, pp. 16–30 (2009)Google Scholar
  15. 15.
    Drescher, C., Walsh, T.: A translational approach to constraint answer set solving. Theor. Pract. Logic Program. 10, 465–480 (2010)zbMATHMathSciNetCrossRefGoogle Scholar
  16. 16.
    Ostrowski, M., Schaub, T.: ASP modulo CSP: the clingcon system. Theor. Pract. Logic Program. 12, 485–503 (2012)zbMATHMathSciNetCrossRefGoogle Scholar
  17. 17.
    Prestwich, S.: CNF encodings. In: [3], pp. 75–97Google Scholar
  18. 18.
    de Kleer, J.: A comparison of ATMS and CSP techniques. In: IJCAI, pp. 290–296 (1989)Google Scholar
  19. 19.
    Walsh, T.: SAT v CSP. In: CP, pp. 441–456 (2000)Google Scholar
  20. 20.
    Kasif, S.: On the parallel complexity of discrete relaxation in constraint satisfaction networks. Artif. Intell. 45, 275–286 (1990)zbMATHMathSciNetCrossRefGoogle Scholar
  21. 21.
    Gent, I.: Arc consistency in SAT. In: ECAI, pp. 121–125 (2002)Google Scholar
  22. 22.
    Iwama, K., Miyazaki, S.: SAT-variable complexity of hard combinatorial problems. In: IFIP, pp. 253–258 (1994)Google Scholar
  23. 23.
    Van Gelder, A.: Another look at graph coloring via propositional satisfiability. Discrete Appl. Math. 156, 230–243 (2008)zbMATHMathSciNetCrossRefGoogle Scholar
  24. 24.
    Tanjo, T., Tamura, N., Banbara, M.: Azucar: A SAT-based CSP solver using compact order encoding. In: Cimatti, A., Sebastiani, R. (eds.) SAT 2012. LNCS, vol. 7317, pp. 456–462. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  25. 25.
    Metodi, A., Codish, M., Stuckey, P.: Boolean equi-propagation for concise and efficient SAT encodings of combinatorial problems. J. Artif. Intell. Res. 46, 303–341 (2013)zbMATHMathSciNetGoogle Scholar
  26. 26.
    Ohrimenko, O., Stuckey, P., Codish, M.: Propagation via lazy clause generation. Constraints 14, 357–391 (2009)zbMATHMathSciNetCrossRefGoogle Scholar
  27. 27.
    Banbara, M., Matsunaka, H., Tamura, N., Inoue, K.: Generating combinatorial test cases by efficient SAT encodings suitable for CDCL sat solvers. In: Fermüller, C.G., Voronkov, A. (eds.) LPAR-17. LNCS, vol. 6397, pp. 112–126. Springer, Heidelberg (2010) CrossRefGoogle Scholar
  28. 28.
    Lecoutre, C., Roussel, O., van Dongen, M.: Promoting robust black-box solvers through competitions. Constraints 15, 317–326 (2010)zbMATHCrossRefGoogle Scholar
  29. 29.
    Metodi, A., Codish, M.: Compiling finite domain constraints to SAT with BEE. Theor. Pract. Logic Program. 12, 465–483 (2012)zbMATHCrossRefGoogle Scholar
  30. 30.
    Zhou, N.: The SAT compiler in B-prolog. The ALP Newsletter, March 2013Google Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Mutsunori Banbara
    • 3
  • Martin Gebser
    • 1
    • 6
  • Katsumi Inoue
    • 4
  • Max Ostrowski
    • 6
  • Andrea Peano
    • 5
  • Torsten Schaub
    • 2
    • 6
    Email author
  • Takehide Soh
    • 3
  • Naoyuki Tamura
    • 3
  • Matthias Weise
    • 6
  1. 1.Aalto University, HIITGreater HelsinkiFinland
  2. 2.INRIA RennesRennesFrance
  3. 3.Kobe UniversityKobeJapan
  4. 4.NII TokyoTokyoJapan
  5. 5.University of FerraraFerraraItaly
  6. 6.University of PotsdamPotsdamGermany

Personalised recommendations