Abstract
We present a decision procedure for checking entailment between separation logic formulas with inductive predicates specifying complex data structures corresponding to finite nesting of various kinds of singly linked lists: acyclic or cyclic, nested lists, skip lists, etc. The decision procedure is compositional in the sense that it reduces the problem of checking entailment between two arbitrary formulas to the problem of checking entailment between a formula and an atom. Subsequently, in case the atom is a predicate, we reduce the entailment to testing membership of a tree derived from the formula in the language of a tree automaton derived from the predicate. The procedure is later also extended to doubly linked lists. We implemented this decision procedure and tested it successfully on verification conditions obtained from programs using both singly and doubly linked nested lists as well as skip lists.
Similar content being viewed by others
Notes
Our former work [9] does not include this constraint, thus the procedure proposed was incomplete.
Points-to edges are depicted as simple lines, predicate edges as double lines, and disequality edges as dotted lines. For readability, we omit some of the labelling with existentially-quantified variables and some of the disequality edges in the normalised graphs.
Note that in the example in Fig. 8, we performed some manual minimisation of the result.
Our experiments were performed on a PC with an Intel Core 2 Duo @2.53 GHz processor and 4 GiB DDR3 @1067 MHz running a virtual machine with Fedora 20 (64-bit).
References
Berdine J, Calcagno C, Cook B, Distefano D, O’Hearn PW, Wies T, Yang H (2007) Shape analysis for composite data structures. In: Proceedings of CAV’07, volume 4590 of LNCS, pp 178–192. Springer
Berdine J, Calcagno C, O’Hearn PW (2005) A decidable fragment of separation logic. In: Proceedings of FSTTCS’04, volume 3328 of LNCS, pp 97–109. Springer
Berdine J, Calcagno C, O’Hearn PW (2006) Smallfoot: modular automatic assertion checking with separation logic. In: Proceedings of FMCO’05, volume 4111 of LNCS, pp 115–137. Springer
Brotherston J, Fuhs C, Gorogiannis N, Pérez JN (2014) A decision procedure for satisfiability in separation logic with inductive predicates. In: Proceedings of CSL-LICS’14, pp 25:1–25:10. ACM
Brotherston J, Gorogiannis N, Petersen RL (2012) A generic cyclic theorem prover. In: Proceedings of APLAS’12, volume 7705 of LNCS, pp 350–367. Springer
Calcagno C, Yang H, O’Hearn PW (2001) Computability and complexity results for a spatial assertion language for data structures. In: Proceedings of FSTTCS’01, volume 2245 of LNCS, pp 108–119. Springer
Chin W-N, David C, Huu HN, Shengchao Q (2012) Automated verification of shape, size and bag properties via user-defined predicates in separation logic. Sci Comput Program 77(9):1006–1036
Cook B, Haase C, Ouaknine J, Parkinson MJ, Worrell J (2011) Tractable reasoning in a fragment of separation logic. In: Proceedings of CONCUR’11, volume 6901 of LNCS, pp 235–249. Springer
Enea C, Lengál O, Sighireanu M, Vojnar T (2014) Compositional entailment checking for a fragment of separation logic. In: Proceedings of APLAS’14, volume 8858 of LNCS, pp 314–333. Springer
Enea C, Lengál O, Sighireanu M, Vojnar T (2014) Spen. https://www.irif.fr/~sighirea/spen
Enea C, Saveluc V, Sighireanu M (2013) Compositional invariant checking for overlaid and nested linked lists. In: Proceedings of ESOP’13, volume 7792 of LNCS, pp 129–148. Springer
Enea C, Sighireanu M, Wu Z (2015) On automated lemma generation for separation logic with inductive definitions. In: ATVA’15, volume 9364 of LNCS, pp 80–96. Springer
Gaifman H (1982) On local and non-local properties. Stud Logic Found Math 107:105–135
Gu X, Chen T, Wu Z (2016) A complete decision procedure for linearly compositional separation logic with data constraints. In: Proceedings of IJCAR’16, volume 9706 of LNCS, pp 532–549. Springer
Iosif R, Rogalewicz A, Šimáček J (2013) The tree width of separation logic with recursive definitions. In: Proceedings of CADE’13, volume 7898 of LNCS, pp 21–38. Springer
Iosif R, Rogalewicz A, Vojnar T (2014) Deciding entailments in inductive separation logic with tree automata. In: Proceedings of ATVA’14, volume 8837 of LNCS, pp 201–218. Springer
Ishtiaq S, O’Hearn PW (2001) BI as an assertion language for mutable data structures. In: Proceedings of POPL’01, pp 14–26. ACM
Le QL, Sun J, Chin W-N (2016) Satisfiability modulo heap-based programs. In: Proceedings of CAV’16, volume 9779 of LNCS, pp 382–404. Springer
Lengál O, Šimáček J, Vojnar T (2012) Vata: a library for efficient manipulation of non-deterministic tree automata. In: Proceedings of TACAS’12, volume 7214 of LNCS, pp 79–94. Springer
Pérez JN, Rybalchenko A (2011) Separation logic + superposition calculus = heap theorem prover. In: Proceedings of PLDI’11, pp 556–566. ACM
Pérez JN, Rybalchenko A (2013) Separation logic modulo theories. In: Proceedings of APLAS’13, volume 8301 of LNCS, pp 90–106. Springer
Piskac R, Wies T, Zufferey D (2013) Automating separation logic using SMT. In: Proceedings of CAV’13, volume 8044 of LNCS, pp 773–789. Springer
Piskac R, Wies T, Zufferey D (2014) Automating separation logic with trees and data. In: Proceedings of CAV’14, volume 8559 of LNCS, pp 711–728. Springer
Qiu X, Garg P, Stefanescu A, Madhusudan P (2013) Natural proofs for structure, data, and separation. In: Proceedings of PLDI’13, pp 231–242. ACM
Reynolds JC (2002) Separation logic: a logic for shared mutable data structures. In: Proceedings of LICS’02, pp 55–74. IEEE
Sighireanu M, Cok D (2014) Report on SL-COMP’14. JSAT 1. http://smtcomp.sourceforge.net/2014/results-SLCOMP2.shtml
Acknowledgements
This work was supported by the French ANR project Vecolib, the Czech Science Foundation (Projects 14-11384S and 16-175385), the EU/Czech IT4Innovations Excellence in Science Project LQ1602, and by the European Research Council (ERC) under the European Unions Horizon 2020 research and innovation programme (Grant Agreement No. 678177).
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Enea, C., Lengál, O., Sighireanu, M. et al. Compositional entailment checking for a fragment of separation logic. Form Methods Syst Des 51, 575–607 (2017). https://doi.org/10.1007/s10703-017-0289-4
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10703-017-0289-4