Skip to main content

aspartame: Solving Constraint Satisfaction Problems with Answer Set Programming

  • Conference paper
  • First Online:
Logic Programming and Nonmonotonic Reasoning (LPNMR 2015)

Abstract

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.

This paper is a greatly revised version of the workshop paper [1]. The work was funded by \(^1\)AoF (251170), \(^6\)DFG (SCHA 550/10-1), \(^5\)5\(\,\times \,\)1000 (UNIFE 2011), and \(^3\)JSPS (KAKENHI 15K00099).

T. Schaub–Affiliated with Simon Fraser University, Canada, and IIIS Griffith University, Australia.

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

Similar content being viewed by others

Notes

  1. 1.

    http://bach.istc.kobe-u.ac.jp/sugar.

  2. 2.

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

  3. 3.

    When used as CP solver, aspartame re-uses sugar’s front-end for parsing and normalizing (non-linear) CSPs. Also, we extended sugar to produce a fact-based representation.

  4. 4.

    This will be integrated into gringo’s input language in the near future.

  5. 5.

    Linear and non-linear inequalities relying on further comparison operators, such as \(<\), \(>\), \(\ge \), \(=\), and \(\ne \), can be converted into the considered format via appropriate replacements [5]. Moreover, note that we here limit the constraints to the ones that are directly, i.e., without normalization by sugar, supported in our prototypical ASP encodings shipped with aspartame.

  6. 6.

    http://www.cril.univ-artois.fr/CPAI09.

  7. 7.

    http://bach.istc.kobe-u.ac.jp/sugar/package/current/docs/syntax.html.

  8. 8.

    The timeouts of sugar during translation are always due to insufficient memory.

  9. 9.

    The system is available at http://www.cs.uni-potsdam.de/aspartame/.

References

  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. Rossi, F., v Beek, P., Walsh, T. (eds.): Handbook of Constraint Programming. Elsevier, Melbourne (2006)

    MATH  Google Scholar 

  3. Biere, A., Heule, M., v Maaren, H., Walsh, T. (eds.): Handbook of Satisfiability. IOS, Amsterdam (2009)

    MATH  Google Scholar 

  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. Tamura, N., Taga, A., Kitagawa, S., Banbara, M.: Compiling finite linear CSP into SAT. Constraints 14, 254–272 (2009)

    Article  MATH  MathSciNet  Google Scholar 

  6. Baral, C.: Knowledge Representation.Reasoning and Declarative Problem Solving. Cambridge University Press, Cambridge (2003)

    Book  Google Scholar 

  7. Gebser, M., Kaminski, R., Kaufmann, B., Schaub, T.: Answer Set Solving in Practice. Morgan and Claypool Publishers, San Rafael (2012)

    Google Scholar 

  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)

    Chapter  Google Scholar 

  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. Gent, I., Nightingale, P.: A new encoding of alldifferent into SAT. In: Workshop on Modelling and Reformulating Constraint Satisfaction Problems (2004)

    Google Scholar 

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

    MATH  MathSciNet  Google Scholar 

  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)

    Chapter  Google Scholar 

  14. Balduccini, M.: Representing constraint satisfaction problems in answer set programming. In: ASPOCP, pp. 16–30 (2009)

    Google Scholar 

  15. Drescher, C., Walsh, T.: A translational approach to constraint answer set solving. Theor. Pract. Logic Program. 10, 465–480 (2010)

    Article  MATH  MathSciNet  Google Scholar 

  16. Ostrowski, M., Schaub, T.: ASP modulo CSP: the clingcon system. Theor. Pract. Logic Program. 12, 485–503 (2012)

    Article  MATH  MathSciNet  Google Scholar 

  17. Prestwich, S.: CNF encodings. In: [3], pp. 75–97

    Google Scholar 

  18. de Kleer, J.: A comparison of ATMS and CSP techniques. In: IJCAI, pp. 290–296 (1989)

    Google Scholar 

  19. Walsh, T.: SAT v CSP. In: CP, pp. 441–456 (2000)

    Google Scholar 

  20. Kasif, S.: On the parallel complexity of discrete relaxation in constraint satisfaction networks. Artif. Intell. 45, 275–286 (1990)

    Article  MATH  MathSciNet  Google Scholar 

  21. Gent, I.: Arc consistency in SAT. In: ECAI, pp. 121–125 (2002)

    Google Scholar 

  22. Iwama, K., Miyazaki, S.: SAT-variable complexity of hard combinatorial problems. In: IFIP, pp. 253–258 (1994)

    Google Scholar 

  23. Van Gelder, A.: Another look at graph coloring via propositional satisfiability. Discrete Appl. Math. 156, 230–243 (2008)

    Article  MATH  MathSciNet  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    MATH  MathSciNet  Google Scholar 

  26. Ohrimenko, O., Stuckey, P., Codish, M.: Propagation via lazy clause generation. Constraints 14, 357–391 (2009)

    Article  MATH  MathSciNet  Google Scholar 

  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)

    Chapter  Google Scholar 

  28. Lecoutre, C., Roussel, O., van Dongen, M.: Promoting robust black-box solvers through competitions. Constraints 15, 317–326 (2010)

    Article  MATH  Google Scholar 

  29. Metodi, A., Codish, M.: Compiling finite domain constraints to SAT with BEE. Theor. Pract. Logic Program. 12, 465–483 (2012)

    Article  MATH  Google Scholar 

  30. Zhou, N.: The SAT compiler in B-prolog. The ALP Newsletter, March 2013

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Torsten Schaub .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Banbara, M. et al. (2015). aspartame: Solving Constraint Satisfaction Problems with Answer Set Programming. In: Calimeri, F., Ianni, G., Truszczynski, M. (eds) Logic Programming and Nonmonotonic Reasoning. LPNMR 2015. Lecture Notes in Computer Science(), vol 9345. Springer, Cham. https://doi.org/10.1007/978-3-319-23264-5_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-23264-5_10

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-23263-8

  • Online ISBN: 978-3-319-23264-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics