Advertisement

A Decidable Fragment in Separation Logic with Inductive Predicates and Arithmetic

  • Quang Loc Le
  • Makoto Tatsuta
  • Jun Sun
  • Wei-Ngan Chin
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10427)

Abstract

We consider the satisfiability problem for a fragment of separation logic including inductive predicates with shape and arithmetic properties. We show that the fragment is decidable if the arithmetic properties can be represented as semilinear sets. Our decision procedure is based on a novel algorithm to infer a finite representation for each inductive predicate which precisely characterises its satisfiability. Our analysis shows that the proposed algorithm runs in exponential time in the worst case. We have implemented our decision procedure and integrated it into an existing verification system. Our experiment on benchmarks shows that our procedure helps to verify the benchmarks effectively.

Keywords

Satisfiability solving Decidability Separation logic Inductive predicates 

Notes

Acknowledgements

Quang Loc and Jun Sun are partially supported by NRF grant RGNRF1501 and Wei-Ngan by MoE Tier-2 grant MOE2013-T2-2-146.

References

  1. 1.
    Berdine, J., Calcagno, C., O’Hearn, P.W.: A decidable fragment of separation logic. In: Lodaya, K., Mahajan, M. (eds.) FSTTCS 2004. LNCS, vol. 3328, pp. 97–109. Springer, Heidelberg (2004). doi: 10.1007/978-3-540-30538-5_9 CrossRefGoogle Scholar
  2. 2.
    Berdine, J., Calcagno, C., O’Hearn, P.W.: Symbolic execution with separation logic. In: Yi, K. (ed.) APLAS 2005. LNCS, vol. 3780, pp. 52–68. Springer, Heidelberg (2005). doi: 10.1007/11575467_5 CrossRefGoogle Scholar
  3. 3.
    Bouajjani, A., Jonsson, B., Nilsson, M., Touili, T.: Regular model checking. In: Emerson, E.A., Sistla, A.P. (eds.) CAV 2000. LNCS, vol. 1855, pp. 403–418. Springer, Heidelberg (2000). doi: 10.1007/10722167_31 CrossRefGoogle Scholar
  4. 4.
    Bozga, M., Iosif, R., Konečný, F.: Fast acceleration of ultimately periodic relations. In: Touili, T., Cook, B., Jackson, P. (eds.) CAV 2010. LNCS, vol. 6174, pp. 227–242. Springer, Heidelberg (2010). doi: 10.1007/978-3-642-14295-6_23 CrossRefGoogle Scholar
  5. 5.
    Brotherston, J., Fuhs, C., Pérez, J.A.N., Gorogiannis, N.: A decision procedure for satisfiability in separation logic with inductive predicates. In: CSL-LICS 2014, pp. 25:1–25:10, (2014). ACM, New YorkGoogle Scholar
  6. 6.
    Brotherston, J., Gorogiannis, N.: Cyclic abduction of inductively defined safety and termination preconditions. In: Müller-Olm, M., Seidl, H. (eds.) SAS 2014. LNCS, vol. 8723, pp. 68–84. Springer, Cham (2014). doi: 10.1007/978-3-319-10936-7_5 Google Scholar
  7. 7.
    Calcagno, C., Yang, H., O’Hearn, P.W.: Computability and complexity results for a spatial assertion language for data structures. In: Hariharan, R., Vinay, V., Mukund, M. (eds.) FSTTCS 2001. LNCS, vol. 2245, pp. 108–119. Springer, Heidelberg (2001). doi: 10.1007/3-540-45294-X_10 CrossRefGoogle Scholar
  8. 8.
    Chin, W.N., David, C., Nguyen, H.H., Qin, S.: Automated verification of shape, size and bag properties via user-defined predicates in separation logic. SCP 77(9), 1006–1036 (2012)zbMATHGoogle Scholar
  9. 9.
    Cook, B., Haase, C., Ouaknine, J., Parkinson, M., Worrell, J.: Tractable reasoning in a fragment of separation logic. In: Katoen, J.-P., König, B. (eds.) CONCUR 2011. LNCS, vol. 6901, pp. 235–249. Springer, Heidelberg (2011). doi: 10.1007/978-3-642-23217-6_16 CrossRefGoogle Scholar
  10. 10.
    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
  11. 11.
    Enea, C., Lengál, O., Sighireanu, M., Vojnar, T.: Compositional entailment checking for a fragment of separation logic. In: Garrigue, J. (ed.) APLAS 2014. LNCS, vol. 8858, pp. 314–333. Springer, Cham (2014). doi: 10.1007/978-3-319-12736-1_17 Google Scholar
  12. 12.
    Gu, X., Chen, T., Wu, Z.: A complete decision procedure for linearly compositional separation logic with data constraints. In: Olivetti, N., Tiwari, A. (eds.) IJCAR 2016. LNCS (LNAI), vol. 9706, pp. 532–549. Springer, Cham (2016). doi: 10.1007/978-3-319-40229-1_36 Google Scholar
  13. 13.
    Iosif, R., Rogalewicz, A., Simacek, J.: The tree width of separation logic with recursive definitions. In: Bonacina, M.P. (ed.) CADE 2013. LNCS (LNAI), vol. 7898, pp. 21–38. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-38574-2_2 CrossRefGoogle Scholar
  14. 14.
    Ishtiaq, S., O’Hearn, P.W.: BI as an assertion language for mutable data structures. In: ACM POPL, pp. 14–26, London, January 2001Google Scholar
  15. 15.
    Le, Q.L., Gherghina, C., Qin, S., Chin, W.-N.: Shape analysis via second-order bi-abduction. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 52–68. Springer, Cham (2014). doi: 10.1007/978-3-319-08867-9_4 Google Scholar
  16. 16.
    Le, Q.L., Sharma, A., Craciun, F., Chin, W.-N.: Towards complete specifications with an error calculus. In: Brat, G., Rungta, N., Venet, A. (eds.) NFM 2013. LNCS, vol. 7871, pp. 291–306. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-38088-4_20 CrossRefGoogle Scholar
  17. 17.
    Le, Q.L., Sun, J., Chin, W.-N.: Satisfiability modulo heap-based programs. In: Chaudhuri, S., Farzan, A. (eds.) CAV 2016. LNCS, vol. 9779, pp. 382–404. Springer, Cham (2016). doi: 10.1007/978-3-319-41528-4_21 Google Scholar
  18. 18.
    Le, Q.L., Sun, J., Qin, S.: Verifying heap-manipulating programs using constrained horn clauses (technical report) (2017)Google Scholar
  19. 19.
    Le, Q.L., Sun, J., Qin, S., Chin, W.-N.: Frame inference for inductive entailment proofs in separation logic (technical report), May 2016Google Scholar
  20. 20.
    Le, Q.L., Tatsuta, M., Jun, S., Chin, W.-N.: A decidable fragment in separation logic with inductive predicates and arithmetic (technical report) (2017)Google Scholar
  21. 21.
    Navarro Pérez, J.A., Rybalchenko, A.: Separation logic + superposition calculus = heap theorem prover. In: PLDI 2011, pp. 556–566. ACM (2011)Google Scholar
  22. 22.
    Navarro Pérez, J.A., Rybalchenko, A.: Separation logic modulo theories. In: Shan, C. (ed.) APLAS 2013. LNCS, vol. 8301, pp. 90–106. Springer, Cham (2013). doi: 10.1007/978-3-319-03542-0_7 CrossRefGoogle Scholar
  23. 23.
    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). doi: 10.1007/978-3-642-39799-8_54 CrossRefGoogle Scholar
  24. 24.
    Piskac, R., Wies, T., Zufferey, D.: GRASShopper: complete heap verification with mixed specifications. In: Ábrahám, E., Havelund, K. (eds.) TACAS 2014. LNCS, vol. 8413, pp. 124–139. Springer, Heidelberg (2014). doi: 10.1007/978-3-642-54862-8_9 CrossRefGoogle Scholar
  25. 25.
    Popeea, C., Chin, W.-N.: Inferring disjunctive postconditions. In: Okada, M., Satoh, I. (eds.) ASIAN 2006. LNCS, vol. 4435, pp. 331–345. Springer, Heidelberg (2007). doi: 10.1007/978-3-540-77505-8_26 CrossRefGoogle Scholar
  26. 26.
    Qiu, X., Garg, P., Ştefănescu, A., Madhusudan, P.: Natural proofs for structure, data, and separation. In: PLDI, pp. 231–242 (2013). ACM, New YorkGoogle Scholar
  27. 27.
    Reynolds, J.: Separation logic: a logic for shared mutable data structures. In: IEEE LICS, pp. 55–74 (2002)Google Scholar
  28. 28.
    Serban, C.: A formalization of separation logic in SMT-LIB v2.5 syntax, types and semantics. Technical report, Verimag (2015) Accessed Jan 2017Google Scholar
  29. 29.
    Tatsuta, M., Le, Q.L., Chin, W.-N.: Decision procedure for separation logic with inductive definitions and Presburger arithmetic. In: Igarashi, A. (ed.) APLAS 2016. LNCS, vol. 10017, pp. 423–443. Springer, Cham (2016). doi: 10.1007/978-3-319-47958-3_22 CrossRefGoogle Scholar
  30. 30.
    Trinh, M.-T., Le, Q.L., David, C., Chin, W.-N.: Bi-abduction with pure properties for specification inference. In: Shan, C. (ed.) APLAS 2013. LNCS, vol. 8301, pp. 107–123. Springer, Cham (2013). doi: 10.1007/978-3-319-03542-0_8 CrossRefGoogle Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Quang Loc Le
    • 1
  • Makoto Tatsuta
    • 2
  • Jun Sun
    • 3
  • Wei-Ngan Chin
    • 4
  1. 1.School of ComputingTeesside UniversityMiddlesbroughUK
  2. 2.National Institute of Informatics/SokendaiTokyoJapan
  3. 3.Singapore University of Technology and DesignSingaporeSingapore
  4. 4.National University of SingaporeSingaporeSingapore

Personalised recommendations