A Decision Procedure for Separation Logic in SMT

  • Andrew ReynoldsEmail author
  • Radu Iosif
  • Cristina Serban
  • Tim King
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9938)


This paper presents a complete decision procedure for the entire quantifier-free fragment of Separation Logic (\(\mathsf {SL}\)) interpreted over heaplets with data elements ranging over a parametric multi-sorted (possibly infinite) domain. The algorithm uses a combination of theories and is used as a specialized solver inside a DPLL(T) architecture. A prototype was implemented within the CVC4 SMT solver. Preliminary evaluation suggests the possibility of using this procedure as a building block of a more elaborate theorem prover for \(\mathsf {SL}\) with inductive predicates, or as back-end of a bounded model checker for programs with low-level pointer and data manipulations.


  1. 1.
    Bansal, K.: Decision procedures for finite sets with cardinality and local theory extensions. Ph.D. thesis, New York University (2016)Google Scholar
  2. 2.
    Barrett, C., Conway, C., Deters, M., Hadarean, L., Jovanovic, D., King, T., Reynolds, A., Tinelli, C.: CVC4. In: CAV 2011, pp. 171–177 (2011)Google Scholar
  3. 3.
    Barrett, C., Fontaine, P., Tinelli, C.: The SMT-LIB 2.5 standard. Technical report, The University of Iowa (2015).
  4. 4.
    Berdine, J., Calcagno, C., Cook, B., Distefano, D., O’Hearn, P.W., Wies, T., Yang, H.: Shape analysis for composite data structures. In: Damm, W., Hermanns, H. (eds.) CAV 2007. LNCS, vol. 4590, pp. 178–192. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  5. 5.
    Bjørner, N., Janota, M.: Playing with quantified satisfaction. In: LPAR 2015. EPIC, vol. 35, pp. 15–27 (2015)Google Scholar
  6. 6.
    Brotherston, J., Gorogiannis, N., Petersen, R.L.: A generic cyclic theorem prover. In: Jhala, R., Igarashi, A. (eds.) APLAS 2012. LNCS, vol. 7705, pp. 350–367. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  7. 7.
    Calcagno, C., Distefano, D.: Infer: an automatic program verifier for memory safety of C programs. In: Bobaru, M., Havelund, K., Holzmann, G.J., Joshi, R. (eds.) NFM 2011. LNCS, vol. 6617, pp. 459–465. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  8. 8.
    Calcagno, C., Gardner, P., Hague, M.: From separation logic to first-order logic. In: Sassone, V. (ed.) FOSSACS 2005. LNCS, vol. 3441, pp. 395–409. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  9. 9.
    Calcagno, C., Yang, H., O’Hearn, P.W.: Computability and complexity results for a spatial assertion language for data structures. In: Hariharan, R., Mukund, M., Vinay, V. (eds.) FSTTCS 2001. LNCS, vol. 2245, pp. 108–119. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  10. 10.
    Enea, C., Sighireanu, M., Wu, Z.: On automated lemma generation for separation logic with inductive definitions. In: Finkbeiner, B., et al. (eds.) ATVA 2015. LNCS, vol. 9364, pp. 80–96. Springer, Heidelberg (2015). doi: 10.1007/978-3-319-24953-7_7 CrossRefGoogle Scholar
  11. 11.
    Galmiche, D., Méry, D.: Tableaux and resource graphs for separation logic. J. Logic Comput. 20(1), 189–231 (2010)MathSciNetCrossRefzbMATHGoogle Scholar
  12. 12.
    Ganzinger, H., Hagen, G., Nieuwenhuis, R., Oliveras, A., Tinelli, C.: DPLL(T): fast decision procedures. In: Alur, R., Peled, D.A. (eds.) CAV 2004. LNCS, vol. 3114, pp. 175–188. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  13. 13.
    Ge, Y., de Moura, L.: Complete instantiation for quantified formulas in satisfiabiliby modulo theories. In: Bouajjani, A., Maler, O. (eds.) CAV 2009. LNCS, vol. 5643, pp. 306–320. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  14. 14.
    Iosif, R., Rogalewicz, A., Vojnar, T.: Slide: Separation logic with inductive definitions.
  15. 15.
    Ishtiaq, S.S., O’Hearn, P.W.: BI as an assertion language for mutable data structures. ACM SIGPLAN Not. 36, 14–26 (2001)CrossRefzbMATHGoogle Scholar
  16. 16.
    Navarro Pérez, J.A., Rybalchenko, A.: Separation logic + superposition calculus = heap theorem prover. ACM SIGPLAN Not. 46(6), 556–566 (2011)CrossRefGoogle Scholar
  17. 17.
    Piskac, R., Wies, T., Zufferey, D.: Automating separation logic using SMT. In: Sharygina, N., Veith, H. (eds.) CAV 2013. LNCS, vol. 8044, pp. 773–789. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  18. 18.
    Piskac, R., Wies, T., Zufferey, D., Piskac, R., Wies, T., Zufferey, D.: Automating separation logic with trees and data. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 711–728. Springer, Heidelberg (2014)Google Scholar
  19. 19.
    Reynolds, A., Deters, M., Kuncak, V., Barrett, C.W., Tinelli, C.: Counterexample guided quantifier instantiation for synthesis in CVC4. In: CAV 2015, pp. 198–216 (2015)Google Scholar
  20. 20.
    Reynolds, A., King, T., Kuncak, V.: An instantiation-based approach for solving quantified linear arithmetic. CoRR abs/1510.02642 (2015)Google Scholar
  21. 21.
    Reynolds, J.C.: Separation logic: a logic for shared mutable data structures. In: Logic in Computer Science, LICS 2002, pp. 55–74 (2002)Google Scholar
  22. 22.
    Sighireanu, M., Cok, D.: Report on SL-COMP 2014. J. Satisf. Boolean Modeling Comput. 1, 173–186 (2014)MathSciNetGoogle Scholar
  23. 23.
    Piskac, R., Kuncak, V., Suter, P., Steiger, R., Kuncak, V.: Sets with cardinality constraints in satisfiability modulo theories. In: Jhala, R., Schmidt, D. (eds.) VMCAI 2011. LNCS, vol. 6538, pp. 403–418. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  24. 24.
    Yang, H.: Local reasoning for stateful programs. Ph.D. thesis, University of Illinois at Urbana-Champaign (2001)Google Scholar

Copyright information

© Springer International Publishing AG 2016

Authors and Affiliations

  • Andrew Reynolds
    • 1
    Email author
  • Radu Iosif
    • 2
  • Cristina Serban
    • 2
  • Tim King
    • 3
  1. 1.The University of IowaIowa CityUSA
  2. 2.Université de Grenoble Alpes, CNRS, VERIMAGGrenobleFrance
  3. 3.Google Inc.Mountain ViewUSA

Personalised recommendations