Abstract
The symbolic-heap fragment of separation logic has been actively developed and advocated for verifying the memory-safety property of computer programs. At present, one of its biggest challenges is to effectively prove entailments containing inductive heap predicates. These entailments are usually proof obligations generated when verifying programs that manipulate complex data structures like linked lists, trees, or graphs.
To assist in proving such entailments, this paper introduces a lemma synthesis framework, which automatically discovers lemmas to serve as eureka steps in the proofs. Mathematical induction and template-based constraint solving are two pillars of our framework. To derive the supporting lemmas for a given entailment, the framework firstly identifies possible lemma templates from the entailment's heap structure. It then sets up unknown relations among each template's variables and conducts structural induction proof to generate constraints about these relations. Finally, it solves the constraints to find out actual definitions of the unknown relations, thus discovers the lemmas. We have integrated this framework into a prototype prover and have experimented it on various entailment benchmarks. The experimental results show that our lemma-synthesis-assisted prover can prove many entailments that could not be handled by existing techniques. This new proposal opens up more opportunities to automatically reason with complex inductive heap predicates.
Supplemental Material
Available for Download
This package contains the artifact of our paper "Automated Lemma Synthesis in Separation Logic", published in POPL'18. It includes the prototype prover SLS, which can be run on a 64-bit Linux environment, preferably Ubuntu-based, and all entailment benchmarks. Please unzip the package into a folder, named popl-18, and see the README file, located at popl-18/README. A convenient way to perform all the experiments is to run the shell script popl-18/run_sls.sh.
- Aws Albarghouthi, Josh Berdine, Byron Cook, and Zachary Kincaid. 2015. Spatial Interpolants. In European Symposium on Programming (ESOP). 634–660. Google Scholar
Cross Ref
- Rajeev Alur, Rastislav Bodík, Eric Dallal, Dana Fisman, Pranav Garg, Garvit Juniwal, Hadas Kress-Gazit, P. Madhusudan, Milo M. K. Martin, Mukund Raghothaman, Shambwaditya Saha, Sanjit A. Seshia, Rishabh Singh, Armando Solar-Lezama, Emina Torlak, and Abhishek Udupa. 2015. Syntax-Guided Synthesis. In Dependable Software Systems Engineering. 1–25.Google Scholar
- Josh Berdine, Cristiano Calcagno, and Peter W. O’Hearn. 2004. A Decidable Fragment of Separation Logic. In International Conference on Foundations of Software Technology and Theoretical Computer Science (FST TCS). 97–109. Google Scholar
Digital Library
- Josh Berdine, Cristiano Calcagno, and Peter W. O’Hearn. 2005a. Smallfoot: Modular Automatic Assertion Checking with Separation Logic. In International Symposium on Formal Methods for Components and Objects. 115–137.Google Scholar
- Josh Berdine, Cristiano Calcagno, and Peter W. O’Hearn. 2005b. Symbolic Execution with Separation Logic. In Asian Symposium on Programming Languages and Systems (APLAS). 52–68. Google Scholar
Digital Library
- Josh Berdine, Byron Cook, and Samin Ishtiaq. 2011. SLAyer: Memory Safety for Systems-Level Code. In International Conference on Computer Aided Verification (CAV). 178–183. Google Scholar
Cross Ref
- Marius Bozga, Radu Iosif, and Swann Perarnau. 2010. Quantitative Separation Logic and Programs with Lists. J. Autom. Reasoning 45, 2 (2010), 131–156. Google Scholar
Digital Library
- James Brotherston, Dino Distefano, and Rasmus Lerchedahl Petersen. 2011. Automated Cyclic Entailment Proofs in Separation Logic. In International Conference on Automated Deduction (CADE). 131–146. Google Scholar
Cross Ref
- James Brotherston, Carsten Fuhs, Juan A. Navarro Pérez, and Nikos Gorogiannis. 2014. A decision procedure for satisfiability in Separation Logic with inductive predicates. In Joint Meeting of International Conference on Computer Science Logic and Symposium on Logic in Computer Science, CSL-LICS. 25:1–25:10. Google Scholar
Digital Library
- James Brotherston, Nikos Gorogiannis, Max I. Kanovich, and Reuben Rowe. 2016. Model checking for Symbolic-Heap Separation Logic with inductive predicates. In Symposium on Principles of Programming Languages (POPL). 84–96. Google Scholar
Digital Library
- James Brotherston and Alex Simpson. 2011. Sequent calculi for induction and infinite descent. J. Log. Comput. 21, 6 (2011), 1177–1216. Google Scholar
Digital Library
- Alan Bundy. 2001. The Automation of Proof by Mathematical Induction. In Handbook of Automated Reasoning (in 2 volumes). 845–911. Google Scholar
Cross Ref
- Cristiano Calcagno, Dino Distefano, Jérémy Dubreil, Dominik Gabi, Pieter Hooimeijer, Martino Luca, Peter W. O’Hearn, Irene Papakonstantinou, Jim Purbrick, and Dulma Rodriguez. 2015. Moving Fast with Software Verification. In NASA International Symposium on Formal Methods (NFM). 3–11. Google Scholar
Cross Ref
- 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 (SCP) 77, 9 (2012), 1006–1036. Google Scholar
Digital Library
- Duc-Hiep Chu, Joxan Jaffar, and Minh-Thai Trinh. 2015. Automatic induction proofs of data-structures in imperative programs. In Conference on Programming Language Design and Implementation (PLDI). 457–466. Google Scholar
Digital Library
- Michael Colón, Sriram Sankaranarayanan, and Henny Sipma. 2003. Linear Invariant Generation Using Non-linear Constraint Solving. In International Conference on Computer Aided Verification (CAV). 420–432. Google Scholar
Cross Ref
- Byron Cook, Christoph Haase, Joël Ouaknine, Matthew J. Parkinson, and James Worrell. 2011. Tractable Reasoning in a Fragment of Separation Logic. In International Conference on Concurrency Theory (CONCUR). 235–249. Google Scholar
Cross Ref
- Dino Distefano and Matthew J. Parkinson. 2008. jStar: towards practical verification for java. 213–226.Google Scholar
- Constantin Enea, Ondrej Lengál, Mihaela Sighireanu, and Tomás Vojnar. 2014. Compositional Entailment Checking for a Fragment of Separation Logic. In Asian Symposium on Programming Languages and Systems (APLAS). 314–333. Google Scholar
Cross Ref
- Constantin Enea, Mihaela Sighireanu, and Zhilin Wu. 2015. On Automated Lemma Generation for Separation Logic with Inductive Definitions. In International Symposium on Automated Technology for Verification and Analysis (ATVA). 80–96. Google Scholar
Cross Ref
- Radu Iosif, Adam Rogalewicz, and Jiri Simácek. 2013. The Tree Width of Separation Logic with Recursive Definitions. In International Conference on Automated Deduction (CADE). 21–38. Google Scholar
Digital Library
- Radu Iosif, Adam Rogalewicz, and Tomás Vojnar. 2014. Deciding Entailments in Inductive Separation Logic with Tree Automata. In International Symposium on Automated Technology for Verification and Analysis (ATVA). 201–218. Google Scholar
Cross Ref
- Quang Loc Le, Jun Sun, and Wei-Ngan Chin. 2016. Satisfiability Modulo Heap-Based Programs. In International Conference on Computer Aided Verification (CAV). 382–404. Google Scholar
Cross Ref
- Leonardo Mendonça De Moura and Nikolaj Bjørner. 2008. Z3: An Efficient SMT Solver. In International Conference on Tools and Algorithms for Construction and Analysis of Systems (TACAS). 337–340.Google Scholar
Cross Ref
- Huu Hai Nguyen and Wei-Ngan Chin. 2008. Enhancing Program Verification with Lemmas. In International Conference on Computer Aided Verification (CAV). 355–369. Google Scholar
Digital Library
- Peter W. O’Hearn, John C. Reynolds, and Hongseok Yang. 2001. Local Reasoning about Programs that Alter Data Structures. In International Conference on Computer Science Logic (CSL). 1–19. Google Scholar
Cross Ref
- Juan Antonio Navarro Pérez and Andrey Rybalchenko. 2011. Separation Logic + Superposition Calculus = Heap Theorem Prover. In Conference on Programming Language Design and Implementation (PLDI). 556–566.Google Scholar
Digital Library
- Juan Antonio Navarro Pérez and Andrey Rybalchenko. 2013. Separation Logic Modulo Theories. In Asian Symposium on Programming Languages and Systems (APLAS). 90–106.Google Scholar
- Ruzica Piskac, Thomas Wies, and Damien Zufferey. 2013. Automating Separation Logic Using SMT. In International Conference on Computer Aided Verification (CAV). 773–789. Google Scholar
Digital Library
- Ruzica Piskac, Thomas Wies, and Damien Zufferey. 2014. Automating Separation Logic with Trees and Data. In International Conference on Computer Aided Verification (CAV). 711–728. Google Scholar
Digital Library
- Xiaokang Qiu, Pranav Garg, Andrei Stefanescu, and Parthasarathy Madhusudan. 2013. Natural proofs for structure, data, and separation. In Conference on Programming Language Design and Implementation (PLDI). 231–242. Google Scholar
Digital Library
- John C. Reynolds. 2002. Separation Logic: A Logic for Shared Mutable Data Structures. In Symposium on Logic in Computer Science (LICS). 55–74. Google Scholar
Cross Ref
- John C. Reynolds. 2008. An Introduction to Separation Logic. Lecture Notes for the PhD Fall School on Logics and Semantics of State, Copenhagen 2008. Retrieved on 2017, March 16th. http://www.cs.cmu.edu/~jcr/copenhagen08.pdfGoogle Scholar
- Alexander Schrijver. 1986. Theory of Linear and Integer Programming. John Wiley & Sons, Inc., New York, NY, USA.Google Scholar
Digital Library
- Mihaela Sighireanu and David R. Cok. 2016. Report on SL-COMP 2014. Journal on Satisfiability, Boolean Modeling and Computation 9 (2016), 173–186.Google Scholar
Cross Ref
- Quang-Trung Ta, Ton Chanh Le, Siau-Cheng Khoo, and Wei-Ngan Chin. 2016. Automated Mutual Explicit Induction Proof in Separation Logic. In International Symposium on Formal Methods (FM). 659–676. Google Scholar
Cross Ref
- Quang-Trung Ta, Ton Chanh Le, Siau-Cheng Khoo, and Wei-Ngan Chin. 2017. Automated Lemma Synthesis in SymbolicHeap Separation Logic. Technical Report (2017). https://arxiv.org/abs/1710.09635Google Scholar
- Alfred North Whitehead and Bertrand Russell. 1912. Principia Mathematica. University Press.Google Scholar
Index Terms
Automated lemma synthesis in symbolic-heap separation logic
Recommendations
Automated mutual induction proof in separation logic
Special Issue on Extended Versions of Papers Presented at FM 2016AbstractWe present a deductive proof system to automatically prove separation logic entailments by mathematical induction. Our technique is called the mutual induction proof. It is an instance of the well-founded induction, a.k.a., Noetherian induction. ...
Interactive proofs in higher-order concurrent separation logic
POPL '17When using a proof assistant to reason in an embedded logic -- like separation logic -- one cannot benefit from the proof contexts and basic tactics of the proof assistant. This results in proofs that are at a too low level of abstraction because they ...
Interactive proofs in higher-order concurrent separation logic
POPL '17: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming LanguagesWhen using a proof assistant to reason in an embedded logic -- like separation logic -- one cannot benefit from the proof contexts and basic tactics of the proof assistant. This results in proofs that are at a too low level of abstraction because they ...






Comments