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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
- 2.
- 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.
This will be integrated into gringo’s input language in the near future.
- 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.
- 7.
- 8.
The timeouts of sugar during translation are always due to insufficient memory.
- 9.
The system is available at http://www.cs.uni-potsdam.de/aspartame/.
References
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)
Rossi, F., v Beek, P., Walsh, T. (eds.): Handbook of Constraint Programming. Elsevier, Melbourne (2006)
Biere, A., Heule, M., v Maaren, H., Walsh, T. (eds.): Handbook of Satisfiability. IOS, Amsterdam (2009)
Crawford, J., Baker, A.: Experimental results on the application of satisfiability algorithms to scheduling problems. In: AAAI, pp. 1092–1097. AAAI Press (1994)
Tamura, N., Taga, A., Kitagawa, S., Banbara, M.: Compiling finite linear CSP into SAT. Constraints 14, 254–272 (2009)
Baral, C.: Knowledge Representation.Reasoning and Declarative Problem Solving. Cambridge University Press, Cambridge (2003)
Gebser, M., Kaminski, R., Kaufmann, B., Schaub, T.: Answer Set Solving in Practice. Morgan and Claypool Publishers, San Rafael (2012)
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)
Tamura, N., Banbara, M., Soh, T.: Compiling pseudo-boolean constraints to SAT with order encoding. In: ICTAI, pp. 1020–1027. IEEE (2013)
Gent, I., Nightingale, P.: A new encoding of alldifferent into SAT. In: Workshop on Modelling and Reformulating Constraint Satisfaction Problems (2004)
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)
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)
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)
Balduccini, M.: Representing constraint satisfaction problems in answer set programming. In: ASPOCP, pp. 16–30 (2009)
Drescher, C., Walsh, T.: A translational approach to constraint answer set solving. Theor. Pract. Logic Program. 10, 465–480 (2010)
Ostrowski, M., Schaub, T.: ASP modulo CSP: the clingcon system. Theor. Pract. Logic Program. 12, 485–503 (2012)
Prestwich, S.: CNF encodings. In: [3], pp. 75–97
de Kleer, J.: A comparison of ATMS and CSP techniques. In: IJCAI, pp. 290–296 (1989)
Walsh, T.: SAT v CSP. In: CP, pp. 441–456 (2000)
Kasif, S.: On the parallel complexity of discrete relaxation in constraint satisfaction networks. Artif. Intell. 45, 275–286 (1990)
Gent, I.: Arc consistency in SAT. In: ECAI, pp. 121–125 (2002)
Iwama, K., Miyazaki, S.: SAT-variable complexity of hard combinatorial problems. In: IFIP, pp. 253–258 (1994)
Van Gelder, A.: Another look at graph coloring via propositional satisfiability. Discrete Appl. Math. 156, 230–243 (2008)
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)
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)
Ohrimenko, O., Stuckey, P., Codish, M.: Propagation via lazy clause generation. Constraints 14, 357–391 (2009)
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)
Lecoutre, C., Roussel, O., van Dongen, M.: Promoting robust black-box solvers through competitions. Constraints 15, 317–326 (2010)
Metodi, A., Codish, M.: Compiling finite domain constraints to SAT with BEE. Theor. Pract. Logic Program. 12, 465–483 (2012)
Zhou, N.: The SAT compiler in B-prolog. The ALP Newsletter, March 2013
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights 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)