ABSTRACT
Concurrent search structure templates are a technique for separating the verification of a concurrent data structure into concurrency-control and data-structure components, which can then be modularly combined with no additional proof effort. In this paper, we implement the template approach in the Verified Software Toolchain (VST), and use it to prove correctness of C implementations of fine-grained concurrent data structures. This involves translating code, specifications, and proofs to the idiom of C and VST, and gives us another look at the requirements and limitations of the template approach. We encounter several questions about the boundaries between template and data structure, as well as some common data structure operations that cannot naturally be decomposed into templates. Nonetheless, the approach appears promising for modular verification of real-world concurrent data structures.
- Andrew W. Appel, Robert Dockins, Aquinas Hobor, Lennart Beringer, Josiah Dodds, Gordon Stewart, Sandrine Blazy, and Xavier Leroy. 2014. Program Logics for Certified Compilers. Cambridge University Press. isbn:110704801X Google ScholarDigital Library
- Lars Birkedal, Thomas Dinsdale-Young, Armaël Guéneau, Guilhem Jaber, Kasper Svendsen, and Nikos Tzevelekos. 2021. Theorems for Free from Separation Logic Specifications. Proc. ACM Program. Lang., 5, ICFP (2021), Article 81, aug, 29 pages. https://doi.org/10.1145/3473586 Google ScholarDigital Library
- Pedro da Rocha Pinto, Thomas Dinsdale-Young, and Philippa Gardner. 2014. TaDA: A Logic for Time and Data Abstraction. In ECOOP 2014 – Object-Oriented Programming, Richard Jones (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 207–231. isbn:978-3-662-44202-9 Google Scholar
- 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. In Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation (PLDI 2022). Association for Computing Machinery, New York, NY, USA. 792–808. isbn:9781450392655 https://doi.org/10.1145/3519939.3523451 Google ScholarDigital Library
- Yotam MY Feldman, Artem Khyzha, Constantin Enea, Adam Morrison, Aleksandar Nanevski, Noam Rinetzky, and Sharon Shoham. 2020. Proving Highly-Concurrent Traversals Correct. Proceedings of the ACM on Programming Languages, 4, OOPSLA (2020), 1–29. Google ScholarDigital Library
- Maurice P. Herlihy and Jeannette M. Wing. 1990. Linearizability: A Correctness Condition for Concurrent Objects. ACM Trans. Program. Lang. Syst., 12, 3 (1990), jul, 463–492. issn:0164-0925 https://doi.org/10.1145/78969.78972 Google ScholarDigital Library
- Bart Jacobs and Frank Piessens. 2011. Expressive Modular Fine-Grained Concurrency Specification. In Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’11). Association for Computing Machinery, New York, NY, USA. 271–282. isbn:9781450304900 https://doi.org/10.1145/1926385.1926417 Google ScholarDigital Library
- Ralf Jung, Jacques-Henri Jourdan, Robbert Krebbers, and Derek Dreyer. 2017. RustBelt: Securing the Foundations of the Rust Programming Language. Proc. ACM Program. Lang., 2, POPL (2017), Article 66, dec, 34 pages. https://doi.org/10.1145/3158154 Google ScholarDigital 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. In Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2015, Mumbai, India, January 15-17, 2015. ACM, 637–650. https://doi.org/10.1145/2676726.2676980 Google ScholarDigital Library
- Siddharth Krishna. 2019. Compositional Abstractions for Verifying Concurrent Data Structures. Ph. D. Dissertation. New York University. Google Scholar
- Siddharth Krishna, Nisarg Patel, Dennis Shasha, and Thomas Wies. 2020. Verifying Concurrent Search Structure Templates. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2020). Association for Computing Machinery, New York, NY, USA. 181–196. isbn:9781450376136 https://doi.org/10.1145/3385412.3386029 Google ScholarDigital Library
- Siddharth Krishna, Dennis Shasha, and Thomas Wies. 2017. Go with the Flow: Compositional Abstractions for Concurrent Data Structures. Proc. ACM Program. Lang., 2, POPL (2017), Article 37, dec, 31 pages. https://doi.org/10.1145/3158125 Google ScholarDigital Library
- Xavier Leroy. 2009. Formal Verification of a Realistic Compiler. Commun. ACM, 52, 7 (2009), jul, 107–115. issn:0001-0782 https://doi.org/10.1145/1538788.1538814 Google ScholarDigital Library
- William Mansky. 2022. Bringing Iris into the Verified Software Toolchain. CoRR, abs/2207.06574 (2022), https://doi.org/10.48550/ARXIV.2207.06574 Google ScholarCross Ref
- Yandong Mao, Eddie Kohler, and Robert Tappan Morris. 2012. Cache Craftiness for Fast Multicore Key-Value Storage. In Proceedings of the 7th ACM European Conference on Computer Systems (EuroSys ’12). Association for Computing Machinery, New York, NY, USA. 183–196. isbn:9781450312233 https://doi.org/10.1145/2168836.2168855 Google ScholarDigital Library
- Duc-Than Nguyen, Lennart Beringer, William Mansky, and Shengyi Wang. 2023. Compositional Verification of Concurrent C Programs with Search Structure Templates (Artifact). https://doi.org/10.5281/zenodo.8337004 Google ScholarDigital Library
- Nisarg Patel, Siddharth Krishna, Dennis Shasha, and Thomas Wies. 2021. Verifying Concurrent Multicopy Search Structures. Proc. ACM Program. Lang., 5, OOPSLA (2021), Article 113, oct, 32 pages. https://doi.org/10.1145/3485490 Google ScholarDigital Library
- Ruzica Piskac, Thomas Wies, and Damien Zufferey. 2014. GRASShopper. In Tools and Algorithms for the Construction and Analysis of Systems, Erika Ábrahám and Klaus Havelund (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 124–139. isbn:978-3-642-54862-8 Google Scholar
- Ilya Sergey, Aleksandar Nanevski, and Anindya Banerjee. 2015. Specifying and Verifying Concurrent Algorithms with Histories and Subjectivity. In Programming Languages and Systems - 24th European Symposium on Programming, ESOP 2015, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2015, London, UK, April 11-18, 2015. Proceedings (Lecture Notes in Computer Science, Vol. 9032). Springer, 333–358. https://doi.org/10.1007/978-3-662-46669-8_14 Google ScholarDigital Library
- Roshan Sharma, Shengyi Wang, Alexander Oey, Anastasiia Evdokimova, Lennart Beringer, and William Mansky. 2022. Proving Logical Atomicity using Lock Invariants. Presented at Advances in Separation Logic (ASL 2022) Google Scholar
- Dennis Shasha and Nathan Goodman. 1988. Concurrent Search Structure algorithms. ACM Transactions on Database Systems (TODS), 13, 1 (1988), 53–90. Google ScholarDigital Library
- The Coq Development Team. 2022. The Coq Proof Assistant. https://doi.org/10.5281/zenodo.5846982 Google ScholarCross Ref
- Simon Friis Vindum, Dan Frumin, and Lars Birkedal. 2022. Mechanized Verification of a Fine-Grained Concurrent Queue from Meta’s Folly Library. In Proceedings of the 11th ACM SIGPLAN International Conference on Certified Programs and Proofs (CPP 2022). Association for Computing Machinery, New York, NY, USA. 100–115. isbn:9781450391825 https://doi.org/10.1145/3497775.3503689 Google ScholarDigital Library
- Xingbo Wu, Fan Ni, and Song Jiang. 2019. Wormhole: A Fast Ordered Index for In-memory Data Management. In Proceedings of the Fourteenth EuroSys Conference 2019. 1–16. https://doi.org/10.1145/3302424.3303955 Google ScholarDigital Library
- Shale Xiong, Pedro da Rocha Pinto, Gian Ntzik, and Philippa Gardner. 2017. Abstract Specifications for Concurrent Maps. In Proceedings of the 26 th European Symposium on Programming (ESOP’17), Hongseok Yang (Ed.) (Lecture Notes in Computer Science, Vol. 10201). Springer, 964–990. https://doi.org/10.1007/978-3-662-54434-1_36 Google ScholarDigital Library
Index Terms
- Compositional Verification of Concurrent C Programs with Search Structure Templates
Recommendations
An Iris Instance for Verifying CompCert C Programs
Iris is a generic separation logic framework that has been instantiated to reason about a wide range of programming languages and language features. Most Iris instances are defined on simple core calculi, but by connecting Iris to new or existing formal ...
Proof Automation for Linearizability in Separation Logic
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 ...
Formal Reasoning about Concurrent Assembly Code with Reentrant Locks
TASE '09: Proceedings of the 2009 Third IEEE International Symposium on Theoretical Aspects of Software EngineeringThis paper focuses on the problem of reasoning about concurrent assembly code with reentrant locks. Our verification technique is based on concurrent separation logic (CSL). In CSL, locks are treated as non-reentrant locks and each lock is associated ...
Comments