Proving Linearizability Using Partial Orders
Linearizability is the commonly accepted notion of correctness for concurrent data structures. It requires that any execution of the data structure is justified by a linearization—a linear order on operations satisfying the data structure’s sequential specification. Proving linearizability is often challenging because an operation’s position in the linearization order may depend on future operations. This makes it very difficult to incrementally construct the linearization in a proof.
We propose a new proof method that can handle data structures with such future-dependent linearizations. Our key idea is to incrementally construct not a single linear order of operations, but a partial order that describes multiple linearizations satisfying the sequential specification. This allows decisions about the ordering of operations to be delayed, mirroring the behaviour of data structure implementations. We formalise our method as a program logic based on rely-guarantee reasoning, and demonstrate its effectiveness by verifying several challenging data structures: the Herlihy-Wing queue, the TS queue and the Optimistic set.
KeywordsProgram Logic Atomic Step Forward Simulation Abstract History Proof Method
- 2.Dodds, M., Haas, A., Kirsch, C.M.: A scalable, correct time-stamped stack. In: POPL (2015)Google Scholar
- 3.Dongol, B., Derrick, J.: Verifying linearizability: a comparative survey. arXiv CoRR, 1410.6268 (2014)Google Scholar
- 7.Haas, A.: Fast concurrent data structures through timestamping. Ph.D. thesis, University of Salzburg (2015)Google Scholar
- 11.Herlihy, M., Wing, J.M.: Linearizability: a correctness condition for concurrent objects. In: ACM TOPLAS (1990)Google Scholar
- 13.Jones, C.B.: Specification and design of (parallel) programs. In: IFIP Congress (1983)Google Scholar
- 14.Khyzha, A., Dodds, M., Gotsman, A., Parkinson, M.: Proving linearizability using partial orders (extended version). arXiv CoRR, 1701.05463 (2017)Google Scholar
- 15.Liang, H., Feng, X.: Modular verification of linearizability with non-fixed linearization points. In: PLDI (2013)Google Scholar
- 16.Morrison, A., Afek, Y.: Fast concurrent queues for x86 processors. In: PPoPP (2013)Google Scholar
- 17.O’Hearn, P.W., Rinetzky, N., Vechev, M.T., Yahav, E., Yorsh, G.: Verifying linearizability with hindsight. In: PODC (2010)Google Scholar
- 20.Turon, A., Dreyer, D., Birkedal, L.: Unifying refinement and hoare-style reasoning in a logic for higher-order concurrency. In: ICFP (2013)Google Scholar
- 21.Turon, A.J., Thamsborg, J., Ahmed, A., Birkedal, L., Dreyer, D.: Logical relations for fine-grained concurrency. In: POPL (2013)Google Scholar
- 22.Vafeiadis, V.: Modular fine-grained concurrency verification. Ph.D. thesis, University of Cambridge, UK (2008). Technical report UCAM-CL-TR-726Google Scholar