Abstract
Bounded verification has proved useful to detect bugs and to increase confidence in the correctness of a program. In contrast to unbounded verification, reasoning about calls via (bounded) inlining and about loops via (bounded) unrolling does not require method specifications and loop invariants and, therefore, reduces the annotation overhead to the bare minimum, namely specifications of the properties to be verified. For verifiers based on traditional program logics, verification is preserved by inlining (and unrolling): successful unbounded verification of a program w.r.t. some annotation implies successful verification of the inlined program. That is, any error detected in the inlined program reveals a true error in the original program. However, this essential property might not hold for automatic separation logic verifiers such as Caper, GRASShopper, RefinedC, Steel, VeriFast, and verifiers based on Viper. In this setting, inlining generally changes the resources owned by method executions, which may affect automatic proof search algorithms and introduce spurious errors. In this paper, we present the first technique for verification-preserving inlining in automatic separation logic verifiers. We identify a semantic condition on programs and prove in Isabelle/HOL that it ensures verification-preserving inlining for state-of-the-art automatic separation logic verifiers. We also prove a dual result: successful verification of the inlined program ensures that there are method and loop annotations that enable the verification of the original program for bounded executions. To check our semantic condition automatically, we present two approximations that can be checked syntactically and with a program verifier, respectively. We implement these checks in Viper and demonstrate that they are effective for non-trivial examples from different verifiers.
- Pieter Agten, Bart Jacobs, and Frank Piessens. 2015. Sound Modular Verification of C Code Executing in an Unverified Context. In Principles of Programming Languages (POPL), Sriram K. Rajamani and David Walker (Eds.). https://doi.org/10.1145/2676726.2676972
Google Scholar
Digital Library
- Vytautas Astrauskas, Peter Müller, Federico Poli, and Alexander J. Summers. 2019. Leveraging Rust Types for Modular Specification and Verification. Proc. ACM Program. Lang., 3, OOPSLA, Article 147, 30 pages. https://doi.org/10.1145/3360573
Google Scholar
Digital Library
- Gilles Barthe, Pedro R. D’Argenio, and Tamara Rezk. 2011. Secure Information Flow by Self-Composition. Mathematical Structures in Computer Science (MSCS), 21, 6 (2011), 1207–1252. https://doi.org/10.1017/S0960129511000193
Google Scholar
Digital Library
- Bernhard Beckert, Michael Kirsten, Jonas Klamroth, and Mattias Ulbrich. 2020. Modular Verification of JML Contracts Using Bounded Model Checking. In International Symposium on Leveraging Applications of Formal Methods (ISoLA), Tiziana Margaria and Bernhard Steffen (Eds.). 12476, 60–80. https://doi.org/10.1007/978-3-030-61362-4_4
Google Scholar
Digital Library
- Stefan Blom, Saeed Darabi, Marieke Huisman, and Wytse Oortwijn. 2017. The VerCors Tool Set: Verification of Parallel and Concurrent Software. In Integrated Formal Methods, Nadia Polikarpova and Steve Schneider (Eds.). Springer International Publishing, Cham. 102–110. isbn:978-3-319-66845-1 https://doi.org/10.1007/978-3-319-66845-1_7
Google Scholar
Cross Ref
- John Boyland. 2003. Checking Interference with Fractional Permissions. In Static Analysis (SAS), Radhia Cousot (Ed.). 55–72. https://doi.org/10.1007/3-540-44898-5_4
Google Scholar
Cross Ref
- James Brotherston, Nikos Gorogiannis, Max I. Kanovich, and Reuben Rowe. 2016. Model Checking for Symbolic-Heap Separation Logic with Inductive Predicates. In Principles of Programming Languages, POPL, Rastislav Bodík and Rupak Majumdar (Eds.). 84–96. https://doi.org/10.1145/2837614.2837621
Google Scholar
Digital Library
- Cristiano Calcagno, Peter W. O’Hearn, and Hongseok Yang. 2007. Local Action and Abstract Separation Logic. In Logic in Computer Science (LICS). 366–375. https://doi.org/10.1109/LICS.2007.30
Google Scholar
Digital Library
- Edmund Clarke, Daniel Kroening, and Flavio Lerda. 2004. A Tool for Checking ANSI-C Programs. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS), Kurt Jensen and Andreas Podelski (Eds.). 168–176. https://doi.org/10.1007/978-3-540-24730-2_15
Google Scholar
Cross Ref
- Michael R. Clarkson and Fred B. Schneider. 2008. Hyperproperties. In 2008 21st IEEE Computer Security Foundations Symposium. 51–65. https://doi.org/10.1109/CSF.2008.7
Google Scholar
Digital Library
- Lucas Cordeiro, Pascal Kesseli, Daniel Kroening, Peter Schrammel, and Marek Trtik. 2018. JBMC: A Bounded Model Checking Tool for Verifying Java Bytecode. In Computer Aided Verification (CAV), Hana Chockler and Georg Weissenbacher (Eds.). https://doi.org/10.1007/978-3-319-96145-3_10
Google Scholar
Cross Ref
- Thibault Dardinier, Peter Müller, and Alexander J. Summers. 2022. Fractional Resources in Unbounded Separation Logic. Proc. ACM Program. Lang., 6, OOPSLA2 (2022), Article 163, 27 pages. https://doi.org/10.1145/3563326
Google Scholar
Digital Library
- Thibault Dardinier, Gaurav Parthasarathy, and Peter Müller. 2022. Verification-Preserving Inlining in Automatic Separation Logic Verifiers (extended version). https://doi.org/10.48550/ARXIV.2208.10456
Google Scholar
- Thibault Dardinier, Gaurav Parthasarathy, and Peter Müller. 2023. Verification-Preserving Inlining in Automatic Separation Logic Verifiers – Artifact. https://doi.org/10.5281/zenodo.7711788
Google Scholar
Digital Library
- Thibault Dardinier, Gaurav Parthasarathy, Noé Weeks, Peter Müller, and Alexander J. Summers. 2022. Sound Automation of Magic Wands. In Computer Aided Verification, Sharon Shoham and Yakir Vizel (Eds.). Springer International Publishing, Cham. 130–151. isbn:978-3-031-13188-2 https://doi.org/10.1007/978-3-031-13188-2_7
Google Scholar
Digital Library
- Thomas Dinsdale-Young, Pedro da Rocha Pinto, Kristoffer Just Andersen, and Lars Birkedal. 2017. Caper - Automatic Verification for Fine-Grained Concurrency. In European Symposium on Programming (ESOP), Hongseok Yang (Ed.). https://doi.org/10.1007/978-3-662-54434-1_16
Google Scholar
Digital Library
- Robert Dockins, Aquinas Hobor, and Andrew W. Appel. 2009. A Fresh Look at Separation Algebras and Share Accounting. In Asian Symposium on Programming Languages and Systems (APLAS), Zhenjiang Hu (Ed.). 161–177. https://doi.org/10.1007/978-3-642-10672-9_13
Google Scholar
Digital Library
- Marko Doko and Viktor Vafeiadis. 2017. Tackling Real-Life Relaxed Concurrency with FSL++. In European Symposium on Programming (ESOP), Hongseok Yang (Ed.). 448–475. https://doi.org/10.1007/978-3-662-54434-1_17
Google Scholar
Digital Library
- Marco Eilers and Peter Müller. 2018. Nagini: A Static Verifier for Python. In Computer Aided Verification (CAV), Hana Chockler and Georg Weissenbacher (Eds.). 596–603. https://doi.org/10.1007/978-3-319-96145-3_33
Google Scholar
Cross Ref
- Aymeric Fromherz, Aseem Rastogi, Nikhil Swamy, Sydney Gibson, Guido Martínez, Denis Merigoux, and Tahina Ramananandro. 2021. Steel: Proof-Oriented Programming in a Dependently Typed Concurrent Separation Logic. Proc. ACM Program. Lang., 5, ICFP (2021), 1–30. https://doi.org/10.1145/3473590
Google Scholar
Digital Library
- 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 NASA Formal Methods (NFM). 41–55. https://doi.org/10.1007/978-3-642-20398-5_4
Google Scholar
Cross Ref
- Bart Jacobs, Jan Smans, and Frank Piessens. 2014. Solving the VerifyThis 2012 Challenges with VeriFast. International Journal on Software Tools for Technology Transfer (STTT), 17 (2014), 03, https://doi.org/10.1007/s10009-014-0310-9
Google Scholar
Digital Library
- Ralf Jung, Robbert Krebbers, Jacques Henri Jourdan, Aleš 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 (JFP), https://doi.org/10.1017/S0956796818000151
Google Scholar
Cross Ref
- Akash Lal and Shaz Qadeer. 2014. Powering the Static Driver Verifier Using Corral. In International Symposium on Foundations of Software Engineering (FSE). 202–212. https://doi.org/10.1145/2635868.2635894
Google Scholar
Digital Library
- Akash Lal, Shaz Qadeer, and Shuvendu K. Lahiri. 2012. A Solver for Reachability Modulo Theories. In Computer Aided Verification (CAV), P. Madhusudan and Sanjit A. Seshia (Eds.). 7358, 427–443. https://doi.org/10.1007/978-3-642-31424-7_32
Google Scholar
Digital Library
- Gary T. Leavens, Albert L. Baker, and Clyde Ruby. 2006. Preliminary Design of JML: A Behavioral Interface Specification Language for Java. SIGSOFT Software Engineering Notes, 31, 3 (2006), may, 1–38. https://doi.org/10.1145/1127878.1127884
Google Scholar
Digital Library
- K. Rustan M. Leino. 2008. This is Boogie 2. https://www.microsoft.com/en-us/research/publication/this-is-boogie-2-2/
Google Scholar
- K. Rustan M. Leino and Valentin Wüstholz. 2015. Fine-Grained Caching of Verification Results. In Computer Aided Verification (CAV), Daniel Kroening and Corina S. Pasareanu (Eds.). 9206, Springer, 380–397. https://doi.org/10.1007/978-3-319-21690-4_22
Google Scholar
Cross Ref
- Cláudio Belo Lourenço, Maria João Frade, and Jorge Sousa Pinto. 2019. A Generalized Program Verification Workflow Based on Loop Elimination and SA Form. In International Conference on Formal Methods in Software Engineering (FormaliSE). 75–84. https://doi.org/10.1109/FormaliSE.2019.00017
Google Scholar
Digital Library
- Peter Müller, Malte Schwerhoff, and Alexander J. Summers. 2016. Viper: A Verification Infrastructure for Permission-Based Reasoning. In VMCAI, B. Jobstmann and K. R. M. Leino (Eds.). 9583, Springer-Verlag, 41–62. https://doi.org/10.1007/978-3-662-49122-5_2
Google Scholar
Digital Library
- Huu Hai Nguyen, Viktor Kuncak, and Wei-Ngan Chin. 2008. Runtime Checking for Separation Logic. In Verification, Model Checking, and Abstract Interpretation (VMCAI), Francesco Logozzo, Doron A. Peled, and Lenore D. Zuck (Eds.). https://doi.org/10.1007/978-3-540-78163-9_19
Google Scholar
Cross Ref
- Matthew J. Parkinson and Alexander J. Summers. 2012. The Relationship Between Separation Logic and Implicit Dynamic Frames. Logical Methods in Computer Science, 8, 3:01 (2012), 1–54. https://doi.org/10.2168/LMCS-8(3:1)2012
Google Scholar
Cross Ref
- Ruzica Piskac, Thomas Wies, and Damien Zufferey. 2014. GRASShopper. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS), Erika Ábrahám and Klaus Havelund (Eds.). 124–139. https://doi.org/10.1007/978-3-642-54862-8_9
Google Scholar
Cross Ref
- John C. Reynolds. 2002. Separation Logic: A Logic for Shared Mutable Data Structures. Logic in Computer Science (LICS), 55–74. https://doi.org/10.1109/LICS.2002.1029817
Google Scholar
Cross Ref
- Michael Sammler, Rodolphe Lepigre, Robbert Krebbers, Kayvan Memarian, Derek Dreyer, and Deepak Garg. 2021. RefinedC: Automating the Foundational Verification of C Code with Refined Ownership Types. In Programming Language Design and Implementation (PLDI). 158–174. isbn:9781450383912 https://doi.org/10.1145/3453483.3454036
Google Scholar
Digital Library
- Malte Schwerhoff and Alexander J. Summers. 2015. Lightweight Support for Magic Wands in an Automatic Verifier. In European Conference on Object-Oriented Programming (ECOOP), John Tang Boyland (Ed.) (LIPIcs, Vol. 37). 614–638. https://doi.org/10.4230/LIPIcs.ECOOP.2015.614
Google Scholar
Cross Ref
- Alexander J. Summers and Peter Müller. 2018. Automating Deductive Verification for Weak-Memory Programs. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS), D. Beyer and M. Huisman (Eds.). Springer-Verlag, 190–209. https://doi.org/10.1007/978-3-319-89960-2_11
Google Scholar
Cross Ref
- Nikhil Swamy, Cătălin Hriţcu, Chantal Keller, Aseem Rastogi, Antoine Delignat-Lavaud, Simon Forest, Karthikeyan Bhargavan, Cédric Fournet, Pierre-Yves Strub, Markulf Kohlweiss, Jean-Karim Zinzindohoue, and Santiago Zanella-Béguelin. 2016. Dependent Types and Multi-Monadic Effects in F*. In Principles of Programming Languages (POPL). 256–270. https://doi.org/10.1145/2837614.2837655
Google Scholar
Digital Library
- Viktor Vafeiadis and Chinmay Narayan. 2013. Relaxed Separation Logic: A Program Logic for C11 Concurrency. In Object Oriented Programming Systems Languages & Applications (OOPSLA), Antony L. Hosking, Patrick Th. Eugster, and Cristina V. Lopes (Eds.). ACM, 867–884. https://doi.org/10.1145/2544173.2509532
Google Scholar
Digital Library
- Hongseok Yang and Peter O’Hearn. 2002. A Semantic Basis for Local Reasoning. In Foundations of Software Science and Computation Structures (FoSSaCS). 402–416. https://doi.org/10.1007/3-540-45931-6_28
Google Scholar
Cross Ref
Index Terms
Verification-Preserving Inlining in Automatic Separation Logic Verifiers
Recommendations
Heuristics to verify LTL properties of hierarchical systems
VECoS'08: Proceedings of the Second international conference on Verification and Evaluation of Computer and Communication SystemsHierarchical automata are used to model hierarchical systems. The semantics used is the Kripke structure where states are valued by atomic propositions. This structure can be large in number of states. This paper presents some heuristics to check ...
Connecting Higher-Order Separation Logic to a First-Order Outside World
Programming Languages and SystemsAbstractSeparation logic is a useful tool for proving the correctness of programs that manipulate memory, especially when the model of memory includes higher-order state: Step-indexing, predicates in the heap, and higher-order ghost state have been used ...
An Interface Theory for Program Verification
Leveraging Applications of Formal Methods, Verification and Validation: Verification PrinciplesAbstractProgram verification is the problem, for a given program and a specification , of constructing a proof of correctness for the statement “program satisfies specification ” () or a proof of violation ([inline-graphic not available: see fulltext]). ...






Comments