Abstract
Compositionality is at the core of programming languages research and has become an important goal toward scalable verification of large systems. Despite that, there is no compositional account of linearizability, the gold standard of correctness for concurrent objects.
In this paper, we develop a compositional semantics for linearizable concurrent objects. We start by showcasing a common issue, which is independent of linearizability, in the construction of compositional models of concurrent computation: interaction with the neutral element for composition can lead to emergent behaviors, a hindrance to compositionality. Category theory provides a solution for the issue in the form of the Karoubi envelope. Surprisingly, and this is the main discovery of our work, this abstract construction is deeply related to linearizability and leads to a novel formulation of it. Notably, this new formulation neither relies on atomicity nor directly upon happens-before ordering and is only possible because of compositionality, revealing that linearizability and compositionality are intrinsically related to each other.
We use this new, and compositional, understanding of linearizability to revisit much of the theory of linearizability, providing novel, simple, algebraic proofs of the locality property and of an analogue of the equivalence with observational refinement. We show our techniques can be used in practice by connecting our semantics with a simple program logic that is nonetheless sound concerning this generalized linearizability.
- Samson Abramsky, Radha Jagadeesan, and Pasquale Malacaria. 2000. Full Abstraction for PCF. Inf. Comput., 163, 2 (2000), 409–470. issn:0890-5401 https://doi.org/10.1006/inco.2000.2930
Google Scholar
Digital Library
- Samson Abramsky and Guy McCusker. 1999. Game Semantics. In Computational Logic, Ulrich Berger and Helmut Schwichtenberg (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 1–55. isbn:978-3-642-58622-4 https://doi.org/10.1007/978-3-642-58622-4_1
Google Scholar
Cross Ref
- S. Abramsky and P.-A. Mellies. 1999. Concurrent games and full completeness. In Proceedings. 14th Symposium on Logic in Computer Science (Cat. No. PR00158). IEEE Computer Society, USA. 431–442. https://doi.org/10.1109/LICS.1999.782638
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. Proc. ACM Program. Lang., 5, ICFP (2021), Article 81, aug, 29 pages. https://doi.org/10.1145/3473586
Google Scholar
Digital Library
- Andreas Blass. 1992. A Game Semantics for Linear Logic. Ann. Pure Appl. Log., 56, 1–3 (1992), 183–220. issn:0168-0072 https://doi.org/10.1016/0168-0072(92)90073-9
Google Scholar
Cross Ref
- Armando Castañeda, Sergio Rajsbaum, and Michel Raynal. 2015. Specifying Concurrent Problems: Beyond Linearizability and up to Tasks. In Proceedings of the 29th International Symposium on Distributed Computing - Volume 9363 (DISC 2015). Springer-Verlag, Berlin, Heidelberg. 420–435. isbn:9783662486528 https://doi.org/10.1007/978-3-662-48653-5_28
Google Scholar
Digital Library
- Simon Castellan, Pierre Clairambault, Silvain Rideau, and Glynn Winskel. 2017. Games and Strategies as Event Structures. Logical Methods in Computer Science, Volume 13, Issue 3 (2017), Sept., https://doi.org/10.23638/LMCS-13(3:35)2017
Google Scholar
Cross Ref
- Andrea Cerone, Alexey Gotsman, and Hongseok Yang. 2014. Parameterised Linearisability. In Automata, Languages, and Programming, Javier Esparza, Pierre Fraigniaud, Thore Husfeldt, and Elias Koutsoupias (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 98–109. isbn:978-3-662-43951-7 https://doi.org/10.1007/978-3-662-43951-7_9
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 2014 – Object-Oriented Programming, Richard Jones (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 207–231. isbn:978-3-662-44202-9 https://doi.org/10.1007/978-3-662-44202-9_9
Google Scholar
Digital Library
- Thomas Dinsdale-Young, Mike Dodds, Philippa Gardner, Matthew J. Parkinson, and Viktor Vafeiadis. 2010. Concurrent Abstract Predicates. In ECOOP 2010 – Object-Oriented Programming, Theo D’Hondt (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 504–528. isbn:978-3-642-14107-2 https://doi.org/10.1007/978-3-642-14107-2_24
Google Scholar
Cross Ref
- Xinyu Feng, Rodrigo Ferreira, and Zhong Shao. 2007. On the Relationship Between Concurrent Separation Logic and Assume-Guarantee Reasoning. In Programming Languages and Systems, Rocco De Nicola (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 173–188. isbn:978-3-540-71316-6 https://doi.org/10.5555/1762174.1762193
Google Scholar
Digital Library
- Ivana Filipovic, Peter O’Hearn, Noam Rinetzky, and Hongseok Yang. 2010. Abstraction for Concurrent Objects. Theor. Comput. Sci., 411, 51–52 (2010), dec, 4379–4398. issn:0304-3975 https://doi.org/10.1016/j.tcs.2010.09.021
Google Scholar
Digital Library
- Ming Fu, Yong Li, Xinyu Feng, Zhong Shao, and Yu Zhang. 2010. Reasoning about Optimistic Concurrency Using a Program Logic for History. In CONCUR 2010 - Concurrency Theory, Paul Gastin and François Laroussinie (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 388–402. isbn:978-3-642-15375-4 https://doi.org/10.1007/978-3-642-15375-4_27
Google Scholar
Cross Ref
- Philippe Gaucher. 2020. Flows revisited: the model category structure and its left determinedness. Cahiers de topologie et géométrie différentielle catégoriques, LXI, 2 (2020), 208–226. https://hal.archives-ouvertes.fr/hal-01919037
Google Scholar
- Dan R. Ghica. 2013. Diagrammatic Reasoning for Delay-Insensitive Asynchronous Circuits. In Computation, Logic, Games, and Quantum Foundations. The Many Facets of Samson Abramsky: Essays Dedicated to Samson Abramsky on the Occasion of His 60th Birthday, Bob Coecke, Luke Ong, and Prakash Panangaden (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 52–68. isbn:978-3-642-38164-5 https://doi.org/10.1007/978-3-642-38164-5_5
Google Scholar
Cross Ref
- Dan R. Ghica. 2019. The far side of the cube. CoRR, abs/1908.04291 (2019), arXiv:1908.04291. arxiv:1908.04291
Google Scholar
- Dan R. Ghica and Andrzej S. Murawski. 2004. Angelic Semantics of Fine-Grained Concurrency. In Foundations of Software Science and Computation Structures, Igor Walukiewicz (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 211–225. isbn:978-3-540-24727-2 https://doi.org/10.1016/j.apal.2007.10.005
Google Scholar
Cross Ref
- Éric Goubault, Jérémy Ledent, and Samuel Mimram. 2018. Concurrent Specifications Beyond Linearizability. In 22nd International Conference on Principles of Distributed Systems (OPODIS 2018), Jiannong Cao, Faith Ellen, Luis Rodrigues, and Bernardo Ferreira (Eds.) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 125). Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany. 28:1–28:16. isbn:978-3-95977-098-9 issn:1868-8969 https://doi.org/10.4230/LIPIcs.OPODIS.2018.28
Google Scholar
Cross Ref
- 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. In Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’15). Association for Computing Machinery, New York, NY, USA. 595–608. isbn:9781450333009 https://doi.org/10.1145/2676726.2676975
Google Scholar
Digital Library
- Ronghui Gu, Zhong Shao, Hao Chen, Xiongnan Wu, Jieung Kim, Vilhelm Sjöberg, and David Costanzo. 2016. CertiKOS: An Extensible Architecture for Building Certified Concurrent OS Kernels. In Proceedings of the 12th USENIX Conference on Operating Systems Design and Implementation (OSDI’16). USENIX Association, USA. 653–669. isbn:9781931971331
Google Scholar
- Ronghui Gu, Zhong Shao, Jieung Kim, Xiongnan (Newman) Wu, Jérémie Koenig, Vilhelm Sjöberg, Hao Chen, David Costanzo, and Tahina Ramananandro. 2018. Certified Concurrent Abstraction Layers. In Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2018). Association for Computing Machinery, New York, NY, USA. 646–661. isbn:9781450356985 https://doi.org/10.1145/3192366.3192381
Google Scholar
Digital Library
- Rachid Guerraoui and Eric Ruppert. 2014. Linearizability Is Not Always a Safety Property. In Networked Systems, Guevara Noubir and Michel Raynal (Eds.). Springer International Publishing, Cham. 57–69. isbn:978-3-319-09581-3 https://doi.org/10.1007/978-3-319-09581-3_5
Google Scholar
Cross Ref
- Andreas Haas, Thomas A. Henzinger, Andreas Holzer, Christoph M. Kirsch, Michael Lippautz, Hannes Payer, Ali Sezgin, Ana Sokolova, and Helmut Veith. 2016. Local Linearizability for Concurrent Container-Type Data Structures. In 27th International Conference on Concurrency Theory (CONCUR 2016), Josée Desharnais and Radha Jagadeesan (Eds.) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 59). Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany. 6:1–6:15. isbn:978-3-95977-017-0 issn:1868-8969 https://doi.org/10.4230/LIPIcs.CONCUR.2016.6
Google Scholar
Cross Ref
- Susumu Hayashi. 1985. Adjunction of semifunctors: Categorical structures in nonextensional λ calculus. Theoretical Computer Science, 41 (1985), 95–104. issn:0304-3975 https://doi.org/10.1016/0304-3975(85)90062-3
Google Scholar
Cross Ref
- Nir Hemed, Noam Rinetzky, and Viktor Vafeiadis. 2015. Modular Verification of Concurrency-Aware Linearizability. In Proceedings of the 29th International Symposium on Distributed Computing - Volume 9363 (DISC 2015). Springer-Verlag, Berlin, Heidelberg. 371–387. isbn:9783662486528 https://doi.org/10.1007/978-3-662-48653-5_25
Google Scholar
Digital 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 Scholar
Digital Library
- R. Hoofman and I. Moerdijk. 1995. A remark on the theory of semi-functors. Mathematical Structures in Computer Science, 5, 1 (1995), 1–8. https://doi.org/10.1017/S096012950000061X
Google Scholar
Cross Ref
- J. M. E. Hyland and C.-H. L. Ong. 2000. On Full Abstraction for PCF: I, II, and III. Inf. Comput., 163, 2 (2000), 285–408. https://doi.org/10.1006/inco.2000.2917
Google Scholar
Digital Library
- Martin Hyland. 1997. Game Semantics. In Semantics and Logics of Computation, Andrew M. Pitts and P.Editors Dybjer (Eds.). Cambridge University Press, Cambridge, UK. 131–184. https://doi.org/10.1017/CBO9780511526619.005
Google Scholar
Cross Ref
- Martin Hyland, Misao Nagayama, John Power, and Giuseppe Rosolini. 2006. A Category Theoretic Formulation for Engeler-style Models of the Untyped λ -Calculus. Electronic Notes in Theoretical Computer Science, 161 (2006), 43–57. issn:1571-0661 https://doi.org/10.1016/j.entcs.2006.04.024 Proceedings of the Third Irish Conference on the Mathematical Foundations of Computer Science and Information Technology (MFCSIT 2004).
Google Scholar
Cross Ref
- 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, 28 (2018), e20. 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. 2019. The Future is Ours: Prophecy Variables in Separation Logic. Proc. ACM Program. Lang., 4, POPL (2019), Article 45, dec, 32 pages. 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. SIGPLAN Not., 50, 1 (2015), jan, 637–650. issn:0362-1340 https://doi.org/10.1145/2775051.2676980
Google Scholar
Digital Library
- Artem Khyzha, Mike Dodds, Alexey Gotsman, and Matthew Parkinson. 2017. Proving Linearizability Using Partial Orders. In Programming Languages and Systems: 26th European Symposium on Programming, ESOP 2017, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2017, Uppsala, Sweden, April 22–29, 2017, Proceedings. Springer-Verlag, Berlin, Heidelberg. 639–667. isbn:978-3-662-54433-4 https://doi.org/10.1007/978-3-662-54434-1_24
Google Scholar
Digital Library
- Artem Khyzha, Alexey Gotsman, and Matthew Parkinson. 2016. A Generic Logic for Proving Linearizability. In FM 2016: Formal Methods, John Fitzgerald, Constance Heitmeyer, Stefania Gnesi, and Anna Philippou (Eds.). Springer International Publishing, Cham. 426–443. isbn:978-3-319-48989-6 https://doi.org/10.1007/978-3-319-48989-6_26
Google Scholar
Cross Ref
- Jérémie Koenig and Zhong Shao. 2020. Refinement-Based Game Semantics for Certified Abstraction Layers. In Proceedings of the 35th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS ’20). Association for Computing Machinery, New York, NY, USA. 633–647. isbn:9781450371049 https://doi.org/10.1145/3373718.3394799
Google Scholar
Digital Library
- Xavier Leroy. 2009. Formal Verification of a Realistic Compiler. Commun. ACM, 52, 7 (2009), July, 107–115. issn:0001-0782 https://doi.org/10.1145/1538788.1538814
Google Scholar
Digital Library
- Mohsen Lesani, Li-yao Xia, Anders Kaseorg, Christian J. Bell, Adam Chlipala, Benjamin C. Pierce, and Steve Zdancewic. 2022. C4: Verified Transactional Objects. Proc. ACM Program. Lang., 6, OOPSLA1 (2022), Article 80, apr, 31 pages. https://doi.org/10.1145/3527324
Google Scholar
Digital Library
- Hongjin Liang and Xinyu Feng. 2016. A Program Logic for Concurrent Objects under Fair Scheduling. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’16). Association for Computing Machinery, New York, NY, USA. 385–399. isbn:9781450335492 https://doi.org/10.1145/2837614.2837635
Google Scholar
Digital Library
- Paul-André Mellies. 2019. Categorical Combinatorics of Scheduling and Synchronization in Game Semantics. Proc. ACM Program. Lang., 3, POPL (2019), Article 23, jan, 30 pages. https://doi.org/10.1145/3290336
Google Scholar
Digital Library
- Paul-André Melliès and Samuel Mimram. 2007. Asynchronous Games: Innocence Without Alternation. In CONCUR 2007 – Concurrency Theory, Luís Caires and Vasco T. Vasconcelos (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 395–411. isbn:978-3-540-74407-8 https://doi.org/10.1007/978-3-540-74407-8_27
Google Scholar
Cross Ref
- Paul-André Melliès and Léo Stefanesco. 2020. Concurrent Separation Logic Meets Template Games. In Proceedings of the 35th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS ’20). Association for Computing Machinery, New York, NY, USA. 742–755. isbn:9781450371049 https://doi.org/10.1145/3373718.3394762
Google Scholar
Digital Library
- M.-A. Moens, U. Berni-Canani, and Francis Borceux. 2002. On regular presheaves and regular semi-categories. Cahiers de Topologie et Géométrie Différentielle Catégoriques, 43, 3 (2002), 163–190. http://www.numdam.org/item/CTGDC_2002__43_3_163_0/
Google Scholar
- Andrzej S. Murawski and Nikos Tzevelekos. 2019. Higher-order linearisability. Journal of Logical and Algebraic Methods in Programming, 104 (2019), 86–116. issn:2352-2208 https://doi.org/10.1016/j.jlamp.2019.01.002
Google Scholar
Cross Ref
- Aleksandar Nanevski, Ruy Ley-Wild, Ilya Sergey, and Germán Andrés Delbianco. 2014. Communicating State Transition Systems for Fine-Grained Concurrent Resources. In Programming Languages and Systems, Zhong Shao (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 290–310. isbn:978-3-642-54833-8 https://doi.org/10.1007/978-3-642-54833-8_16
Google Scholar
Digital Library
- Gil Neiger. 1994. Set-Linearizability. In Proceedings of the Thirteenth Annual ACM Symposium on Principles of Distributed Computing (PODC ’94). Association for Computing Machinery, New York, NY, USA. 396. isbn:0897916549 https://doi.org/10.1145/197917.198176
Google Scholar
Digital Library
- Arthur Oliveira Vale, Paul-André Melliès, Zhong Shao, Jérémie Koenig, and Léo Stefanesco. 2022. Layered and Object-Based Game Semantics. Proc. ACM Program. Lang., 6, POPL (2022), Article 42, jan, 32 pages. https://doi.org/10.1145/3498703
Google Scholar
Digital Library
- Arthur Oliveira Vale, Zhong Shao, and Yixuan Chen. 2022. A Compositional Theory of Linearizability. Yale Univ.. https://flint.cs.yale.edu/publications/ctlinear.html
Google Scholar
- R Piedeleu. 2019. Picturing resources in concurrency. Ph.D. Dissertation. University of Oxford.
Google Scholar
- Uday S. Reddy. 1993. A Linear Logic Model of State. Dept. of Computer Science, UIUC, Urbana, IL.
Google Scholar
- Uday S. Reddy. 1996. Global State Considered Unnecessary: An Introduction to Object-Based Semantics. LISP Symb. Comput., 9, 1 (1996), 7–76. https://doi.org/10.1007/978-1-4757-3851-3_9
Google Scholar
Cross Ref
- Silvain Rideau and Glynn Winskel. 2011. Concurrent Strategies. In 2011 IEEE 26th Annual Symposium on Logic in Computer Science. IEEE Computer Society, USA. 409–418. https://doi.org/10.1109/LICS.2011.13
Google Scholar
Digital Library
- Gerhard Schellhorn, John Derrick, and Heike Wehrheim. 2014. A Sound and Complete Proof Technique for Linearizability of Concurrent Data Structures. ACM Trans. Comput. Logic, 15, 4 (2014), Article 31, sep, 37 pages. issn:1529-3785 https://doi.org/10.1145/2629496
Google Scholar
Digital Library
- Kasper Svendsen and Lars Birkedal. 2014. Impredicative Concurrent Abstract Predicates. In Programming Languages and Systems, Zhong Shao (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 149–168. isbn:978-3-642-54833-8 https://doi.org/10.1007/978-3-642-54833-8_9
Google Scholar
Digital Library
- Aaron Turon, Derek Dreyer, and Lars Birkedal. 2013. Unifying Refinement and Hoare-Style Reasoning in a Logic for Higher-Order Concurrency. In Proceedings of the 18th ACM SIGPLAN International Conference on Functional Programming (ICFP ’13). Association for Computing Machinery, New York, NY, USA. 377–390. isbn:9781450323260 https://doi.org/10.1145/2500365.2500600
Google Scholar
Digital Library
- Viktor Vafeiadis, Maurice Herlihy, Tony Hoare, and Marc Shapiro. 2006. Proving Correctness of Highly-Concurrent Linearisable Objects. In Proceedings of the Eleventh ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP ’06). Association for Computing Machinery, New York, NY, USA. 129–136. isbn:1595931899 https://doi.org/10.1145/1122971.1122992
Google Scholar
Digital Library
- Viktor Vafeiadis and Matthew Parkinson. 2007. A Marriage of Rely/Guarantee and Separation Logic. In CONCUR 2007 – Concurrency Theory, Luís Caires and Vasco T. Vasconcelos (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 256–271. isbn:978-3-540-74407-8
Google Scholar
Cross Ref
Index Terms
A Compositional Theory of Linearizability
Recommendations
Checking Linearizability of Encapsulated Extended Operations
Proceedings of the 23rd European Symposium on Programming Languages and Systems - Volume 8410Linearizable objects data-structures provide operations that appear to execute atomically. Modern mainstream languages provide many linearizable data-structures, simplifying concurrent programming. In practice, however, programmers often find a need to ...
Specifying and checking semantic atomicity for multithreaded programs
ASPLOS '11In practice, it is quite difficult to write correct multithreaded programs due to the potential for unintended and nondeterministic interference between parallel threads. A fundamental correctness property for such programs is atomicity---a block of ...
Help when needed, but no more: Efficient read/write partial snapshot
An atomic snapshot object is an object that can be concurrently accessed by asynchronous processes prone to crash. It is made of m components (base atomic registers) and is defined by two operations: an update operation that allows a process to ...






Comments