A Benders Decomposition Approach to Deciding Modular Linear Integer Arithmetic

  • Bishoksan Kafle
  • Graeme Gange
  • Peter Schachte
  • Harald Søndergaard
  • Peter J. Stuckey
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10491)


Verification tasks frequently require deciding systems of linear constraints over modular (machine) arithmetic. Existing approaches for reasoning over modular arithmetic use bit-vector solvers, or else approximate machine integers with mathematical integers and use arithmetic solvers. Neither is ideal; the first is sound but inefficient, and the second is efficient but unsound. We describe a linear encoding which correctly describes modular arithmetic semantics, yielding an optimistic but sound approach. Our method abstracts the problem with linear arithmetic, but progressively refines the abstraction when modular semantics is violated. This preserves soundness while exploiting the mostly integer nature of the constraint problem. We present a prototype implementation, which gives encouraging experimental results.



We are grateful for support from the Australian Research Council. The work has been supported by Discovery Project grant DP140102194, and Graeme Gange is supported through Discovery Early Career Researcher Award DE160100568.


  1. 1.
    Bardin, S., Herrmann, P., Perroud, F.: An alternative to SAT-based approaches for bit-vectors. In: Esparza, J., Majumdar, R. (eds.) TACAS 2010. LNCS, vol. 6015, pp. 84–98. Springer, Heidelberg (2010). doi: 10.1007/978-3-642-12002-2_7 CrossRefGoogle Scholar
  2. 2.
    Barrett, C., Conway, C.L., Deters, M., Hadarean, L., Jovanović, D., King, T., Reynolds, A., Tinelli, C.: CVC4. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 171–177. Springer, Heidelberg (2011). doi: 10.1007/978-3-642-22110-1_14 CrossRefGoogle Scholar
  3. 3.
    Barrett, C., Fontaine, P., Tinelli, C.: The SMT-LIB standard: version 2.5. Technical report, Department of Computer Science, The University of Iowa (2015).
  4. 4.
    Benders, J.F.: Partitioning procedures for solving mixed-variables programming problems. Numer. Math. 4(1), 238–252 (1962)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Bjørner, N., Blass, A., Gurevich, Y., Musuvathi, M.: Modular difference logic is hard, November 2008, Unpublished. arXiv:0811.0987v1
  6. 6.
    Bozzano, M., Bruttomesso, R., Cimatti, A., Franzén, A., Hanna, Z., Khasidashvili, Z., Palti, A., Sebastiani, R.: Encoding RTL constructs for MathSAT: a preliminary report. Electron. Notes Theor. Comput. Sci. 144(2), 3–14 (2006)CrossRefzbMATHGoogle Scholar
  7. 7.
    Brinkmann, R., Drechsler, R.: RTL-datapath verification using integer linear programming. In: Proceedings of the ASPDAC/VLSI Design Conference 2002, pp. 741–746. IEEE Computer Society Press (2002)Google Scholar
  8. 8.
    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). doi: 10.1007/978-3-642-00768-2_16 CrossRefGoogle Scholar
  9. 9.
    Bruttomesso, R., Cimatti, A., Franzén, A., Griggio, A., Hanna, Z., Nadel, A., Palti, A., Sebastiani, R.: A lazy and layered SMT(\(\cal{BV}\)) solver for hard industrial verification problems. In: Damm, W., Hermanns, H. (eds.) CAV 2007. LNCS, vol. 4590, pp. 547–560. Springer, Heidelberg (2007). doi: 10.1007/978-3-540-73368-3_54 CrossRefGoogle Scholar
  10. 10.
    Cimatti, A., Griggio, A., Schaafsma, B.J., Sebastiani, R.: The MathSAT5 SMT solver. In: Piterman, N., Smolka, S.A. (eds.) TACAS 2013. LNCS, vol. 7795, pp. 93–107. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-36742-7_7 CrossRefGoogle Scholar
  11. 11.
    Conchon, S., Déharbe, D., Heizmann, M., Weber, T.: SMT-COMP (2016).
  12. 12.
    Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms. MIT Press, Cambridge (2009)zbMATHGoogle Scholar
  13. 13.
    Cousot, P., Cousot, R., Feret, J., Mauborgne, L., Miné, A., Monniaux, D., Rival, X.: The ASTREÉ analyzer. In: Sagiv, M. (ed.) ESOP 2005. LNCS, vol. 3444, pp. 21–30. Springer, Heidelberg (2005). doi: 10.1007/978-3-540-31987-0_3 CrossRefGoogle Scholar
  14. 14.
    de Moura, L., Bjørner, N.: Z3: an efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008). doi: 10.1007/978-3-540-78800-3_24 CrossRefGoogle Scholar
  15. 15.
    de Moura, L., Passmore, G.O.: The strategy challenge in SMT solving. In: Bonacina, M.P., Stickel, M.E. (eds.) Automated Reasoning and Mathematics. LNCS, vol. 7788, pp. 15–44. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-36675-8_2 CrossRefGoogle Scholar
  16. 16.
    Dutertre, B.: Yices 2.2. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 737–744. Springer, Cham (2014). doi: 10.1007/978-3-319-08867-9_49 Google Scholar
  17. 17.
    Ferrandi, F., Rendine, M., Sciuto, D.: Functional verification for SystemC descriptions using constraint solving. In: 2002 Design, Automation and Test in Europe Conference and Exposition (DATE 2002), pp. 744–751. IEEE Computer Society Press (2002)Google Scholar
  18. 18.
    Fröhlich, A., Kovásznai, G., Biere, A.: Efficiently solving bit-vector problems using model checkers. In: SMT Workshop (2013)Google Scholar
  19. 19.
    Fröhlich, A., Kovásznai, G., Biere, A.: More on the complexity of quantifier-free fixed-size bit-vector logics with binary encoding. In: Bulatov, A.A., Shur, A.M. (eds.) CSR 2013. LNCS, vol. 7913, pp. 378–390. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-38536-0_33 CrossRefGoogle Scholar
  20. 20.
    Ganesh, V., Dill, D.L.: A decision procedure for bit-vectors and arrays. In: Damm, W., Hermanns, H. (eds.) CAV 2007. LNCS, vol. 4590, pp. 519–531. Springer, Heidelberg (2007). doi: 10.1007/978-3-540-73368-3_52 CrossRefGoogle Scholar
  21. 21.
    Gange, G., Søndergaard, H., Stuckey, P.J., Schachte, P.: Solving difference constraints over modular arithmetic. In: Bonacina, M.P. (ed.) CADE 2013. LNCS, vol. 7898, pp. 215–230. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-38574-2_15 CrossRefGoogle Scholar
  22. 22.
    Gurfinkel, A., Kahsai, T., Komuravelli, A., Navas, J.A.: The SeaHorn verification framework. In: Kroening, D., Păsăreanu, C.S. (eds.) CAV 2015. LNCS, vol. 9206, pp. 343–361. Springer, Cham (2015). doi: 10.1007/978-3-319-21690-4_20 CrossRefGoogle Scholar
  23. 23.
    Gurobi Optimization, Inc.: Gurobi optimizer reference manual (2016).
  24. 24.
    Hadarean, L., Bansal, K., Jovanović, D., Barrett, C., Tinelli, C.: A tale of two solvers: eager and lazy approaches to bit-vectors. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 680–695. Springer, Cham (2014). doi: 10.1007/978-3-319-08867-9_45 Google Scholar
  25. 25.
    Hooker, J.N., Ottosson, G.: Logic-based Benders decomposition. Math. Program. 96(1), 33–60 (2003)MathSciNetCrossRefzbMATHGoogle Scholar
  26. 26.
    Jackson, D.: Software Abstractions: Logic, Language and Analysis. MIT Press, Cambridge (2006)Google Scholar
  27. 27.
    Jeannet, B., Miné, A.: Apron: a library of numerical abstract domains for static analysis. In: Bouajjani, A., Maler, O. (eds.) CAV 2009. LNCS, vol. 5643, pp. 661–667. Springer, Heidelberg (2009). doi: 10.1007/978-3-642-02658-4_52 CrossRefGoogle Scholar
  28. 28.
    Kovásznai, G., Veith, H., Fröhlich, A., Biere, A.: On the complexity of symbolic verification and decision problems in bit-vector logic. In: Csuhaj-Varjú, E., Dietzfelbinger, M., Ésik, Z. (eds.) MFCS 2014. LNCS, vol. 8635, pp. 481–492. Springer, Heidelberg (2014). doi: 10.1007/978-3-662-44465-8_41 Google Scholar
  29. 29.
    Michel, L.D., Hentenryck, P.V.: Constraint satisfaction over bit-vectors. In: Milano, M. (ed.) CP 2012. LNCS, pp. 527–543. Springer, Heidelberg (2012). doi: 10.1007/978-3-642-33558-7_39 CrossRefGoogle Scholar
  30. 30.
    Neumaier, A., Shcherbina, O.: Safe bounds in linear and mixed-integer linear programming. Math. Program. 99(2), 283–296 (2004)MathSciNetCrossRefzbMATHGoogle Scholar
  31. 31.
    Neumaier, A., Shcherbina, O., Huyer, W., Vinkó, T.: A comparison of complete global optimization solvers. Math. Program. 103(2), 335–356 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  32. 32.
    Niemetz, A., Preiner, M., Biere, A.: Boolector 2.0 system description. J. Satisf. Boolean Model. Comput. 9, 53–58 (2014). (published 2015)Google Scholar
  33. 33.
    Nieuwenhuis, R.: The IntSat method for integer linear programming. In: O’Sullivan, B. (ed.) CP 2014. LNCS, vol. 8656, pp. 574–589. Springer, Cham (2014). doi: 10.1007/978-3-319-10428-7_42 Google Scholar
  34. 34.
    Parthasarathy, G., Iyer, M.K., Cheng, K., Wang, L.: An efficient finite-domain constraint solver for circuits. In: Malik, S., Fix, L., Kahng, A.B. (eds.) Proceedings of the 41th Design Automation Conference (DAC 2004), pp. 212–217. ACM Publ. (2004)Google Scholar
  35. 35.
    Vemuri, R., Kalyanaraman, R.: Generation of design verification tests from behavioral VHDL programs using path enumeration and constraint programming. IEEE Trans. VLSI Syst. 3(2), 201–214 (1995)CrossRefGoogle Scholar
  36. 36.
    Wang, W., Søndergaard, H., Stuckey, P.J.: A bit-vector solver with word-level propagation. In: Quimper, C.-G. (ed.) CPAIOR 2016. LNCS, vol. 9676, pp. 374–391. Springer, Cham (2016). doi: 10.1007/978-3-319-33954-2_27 Google Scholar
  37. 37.
    Zeljić, A., Wintersteiger, C.M., Rümmer, P.: Deciding bit-vector formulas with mcSAT. In: Creignou, N., Le Berre, D. (eds.) SAT 2016. LNCS, vol. 9710, pp. 249–266. Springer, Cham (2016). doi: 10.1007/978-3-319-40970-2_16 Google Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Bishoksan Kafle
    • 1
  • Graeme Gange
    • 1
  • Peter Schachte
    • 1
  • Harald Søndergaard
    • 1
  • Peter J. Stuckey
    • 1
  1. 1.School of Computing and Information SystemsThe University of MelbourneMelbourneAustralia

Personalised recommendations