Abstract
Recent advances in concurrent separation logic enabled the formal verification of increasingly sophisticated fine-grained (i.e., lock-free) concurrent programs. For such programs, the golden standard of correctness is linearizability, which expresses that concurrent executions always behave as some valid sequence of sequential executions. Compositional approaches to linearizability (such as contextual refinement and logical atomicity) make it possible to prove linearizability of whole programs or compound data structures (e.g., a ticket lock) using proofs of linearizability of their individual components (e.g., a counter). While powerful, these approaches are also laborious—state-of-the-art tools such as Iris, FCSL, and Voila all require a form of interactive proof.
This paper develops proof automation for contextual refinement and logical atomicity in Iris. The key ingredient of our proof automation is a collection of proof rules whose application is directed by both the program and the logical state. This gives rise to effective proof search strategies that can prove linearizability of simple examples fully automatically. For more complex examples, we ensure the proof automation cooperates well with interactive proof tactics by minimizing the use of backtracking.
We implement our proof automation in Coq by extending and generalizing Diaframe, a proof automation extension for Iris. While the old version (Diaframe 1.0) was limited to ordinary Hoare triples, the new version (Diaframe 2.0) is extensible in its support for program verification styles: our proof search strategies for contextual refinement and logical atomicity are implemented as modules for Diaframe 2.0. We evaluate our proof automation on a set of existing benchmarks and novel proofs, showing that it provides significant reduction of proof work for both approaches to linearizability.
- Andrew W. Appel. 2001. Foundational Proof-Carrying Code. In LICS. 247–256. https://doi.org/10.1109/LICS.2001.932501
Google Scholar
Cross Ref
- Andrew W. Appel, Paul-André Melliès, Christopher D. Richards, and Jérôme Vouillon. 2007. A Very Modal Model of a Modern, Major, General Type System. POPL. 109–122. isbn:978-1-59593-575-5 https://doi.org/10.1145/1190216.1190235
Google Scholar
Digital Library
- Mike Barnett, Bor-Yuh Evan Chang, Robert DeLine, Bart Jacobs, and K. Rustan M. Leino. 2005. Boogie: A Modular Reusable Verifier for Object-Oriented Programs. In FMCO (LNCS). 364–387. isbn:978-3-540-36750-5 https://doi.org/10.1007/11804192_17
Google Scholar
Digital Library
- Frédéric Besson. 2021. Itauto: An Extensible Intuitionistic SAT Solver. In ITP (LIPIcs, Vol. 193). 9:1–9:18. isbn:978-3-95977-188-7 issn:1868-8969 https://doi.org/10.4230/LIPIcs.ITP.2021.9
Google Scholar
Cross Ref
- Lars Birkedal, Thomas Dinsdale-Young, Armaël Guéneau, Guilhem Jaber, Kasper Svendsen, and Nikos Tzevelekos. 2021. Theorems for Free from Separation Logic Specifications. PACMPL, 5, ICFP (2021), 81:1–81:29. https://doi.org/10.1145/3473586
Google Scholar
Digital Library
- James Brotherston and Max Kanovich. 2014. Undecidability of Propositional Separation Logic and Its Neighbours. J. ACM, 61, 2 (2014), 14:1–14:43. issn:0004-5411 https://doi.org/10.1145/2542667
Google Scholar
Digital Library
- Sebastian Burckhardt, Chris Dern, Madanlal Musuvathi, and Roy Tan. 2010. Line-up: A Complete and Automatic Linearizability Checker. PLDI. 330–340. https://doi.org/10.1145/1806596.1806634
Google Scholar
Digital Library
- Quentin Carbonneaux, Noam Zilberstein, Christoph Klee, Peter W. O’Hearn, and Francesco Zappa Nardelli. 2022. Applying Formal Verification to Microkernel IPC at Meta. In CPP. 116–129. isbn:978-1-4503-9182-5 https://doi.org/10.1145/3497775.3503681
Google Scholar
Digital Library
- Tej Chajed, Joseph Tassarotti, Mark Theng, Ralf Jung, M. Frans Kaashoek, and Nickolai Zeldovich. 2021. GoJournal: A Verified, Concurrent, Crash-Safe Journaling System. In OSDI. 423–439. https://www.usenix.org/conference/osdi21/presentation/chajed
Google Scholar
- Ł ukasz Czajka. 2020. Practical Proof Search for Coq by Type Inhabitation. In IJCAR (LNCS). 28–57. isbn:978-3-030-51054-1 https://doi.org/10.1007/978-3-030-51054-1_3
Google Scholar
Digital Library
- Pedro da Rocha Pinto. 2016. Reasoning with Time and Data Abstractions. Ph. D. Dissertation. Imperial College London. https://doi.org/10.25560/47923
Google Scholar
Cross Ref
- Pedro da Rocha Pinto, Thomas Dinsdale-Young, and Philippa Gardner. 2014. TaDA: A Logic for Time and Data Abstraction. In ECOOP (LNCS). 207–231. isbn:978-3-662-44202-9 https://doi.org/10.1007/978-3-662-44202-9_9
Google Scholar
Digital Library
- Hoang-Hai Dang, Jaehwang Jung, Jaemin Choi, Duc-Than Nguyen, William Mansky, Jeehoon Kang, and Derek Dreyer. 2022. Compass: Strong and Compositional Library Specifications in Relaxed Memory Separation Logic. PLDI. 792–808. isbn:978-1-4503-9265-5 https://doi.org/10.1145/3519939.3523451
Google Scholar
Digital Library
- David Delahaye. 2000. A Tactic Language for the System Coq. In LPAR (LNCS). 85–95. isbn:978-3-540-44404-6 https://doi.org/10.1007/3-540-44404-1_7
Google Scholar
Cross Ref
- Brijesh Dongol and John Derrick. 2015. Verifying Linearisability: A Comparative Survey. ACM Comput. Surv., 48, 2 (2015), 19:1–19:43. issn:0360-0300 https://doi.org/10.1145/2796550
Google Scholar
Digital Library
- Derek Dreyer, Georg Neis, Andreas Rossberg, and Lars Birkedal. 2010. A Relational Modal Logic for Higher-Order Stateful ADTs. POPL. 185–198. isbn:978-1-60558-479-9 https://doi.org/10.1145/1706299.1706323
Google Scholar
Digital Library
- Marco Eilers, Severin Meier, and Peter Müller. 2021. Product Programs in the Wild: Retrofitting Program Verifiers to Check Information Flow Security. In CAV (LNCS). 718–741. isbn:978-3-030-81685-8 https://doi.org/10.1007/978-3-030-81685-8_34
Google Scholar
Digital Library
- Burak Ekici, Alain Mebsout, Cesare Tinelli, Chantal Keller, Guy Katz, Andrew Reynolds, and Clark Barrett. 2017. SMTCoq: A Plug-In for Integrating SMT Solvers into Coq. In CAV (LNCS). 126–133. isbn:978-3-319-63390-9 https://doi.org/10.1007/978-3-319-63390-9_7
Google Scholar
Cross Ref
- Ivana Filipović, Peter O’Hearn, Noam Rinetzky, and Hongseok Yang. 2010. Abstraction for Concurrent Objects. TCS, 411, 51 (2010), 4379–4398. issn:0304-3975 https://doi.org/10.1016/j.tcs.2010.09.021
Google Scholar
Digital Library
- Dan Frumin, Robbert Krebbers, and Lars Birkedal. 2018. ReLoC: A Mechanised Relational Logic for Fine-Grained Concurrency. LICS. 442–451. isbn:978-1-4503-5583-4 https://doi.org/10.1145/3209108.3209174
Google Scholar
Digital Library
- Dan Frumin, Robbert Krebbers, and Lars Birkedal. 2021. Compositional Non-Interference for Fine-Grained Concurrent Programs. In IEEE Symposium on Security and Privacy (SP). 1416–1433. issn:2375-1207 https://doi.org/10.1109/SP40001.2021.00003
Google Scholar
Cross Ref
- Dan Frumin, Robbert Krebbers, and Lars Birkedal. 2021. ReLoC Reloaded: A Mechanized Relational Logic for Fine-Grained Concurrency and Logical Atomicity. LMCS, Volume 17, Issue 3 (2021), https://doi.org/10.46298/lmcs-17(3:9)2021
Google Scholar
Cross Ref
- Lennard Gäher, Michael Sammler, Simon Spies, Ralf Jung, Hoang-Hai Dang, Robbert Krebbers, Jeehoon Kang, and Derek Dreyer. 2022. Simuliris: A Separation Logic Framework for Verifying Concurrent Program Optimizations. PACMPL, 6, POPL (2022), 28:1–28:31. https://doi.org/10.1145/3498689
Google Scholar
Digital Library
- Aïna Linn Georges, Alix Trieu, and Lars Birkedal. 2022. Le Temps Des Cerises: Efficient Temporal Stack Safety on Capability Machines Using Directed Capabilities. 6, OOPSLA (2022), 74:1–74:30. https://doi.org/10.1145/3527318
Google Scholar
Digital Library
- Georges Gonthier, Beta Ziliani, Aleksandar Nanevski, and Derek Dreyer. 2011. How to Make Ad Hoc Proof Automation Less Ad Hoc. ICFP. 163–175. isbn:978-1-4503-0865-6 https://doi.org/10.1145/2034773.2034798
Google Scholar
Digital Library
- Simon Oddershede Gregersen, Johan Bay, Amin Timany, and Lars Birkedal. 2021. Mechanized Logical Relations for Termination-Insensitive Noninterference. PACMPL, 5, POPL (2021), 10:1–10:29. https://doi.org/10.1145/3434291
Google Scholar
Digital Library
- Ronghui Gu, Jérémie Koenig, Tahina Ramananandro, Zhong Shao, Xiongnan (Newman) Wu, Shu-Chun Weng, Haozhong Zhang, and Yu Guo. 2015. Deep Specifications and Certified Abstraction Layers. POPL. 595–608. isbn:978-1-4503-3300-9 https://doi.org/10.1145/2676726.2676975
Google Scholar
Digital Library
- Timothy L. Harris, Keir Fraser, and Ian A. Pratt. 2002. A Practical Multi-word Compare-and-Swap Operation. In DISC (LNCS). 265–279. isbn:978-3-540-36108-4 https://doi.org/10.1007/3-540-36108-1_18
Google Scholar
Cross Ref
- Chris Hawblitzel, Erez Petrank, Shaz Qadeer, and Serdar Tasiran. 2015. Automated and Modular Refinement Reasoning for Concurrent Programs. In CAV (LNCS). 449–465. isbn:978-3-319-21668-3 https://doi.org/10.1007/978-3-319-21668-3_26
Google Scholar
Cross Ref
- Thomas A. Henzinger, Ali Sezgin, and Viktor Vafeiadis. 2013. Aspect-Oriented Linearizability Proofs. In CONCUR (LNCS). 242–256. isbn:978-3-642-40184-8 https://doi.org/10.1007/978-3-642-40184-8_18
Google Scholar
Digital Library
- Maurice P. Herlihy and Jeannette M. Wing. 1990. Linearizability: A Correctness Condition for Concurrent Objects. TOPLAS, 12, 3 (1990), 463–492. issn:0164-0925, 1558-4593 https://doi.org/10.1145/78969.78972
Google Scholar
Digital Library
- Bart Jacobs and Frank Piessens. 2011. Expressive Modular Fine-Grained Concurrency Specification. POPL. 271–282. isbn:978-1-4503-0490-0 https://doi.org/10.1145/1926385.1926417
Google Scholar
Digital Library
- Ralf Jung. 2019. Logical Atomicity in Iris: The Good, the Bad, and the Ugly. https://people.mpi-sws.org/~jung/iris/logatom-talk-2019.pdf Slides of talk given at Iris Workshop 2019
Google Scholar
- Ralf Jung, Jacques-Henri Jourdan, Robbert Krebbers, and Derek Dreyer. 2018. RustBelt: Securing the Foundations of the Rust Programming Language. PACMPL, 2, POPL (2018), 66:1–66:34. https://doi.org/10.1145/3158154
Google Scholar
Digital Library
- Ralf Jung, Robbert Krebbers, Lars Birkedal, and Derek Dreyer. 2016. Higher-Order Ghost State. ICFP. 256–269. isbn:978-1-4503-4219-3 https://doi.org/10.1145/2951913.2951943
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. JFP, 28 (2018), issn:0956-7968, 1469-7653 https://doi.org/10.1017/S0956796818000151
Google Scholar
Cross Ref
- Ralf Jung, Rodolphe Lepigre, Gaurav Parthasarathy, Marianna Rapoport, Amin Timany, Derek Dreyer, and Bart Jacobs. 2020. The Future Is Ours: Prophecy Variables in Separation Logic. PACMPL, 4, POPL (2020), 45:1–45:32. https://doi.org/10.1145/3371113
Google Scholar
Digital Library
- Ralf Jung, David Swasey, Filip Sieczkowski, Kasper Svendsen, Aaron Turon, Lars Birkedal, and Derek Dreyer. 2015. Iris: Monoids and Invariants as an Orthogonal Basis for Concurrent Reasoning. POPL. 637–650. isbn:978-1-4503-3300-9 https://doi.org/10.1145/2676726.2676980
Google Scholar
Digital Library
- Jieung Kim, Vilhelm Sjöberg, Ronghui Gu, and Zhong Shao. 2017. Safety and Liveness of MCS Lock— Layer by Layer. In APLAS (LNCS). 273–297. isbn:978-3-319-71237-6 https://doi.org/10.1007/978-3-319-71237-6_14
Google Scholar
Cross Ref
- Bernhard Kragl and Shaz Qadeer. 2021. The Civl Verifier. In FMCAD. 143–152. https://doi.org/10.34727/2021/isbn.978-3-85448-046-4_23
Google Scholar
Cross Ref
- Robbert Krebbers, Jacques-Henri Jourdan, Ralf Jung, Joseph Tassarotti, Jan-Oliver Kaiser, Amin Timany, Arthur Charguéraud, and Derek Dreyer. 2018. MoSeL: A General, Extensible Modal Framework for Interactive Proofs in Separation Logic. PACMPL, 2, ICFP (2018), 77:1–77:30. https://doi.org/10.1145/3236772
Google Scholar
Digital Library
- Robbert Krebbers, Ralf Jung, Aleš Bizjak, Jacques-Henri Jourdan, Derek Dreyer, and Lars Birkedal. 2017. The Essence of Higher-Order Concurrent Separation Logic. In ESOP (LNCS). 696–723. isbn:978-3-662-54434-1 https://doi.org/10.1007/978-3-662-54434-1_26
Google Scholar
Digital Library
- Robbert Krebbers, Amin Timany, and Lars Birkedal. 2017. Interactive Proofs in Higher-Order Concurrent Separation Logic. POPL. 205–217. isbn:978-1-4503-4660-3 https://doi.org/10.1145/3009837.3009855
Google Scholar
Digital Library
- Siddharth Krishna, Nisarg Patel, Dennis Shasha, and Thomas Wies. 2020. Verifying Concurrent Search Structure Templates. PLDI. 181–196. isbn:978-1-4503-7613-6 https://doi.org/10.1145/3385412.3386029
Google Scholar
Digital Library
- Siddharth Krishna, Nisarg Patel, Dennis Shasha, and Thomas Wies. 2021. Automated Verification of Concurrent Search Structures. Springer. isbn:978-3-031-00678-4 978-3-031-01806-0 https://doi.org/10.1007/978-3-031-01806-0
Google Scholar
Cross Ref
- K Rustan M Leino and Michał Moskal. 2010. Usable Auto-Active Verification. https://fm.csl.sri.com/UV10/submissions/uv2010_submission_20.pdf
Google Scholar
- Hongjin Liang and Xinyu Feng. 2013. Modular Verification of Linearizability with Non-Fixed Linearization Points. PLDI. 459–470. isbn:978-1-4503-2014-6 https://doi.org/10.1145/2491956.2462189
Google Scholar
Digital Library
- William Mansky. 2022. Bringing Iris into the Verified Software Toolchain. https://doi.org/10.48550/arXiv.2207.06574 arxiv:arXiv:2207.06574.
Google Scholar
- Maged M. Michael and Michael L. Scott. 1996. Simple, Fast, and Practical Non-Blocking and Blocking Concurrent Queue Algorithms. PODC. 267–275. isbn:978-0-89791-800-8 https://doi.org/10.1145/248052.248106
Google Scholar
Digital Library
- Ike Mulder, Łukasz Czajka, and Robbert Krebbers. 2023. Beyond Backtracking: Connections in Fine-Grained Concurrent Separation Logic. https://ikemulder.nl/media/papers/diaframe-vee-draft.pdf Manuscript
Google Scholar
- Ike Mulder and Robbert Krebbers. 2023. Artifact of ‘Proof Automation for Linearizability in Separation Logic’. https://doi.org/10.5281/zenodo.7712620 Project webpage:
Google Scholar
Digital Library
- Ike Mulder, Robbert Krebbers, and Herman Geuvers. 2022. Diaframe: Automated Verification of Fine-Grained Concurrent Programs in Iris. PLDI. 809–824. isbn:978-1-4503-9265-5 https://doi.org/10.1145/3519939.3523432
Google Scholar
Digital Library
- Peter Müller, Malte Schwerhoff, and Alexander J. Summers. 2016. Viper: A Verification Infrastructure for Permission-Based Reasoning. In VMCAI (LNCS). 41–62. isbn:978-3-662-49121-8 978-3-662-49122-5 https://doi.org/10.1007/978-3-662-49122-5_2
Google Scholar
Digital Library
- Hiroshi Nakano. 2000. A Modality for Recursion. In LICS. 255–255. isbn:978-0-7695-0725-5 issn:1043-6871 https://doi.org/10.1109/LICS.2000.855774
Google Scholar
Cross Ref
- Aleksandar Nanevski, Anindya Banerjee, Germán Andrés Delbianco, and Ignacio Fábregas. 2019. Specifying Concurrent Programs in Separation Logic: Morphisms and Simulations. In OOPSLA. 3, 161:1–161:30. https://doi.org/10.1145/3360587
Google Scholar
Digital Library
- Matthew J. Parkinson and Alexander J. Summers. 2011. The Relationship between Separation Logic and Implicit Dynamic Frames. In ESOP (LNCS). 439–458. isbn:978-3-642-19718-5 https://doi.org/10.1007/978-3-642-19718-5_23
Google Scholar
Cross Ref
- Ruzica Piskac, Thomas Wies, and Damien Zufferey. 2014. GRASShopper. In TACAS (LNCS). 124–139. isbn:978-3-642-54862-8 https://doi.org/10.1007/978-3-642-54862-8_9
Google Scholar
Cross Ref
- Andrew M. Pitts. 2005. Typed Operational Reasoning. In Advanced Topics in Types and Programming Languages, Benjamin C. Pierce (Ed.). MIT Press, 245–289.
Google Scholar
- 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. PLDI. 158–174. isbn:978-1-4503-8391-2 https://doi.org/10.1145/3453483.3454036
Google Scholar
Digital Library
- Ilya Sergey, Aleksandar Nanevski, and Anindya Banerjee. 2015. Mechanized Verification of Fine-Grained Concurrent Programs. PLDI. 77–87. isbn:978-1-4503-3468-6 https://doi.org/10.1145/2737924.2737964
Google Scholar
Digital Library
- Matthieu Sozeau and Nicolas Oury. 2008. First-Class Type Classes. In TPHOLs (LNCS). 278–293. isbn:978-3-540-71067-7 https://doi.org/10.1007/978-3-540-71067-7_23
Google Scholar
Digital Library
- Simon Spies, Lennard Gäher, Joseph Tassarotti, Ralf Jung, Robbert Krebbers, Lars Birkedal, and Derek Dreyer. 2022. Later Credits: Resourceful Reasoning for the Later Modality. https://doi.org/10.1145/3547631
Google Scholar
Digital Library
- Bas Spitters and Eelis Van Der Weegen. 2011. Type Classes for Mathematics in Type Theory. MSCS, 21, 4 (2011), 795–825. issn:1469-8072, 0960-1295 https://doi.org/10.1017/S0960129511000119
Google Scholar
Cross Ref
- Kasper Svendsen and Lars Birkedal. 2014. Impredicative Concurrent Abstract Predicates. In ESOP (LNCS). 149–168. isbn:978-3-642-54833-8 https://doi.org/10.1007/978-3-642-54833-8_9
Google Scholar
Digital Library
- Kasper Svendsen, Lars Birkedal, and Matthew Parkinson. 2013. Modular Reasoning about Separation of Concurrent Data Structures. In ESOP (LNCS). 169–188. isbn:978-3-642-37036-6 https://doi.org/10.1007/978-3-642-37036-6_11
Google Scholar
Digital Library
- Richard Kent Treiber. 1986. Systems Programming: Coping with Parallelism. International Business Machines Incorporated, Thomas J. Watson Research Center.
Google Scholar
- Aaron Turon, Derek Dreyer, and Lars Birkedal. 2013. Unifying Refinement and Hoare-Style Reasoning in a Logic for Higher-Order Concurrency. ICFP. 377–390. isbn:978-1-4503-2326-0 https://doi.org/10.1145/2500365.2500600
Google Scholar
Digital Library
- Viktor Vafeiadis. 2010. Automatically Proving Linearizability. In CAV. 6174, 450–464. isbn:978-3-642-14294-9 978-3-642-14295-6 https://doi.org/10.1007/978-3-642-14295-6_40
Google Scholar
Digital Library
- Simon Friis Vindum and Lars Birkedal. 2021. Contextual Refinement of the Michael-Scott Queue (Proof Pearl). In CPP. 76–90. isbn:978-1-4503-8299-1 https://doi.org/10.1145/3437992.3439930
Google Scholar
Digital Library
- Simon Friis Vindum, Dan Frumin, and Lars Birkedal. 2022. Mechanized Verification of a Fine-Grained Concurrent Queue from Meta’s Folly Library. In CPP. 100–115. isbn:978-1-4503-9182-5 https://doi.org/10.1145/3497775.3503689
Google Scholar
Digital Library
- Felix A. Wolf, Malte Schwerhoff, and Peter Müller. 2021. Concise Outlines for a Complex Logic: A Proof Outline Checker for TaDA. In FM (LNCS). 407–426. isbn:978-3-030-90870-6 https://doi.org/10.1007/978-3-030-90870-6_22
Google Scholar
Digital Library
- He Zhu, Gustavo Petri, and Suresh Jagannathan. 2015. Poling: SMT Aided Linearizability Proofs. In CAV (LNCS). 3–19. isbn:978-3-319-21668-3 https://doi.org/10.1007/978-3-319-21668-3_1
Google Scholar
Cross Ref
Index Terms
Proof Automation for Linearizability in Separation Logic
Recommendations
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 ...
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 ...
Beyond Backtracking: Connections in Fine-Grained Concurrent Separation Logic
Concurrent separation logic has been responsible for major advances in the formal verification of fine-grained concurrent algorithms and data structures such as locks, barriers, queues, and reference counters. The key ingredient of the verification of ...






Comments