Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

A Decision Procedure for Guarded Separation Logic Complete Entailment Checking for Separation Logic with Inductive Definitions

Published: 18 January 2023 Publication History

Abstract

We develop a doubly exponential decision procedure for the satisfiability problem of guarded separation logic—a novel fragment of separation logic featuring user-supplied inductive predicates, Boolean connectives, and separating connectives, including restricted (guarded) versions of negation, magic wand, and septraction. Moreover, we show that dropping the guards for any of the preceding connectives leads to an undecidable fragment.
We further apply our decision procedure to reason about entailments in the popular symbolic heap fragment of separation logic. In particular, we obtain a doubly exponential decision procedure for entailments between (quantifier-free) symbolic heaps with inductive predicate definitions of bounded treewidth (SLbtw)—one of the most expressive decidable fragments of separation logic. Together with the recently shown 2ExpTime-hardness for entailments in said fragment, we conclude that the entailment problem for SLbtw is 2ExpTime-complete—thereby closing a previously open complexity gap.

References

[1]
Timos Antonopoulos, Nikos Gorogiannis, Christoph Haase, Max I. Kanovich, and Joël Ouaknine. 2014. Foundations for decision problems in separation logic with general inductive predicates. In Proceedings of FOSSACS’14. 411–425.
[2]
Andrew W. Appel. 2014. Program Logics—For Certified Compilers. Cambridge University Press.
[3]
Yehoshua Bar-Hillel, Micha Perles, and Eli Shamir. 1961. On formal properties of simple phrase structure grammars. Sprachtypologie und Universalienforschung 14 (1961), 143–172.
[4]
Kevin Batz, Benjamin Lucien Kaminski, Joost-Pieter Katoen, Christoph Matheja, and Thomas Noll. 2019. Quantitative separation logic: A logic for reasoning about probabilistic pointer programs. Proceedings of the ACM on Programming Languages 3, POPL (2019), Article 34, 29 pages.
[5]
Josh Berdine, Cristiano Calcagno, Byron Cook, Dino Distefano, Peter W. O’Hearn, Thomas Wies, and Hongseok Yang. 2007. Shape analysis for composite data structures. In Proceedings of CAV’07. 178–192.
[6]
Josh Berdine, Cristiano Calcagno, and Peter W. O’Hearn. 2004. A decidable fragment of separation logic. In Proceedings of FSTTCS’04. 97–109.
[7]
Josh Berdine, Cristiano Calcagno, and Peter W. O’Hearn. 2005a. Smallfoot: Modular automatic assertion checking with separation logic. In Proceedings of FMCO’05. 115–137.
[8]
Josh Berdine, Cristiano Calcagno, and Peter W. O’Hearn. 2005b. Symbolic execution with separation logic. In Proceedings of APLAS’05. 52–68.
[9]
Josh Berdine, Byron Cook, and Samin Ishtiaq. 2011. SLAyer: Memory safety for systems-level code. In Proceedings of CAV’11. 178–183.
[10]
Stefan Blom and Marieke Huisman. 2015. Witnessing the elimination of magic wands. International Journal on Software Tools for Technology Transfer 17, 6 (2015), 757–781.
[11]
Rémi Brochenin, Stéphane Demri, and Étienne Lozes. 2012. On the almighty wand. Information and Computation 211 (2012), 106–137.
[12]
James Brotherston. 2007. Formalised inductive reasoning in the logic of bunched implications. In Static Analysis. Lecture Notes in Computer Science, Vol. 4634. Springer, 87–103.
[13]
James Brotherston, Dino Distefano, and Rasmus Lerche dahl Petersen. 2011. Automated cyclic entailment proofs in separation logic. In Proceedings of CADE’11. 131–146.
[14]
James Brotherston, Carsten Fuhs, Juan Antonio Navarro Pérez, and Nikos Gorogiannis. 2014. A decision procedure for satisfiability in separation logic with inductive predicates. In Proceedings of CSL-LICS’14. Article 25, 10 pages.
[15]
Cristiano Calcagno and Dino Distefano. 2011. Infer: An automatic program verifier for memory safety of C programs. In Proceedings of NFM’11. 459–465.
[16]
Cristiano Calcagno, Dino Distefano, Jérémy Dubreil, Dominik Gabi, Pieter Hooimeijer, Martino Luca, Peter W. O’Hearn, Irene Papakonstantinou, Jim Purbrick, and Dul ma Rodriguez. 2015. Moving fast with software verification. In Proceedings of NFM’15. 3–11.
[17]
Cristiano Calcagno, Dino Distefano, Peter W. O’Hearn, and Hongseok Yang. 2006. Beyond reachability: Shape abstraction in the presence of pointer arithmetic. In Proceedings of SAS’06. 182–203.
[18]
Cristiano Calcagno, Dino Distefano, Peter W. O’Hearn, and Hongseok Yang. 2011. Compositional shape analysis by means of bi-abduction. Journal of the ACM 58, 6 (2011), Article 26, 66 pages.
[19]
Cristiano Calcagno, Peter W. O’Hearn, and Hongseok Yang. 2007. Local action and abstract separation logic. In Proceedings of LICS’07. 366–378.
[20]
Cristiano Calcagno, Hongseok Yang, and Peter W. O’Hearn. 2001. Computability and complexity results for a spatial assertion language for data structures. In Proceedings of APLAS’01. 289–300.
[21]
Wei-Ngan Chin, Cristina David, Huu Hai Nguyen, and Shengchao Qin. 2012. Automated verification of shape, size and bag properties via user-defined predicates in separation logic. Science of Computer Programming 77, 9 (2012), 1006–1036.
[22]
Byron Cook, Christoph Haase, Joël Ouaknine, Matthew J. Parkinson, and James Worrell. 2011. Tractable reasoning in a fragment of separation logic. In Proceedings of CONCUR’11. 235–249.
[23]
Bruno Courcelle and Joost Engelfriet. 2012. Graph Structure and Monadic Second-Order Logic—A Language-Theoretic Approach. Encyclopedia of Mathematics and Its Applications, Vol. 138. Cambridge University Press.
[24]
Patrick Cousot and Radhia Cousot. 1979. Constructive versions of Tarski’s fixed point theorems. Pacific Journal of Mathematics 82, 1 (1979), 43–57.
[25]
Reinhard Diestel. 2016. Graph Theory (5th ed.). Graduate Texts in Mathematics, Vol. 173. Springer.
[26]
Mnacho Echenim, Radu Iosif, and Nicolas Peltier. 2020a. The Bernays-Schönfinkel-Ramsey class of separation logic with uninterpreted predicates. ACM Transactions on Computational Logic 21, 3 (2020), Article 19, 46 pages.
[27]
Mnacho Echenim, Radu Iosif, and Nicolas Peltier. 2020b. Entailment checking in separation logic with inductive definitions is 2-EXPTIME hard. In Proceedings of LPAR’20. 191–211.
[28]
Mnacho Echenim, Radu Iosif, and Nicolas Peltier. 2021. Decidable entailments in separation logic with inductive definitions: Beyond establishment. In Proceedings of CSL’21.
[29]
Constantin Enea, Ondrej Lengál, Mihaela Sighireanu, and Tomás Vojnar. 2017. SPEN: A solver for separation logic. In Proceedings of NFM’17. 302–309.
[30]
Alexey Gotsman, Josh Berdine, Byron Cook, and Mooly Sagiv. 2007. Thread-modular shape analysis. In Proceedings of PLDI’07. 266–277.
[31]
John E. Hopcroft, Rajeev Motwani, and Jeffrey D. Ullman. 2007. Introduction to Automata Theory, Languages, and Computation (3rd ed.). Addison-Wesley.
[32]
Radu Iosif, Adam Rogalewicz, and Jirí Simácek. 2013. The tree width of separation logic with recursive definitions. In Proceedings of CADE’13. 21–38.
[33]
Radu Iosif, Adam Rogalewicz, and Tomás Vojnar. 2014. Deciding entailments in inductive separation logic with tree automata. In Proceedings of ATVA’14. 201–218.
[34]
Samin S. Ishtiaq and Peter W. O’Hearn. 2001. BI as an assertion language for mutable data structures. In Proceedings of POPL’01. 14–26.
[35]
Bart Jacobs, Jan Smans, Pieter Philippaerts, Frédéric Vogels, Willem Penninckx, and Frank Piessens. 2011. VeriFast: A powerful, sound, predictable, fast verifier for C and Java. In Proceedings of NFM’11. 41–55.
[36]
Christina Jansen, Jens Katelaan, Christoph Matheja, Thomas Noll, and Florian Zuleger. 2017. Unified reasoning about robustness properties of symbolic-heap separation logic. In Proceedings of ESOP’17. 611–638.
[37]
Ralf Jung, Robbert Krebbers, Jacques-Henri Jourdan, Ales Bizjak, Lars Birkedal, and Derek Dreyer. 2018. Iris from the ground up: A modular foundation for higher-order concurrent separation logic. Journal of Functional Programming 28 (2018), e20.
[38]
Jens Katelaan, Christoph Matheja, and Florian Zuleger. 2019. Effective entailment checking for separation logic with inductive definitions. In Proceedings of TACAS’19. 319–336.
[39]
Jens Katelaan and Florian Zuleger. 2020. Beyond symbolic heaps: Deciding separation logic with inductive definitions. In Proceedings of LPAR’20. 390–408.
[40]
Quang Loc Le, Makoto Tatsuta, Jun Sun, and Wei-Ngan Chin. 2017. A decidable fragment in separation logic with inductive predicates and arithmetic. In Proceedings of CAV’17. 495–517.
[41]
Christoph Matheja. 2020. Automated Reasoning and Randomization in Separation Logic. Ph.D. Dissertation. RWTH Aachen University.
[42]
Peter Müller, Malte Schwerhoff, and Alexander J. Summers. 2017. Viper: A verification infrastructure for permission-based reasoning. In Dependable Software Systems Engineering. IOS Press, 104–125.
[43]
Jens Pagel, Christoph Matheja, and Florian Zuleger. 2020. Complete entailment checking for separation logic with inductive definitions. CoRR abs/2002.01202 (2020).
[44]
Ruzica Piskac, Thomas Wies, and Damien Zufferey. 2013. Automating separation logic using SMT. In Proceedings of CAV’13. 773–789.
[45]
Ruzica Piskac, Thomas Wies, and Damien Zufferey. 2014a. GRASShopper—Complete heap verification with mixed specifications. In Proceedings of TACAS’14. 124–139.
[46]
Ruzica Piskac, Thomas Wies, and Damien Zufferey. 2014b. Automating separation logic with trees and data. In Proceedings of CAV’14. 711–728.
[47]
John C. Reynolds. 2002. Separation logic: A logic for shared mutable data structures. In Proceedings of LICS’02. 55–74.
[48]
Malte Schwerhoff and Alexander J. Summers. 2015. Lightweight support for magic wands in an automatic verifier. In Proceedings of ECOOP’15. 614–638.
[49]
Mihaela Sighireanu, Juan A. Navarro Perez, Andrey Rybalchenko, Nikos Gorogiannis, Radu Iosif, Andrew Reynolds, Cristina Serban, et al.2019. SL-COMP: Competition of solvers for separation logic. In Tools and Algorithms for the Construction and Analysis of Systems. Lecture Notes in Computer Science, Vol. 11429. Springer, 116–132.
[50]
Quang-Trung Ta, Ton Chanh Le, Siau-Cheng Khoo, and Wei-Ngan Chin. 2016. Automated mutual explicit induction proof in separation logic. In Formal Methods. Lecture Notes in Computer Science, Vol. 9995. Springer, 659–676.
[51]
Quang-Trung Ta, Ton Chanh Le, Siau-Cheng Khoo, and Wei-Ngan Chin. 2018. Automated lemma synthesis in symbolic-heap separation logic. Proceedings of the ACM on Programming Languages 2, POPL (2018), Article 9, 29 pages.
[52]
Aditya V. Thakur, Jason Breck, and Thomas W. Reps. 2014. Satisfiability modulo abstraction for separation logic with linked lists. In Proceedings of SPIN’14. 58–67.
[53]
Hongseok Yang. 2001. Local Reasoning for Stateful Programs. Ph.D. Dissertation. University of Illinois at Urbana–Champaign, Champaign, IL.

Cited By

View all
  • (2024)Restriction on cut rule in cyclic-proof system for symbolic heapsTheoretical Computer Science10.1016/j.tcs.2024.1148541019(114854)Online publication date: Dec-2024
  • (2024)What Is Decidable in Separation Logic Beyond Progress, Connectivity and Establishment?Automated Reasoning10.1007/978-3-031-63501-4_9(157-175)Online publication date: 2-Jul-2024

Index Terms

  1. A Decision Procedure for Guarded Separation Logic Complete Entailment Checking for Separation Logic with Inductive Definitions

            Recommendations

            Comments

            Information & Contributors

            Information

            Published In

            cover image ACM Transactions on Computational Logic
            ACM Transactions on Computational Logic  Volume 24, Issue 1
            January 2023
            326 pages
            ISSN:1529-3785
            EISSN:1557-945X
            DOI:10.1145/3579819
            • Editor:
            • Anuj Dawar
            Issue’s Table of Contents

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            Published: 18 January 2023
            Online AM: 22 September 2022
            Accepted: 30 April 2022
            Revised: 25 November 2021
            Received: 11 January 2021
            Published in TOCL Volume 24, Issue 1

            Permissions

            Request permissions for this article.

            Check for updates

            Author Tags

            1. Decision procedures
            2. entailment
            3. magic wands
            4. inductive predicates

            Qualifiers

            • Research-article
            • Refereed

            Contributors

            Other Metrics

            Bibliometrics & Citations

            Bibliometrics

            Article Metrics

            • Downloads (Last 12 months)65
            • Downloads (Last 6 weeks)9
            Reflects downloads up to 15 Oct 2024

            Other Metrics

            Citations

            Cited By

            View all
            • (2024)Restriction on cut rule in cyclic-proof system for symbolic heapsTheoretical Computer Science10.1016/j.tcs.2024.1148541019(114854)Online publication date: Dec-2024
            • (2024)What Is Decidable in Separation Logic Beyond Progress, Connectivity and Establishment?Automated Reasoning10.1007/978-3-031-63501-4_9(157-175)Online publication date: 2-Jul-2024

            View Options

            Get Access

            Login options

            Full Access

            View options

            PDF

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader

            Full Text

            View this article in Full Text.

            Full Text

            HTML Format

            View this article in HTML Format.

            HTML Format

            Media

            Figures

            Other

            Tables

            Share

            Share

            Share this Publication link

            Share on social media