Skip to main content
Log in

Extending SMT solvers with support for finite domain alldifferent constraint

  • Published:
Constraints Aims and scope Submit manuscript

Abstract

In this paper we consider integration of SMT solvers with the filtering algorithms for the finite domain alldifferent constraint. Such integration makes SMT solvers suitable for solving constraint satisfaction problems with the alldifferent constraint involved. First, we present a novel algorithm for explaining inconsistencies and propagations in the alldifferent constraint. We compare it to Katsirelos’ algorithm and flow-based algorithms that are commonly used for that purpose. Then we describe our DPLL(T)-compliant SMT theory solver for constraint satisfaction problems that include alldifferent constraints. We also provide an experimental evaluation of our approach.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11

Similar content being viewed by others

Notes

  1. Notice that our definition of the residual graph from Section 3.1 is rather simplified, compared to the usual general definition of the residual graph in the flow networks [31], but the two definitions coincide in case of the graph assigned to the alldifferent constraint.

  2. The CSP theory refers to the standard first-order theory of integers (as described in SMT-LIB [3]) extended with the axioms that define the meaning of the global constraints.

  3. http://www.matf.bg.ac.rs/milan/argosmt/

  4. http://minisat.se/

  5. http://www.minizinc.org/g12distrib.html

  6. http://www.opturion.com/

  7. All instances can be found at: http://www.math.rs/milan/argosmt/instances.zip

  8. As stated in [36], this problem, as a typical example of a combinatorial design problem, has structural properties that are often seen in many practical applications.

References

  1. Bankovic, M., & Maric, F. (2010). An Alldifferent constraint solver in SMT. In 8th International Workshop on Satisfiability Modulo Theories.

  2. Barrett, C., Sebastiani, R., Seshia, S.A., & Tinelli, C. (2009). Satisfiability Modulo Theories. In Handbook of Satisfiability, chap. 26, pp. 825–885. IOS Press.

  3. Barrett, C., Stump, A., & Tinelli, C. (2010). The SMT-LIB Standard: Version 2.0, http://smtlib.cs.uiowa.edu/papers/smt-lib-reference-v2.0-r12.09.09.pdf.

  4. Berge, C. (1970). Graphes et hypergraphes.

  5. Bofill, M., Palahí, M., Suy, J., & Villaret, M. (2012). Solving constraint satisfaction problems with SAT modulo theories. Constraints, 17(3), 273–303.

    Article  MathSciNet  MATH  Google Scholar 

  6. Bozzano, M., Bruttomesso, R., Cimatti, A., Junttila, T., Van Rossum, P., Schulz, S., & Sebastiani, R. (2005). An incremental and layered procedure for the satisfiability of linear arithmetic logic. In Tools and Algorithms for the Construction and Analysis of Systems, pp. 317–333. Springer.

  7. Davis, M., Logemann, G., & Loveland, D. (1962). A machine program for theorem-proving. Communications of the ACM, 5 (7), 394–397. doi:10.1145/368273.368557.

    Article  MathSciNet  MATH  Google Scholar 

  8. Downing, N., Feydy, T., & Stuckey, P.J. (2012). Explaining alldifferent. In Proceedings of the Thirty-fifth Australasian Computer Science Conference-Volume 122, pp. 115–124. Australian Computer Society, Inc.

  9. Downing, N., Feydy, T., & Stuckey, P.J. (2012). Explaining flow-based propagation. In Integration of AI and OR Techniques in Contraint Programming for Combinatorial Optimzation Problems, pp. 146–162. Springer.

  10. Dutertre, B., & De Moura, L. (2006). The Yices SMT solver. Tool paper at http://yices.csl.sri.com/tool-paper.pdf2, Vol. 2.

  11. Ford, L.R., & Fulkerson, D.R. (1956). Maximal flow through a network. Canadian Journal Mathematics, 8(3), 399–404.

    Article  MathSciNet  MATH  Google Scholar 

  12. Ganzinger, H., Hagen, G., Nieuwenhuis, R., Oliveras, A., & Tinelli, C. (2004). DPLL(T): Fast Decision Procedures. In CAV, Lecture Notes in Computer Science, vol. 3114, pp. 175–188. Springer.

  13. Gent, I.P., Jefferson, C., & Miguel, I. (2006). Minion: A fast scalable constraint solver. In ECAI, vol. 141, pp. 98–102.

  14. Gent, I.P., & Lynce, I. (2005). A SAT encoding for the social golfer problem. Modelling and Solving Problems with Constraints, 2.

  15. Gent, I.P., Miguel, I., & Moore, N.C. (2010). Lazy explanations for constraint propagators. In Practical Aspects of Declarative Languages, pp. 217–233. Springer.

  16. Gent, I.P., Miguel, I., & Nightingale, P. (2008). Generalised arc consistency for the alldifferent constraint: An empirical survey. Artificial Intelligence, 172(18), 1973–2000.

    Article  MathSciNet  MATH  Google Scholar 

  17. Gomes, C., & Shmoys, D. (2002). Completing quasigroups or latin squares: A structured graph coloring problem. In proceedings of the Computational Symposium on Graph Coloring and Generalizations, pp. 22–39.

  18. van Hoeve, W.J. (2001). The alldifferent constraint: A survey. arXiv:preprintcs/0105015.

  19. Janicic, P. (2010). Uniform Reduction to SAT Vol. 8.

  20. Janicic, P. (2010). Maric, F., Uniform reduction to SMT.

  21. Katsirelos, G. (2008). Nogood processing in CSPs. Ph.D. thesis: University of Toronto.

    Google Scholar 

  22. Krstic, S., & Goel, A. (2007). Architecting Solvers for SAT Modulo Theories: Nelson-Oppen with DPLL. In FroCoS, Lecture Notes in Computer Science, vol. 4720, pp. 1–27. Springer.

  23. Lewis, R. (2007). Metaheuristics can solve sudoku puzzles. Journal of Heuristics, 13(4), 387–401.

    Article  Google Scholar 

  24. Marques-Silva, J., Lynce, I., & Malik, S. (2009). Conflict-Driven Clause Learning SAT Solvers. In Handbook of Satisfiability, chap. 4, pp. 131–155. IOS Press.

  25. Moore, N. (2011). Improving the efficiency of learning CSP solvers. Ph.D. thesis: University of St Andrews.

    Google Scholar 

  26. Nieuwenhuis, R. (2009). Sat modulo theories: Enhancing SAT with special-purpose algorithms. In Theory and Applications of Satisfiability Testing-SAT 2009, pp. 1–1. Springer.

  27. Nieuwenhuis, R., & Oliveras, A. (2007). Rodríguez-Carbonell, E., Rubio, A.: Challenges in satisfiability modulo theories. In Term Rewriting and Applications, pp. 2–18. Springer.

  28. Ohrimenko, O., Stuckey, P.J., & Codish, M. (2009). Propagation via lazy clause generation. Constraints, 14(3), 357–391.

    Article  MathSciNet  MATH  Google Scholar 

  29. Petke, J., & Jeavons, P. (2011). The order encoding: from tractable CSP to tractable SAT. In Theory and Applications of Satisfiability Testing-SAT 2011, pp. 371–372. Springer.

  30. Régin, J.C. (1994). A filtering algorithm for constraints of difference in CSPs. In AAAI, vol. 94, pp. 362–367.

  31. Régin, J.C. (1996). Generalized arc consistency for global cardinality constraint. In Proceedings of the thirteenth national conference on Artificial intelligence-Volume 1, pp. 209–215. AAAI Press.

  32. Rochart, G., Jussien, N., & Laburthe, F. (2003). Challenging explanations for global constraints. In CP03 Workshop on User-Interaction in Constraint Satisfaction (UICS03), pp. 31–43.

  33. Rossi, F., Van Beek, P., & Walsh, T. (2006). Handbook of constraint programming: Elsevier.

  34. Schulte, C., & Stuckey, P.J. (2004). Speeding up constraint propagation. In Principles and Practice of Constraint Programming–CP 2004, pp. 619–633. Springer.

  35. Schulte, C., & Stuckey, P.J. (2005). When do bounds and domain propagation lead to the same search space. ACM Transactions on Programming Languages and Systems (TOPLAS), 27(3), 388–425.

    Article  Google Scholar 

  36. Sellmann, M., & Kadioglu, S. (2008). Dichotomic search protocols for constrained optimization. In Principles and Practice of Constraint Programming, pp. 251–265. Springer.

  37. Simonis, H. (2008). Kakuro as a constraint problem. In Proc. seventh Int. Works on Constraint Modelling and Reformulation.

  38. Stojadinović, M., & Marić, F. (2014). meSAT: multiple encodings of CSP to SAT. Constraints, 1–24.

  39. Stuckey, P.J. (2010). Lazy clause generation: Combining the power of SAT and CP (and MIP?) solving. In Integration of AI and OR Techniques in Constraint Programming for Combinatorial Optimization Problems, pp. 5–9. Springer.

  40. Tamura, N., Taga, A., Kitagawa, S., & Banbara, M. (2009). Compiling finite linear CSP into SAT. Constraints, 14(2), 254–272.

    Article  MathSciNet  MATH  Google Scholar 

  41. Tarjan, R. (1972). Depth-first search and linear graph algorithms. SIAM Journal Computing, 1(2), 146–160.

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgements

This work was partially supported by the Serbian Ministry of Science grant 174021 and by the SNF grant SCOPES IZ73Z0_127979/1. The author is grateful to Filip Marić and to anonymous reviewers for very careful reading of the text and providing detailed and useful comments and remarks.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Milan Banković.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Banković, M. Extending SMT solvers with support for finite domain alldifferent constraint. Constraints 21, 463–494 (2016). https://doi.org/10.1007/s10601-015-9232-8

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10601-015-9232-8

Keywords

Navigation