How to Prove Algorithms Linearisable

  • Gerhard Schellhorn
  • Heike Wehrheim
  • John Derrick
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7358)


Linearisability is the standard correctness criterion for concurrent data structures. In this paper, we present a sound and complete proof technique for linearisability based on backward simulations. We exemplify this technique by a linearisability proof of the queue algorithm presented in Herlihy and Wing’s landmark paper. Except for the manual proof by them, none of the many other current approaches to checking linearisability has successfully treated this intricate example. Our approach is grounded on complete mechanisation: the proof obligations for the queue are verified using the interactive prover KIV, and so is the general soundness and completeness result for our proof technique.


Proof Obligation Concrete State Return Event Separation Logic Linearisation Point 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    Abadi, M., Lamport, L.: The existence of refinement mappings. Theoretical Computer Science 2, 253–284 (1991)MathSciNetCrossRefGoogle Scholar
  2. 2.
    Amit, D., Rinetzky, N., Reps, T.W., Sagiv, M., Yahav, E.: Comparison Under Abstraction for Verifying Linearizability. In: Damm, W., Hermanns, H. (eds.) CAV 2007. LNCS, vol. 4590, pp. 477–490. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  3. 3.
    Banach, R., Schellhorn, G.: Atomic Actions, and their Refinements to Isolated Protocols. FAC 22(1), 33–61 (2010)zbMATHGoogle Scholar
  4. 4.
    Burckhardt, S., Dern, C., Musuvathi, M., Tan, R.: Line-up: a complete and automatic linearizability checker. In: Proceedings of PLDI, pp. 330–340. ACM (2010)Google Scholar
  5. 5.
    Černý, P., Radhakrishna, A., Zufferey, D., Chaudhuri, S., Alur, R.: Model Checking of Linearizability of Concurrent List Implementations. In: Touili, T., Cook, B., Jackson, P. (eds.) CAV 2010. LNCS, vol. 6174, pp. 465–479. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  6. 6.
    Derrick, J., Boiten, E.: Refinement in Z and Object-Z: Foundations and Advanced Applications. Springer (May 2001)Google Scholar
  7. 7.
    Derrick, J., Schellhorn, G., Wehrheim, H.: Mechanically verified proof obligations for linearizability. ACM Trans. Program. Lang. Syst. 33(1), 4 (2011)CrossRefGoogle Scholar
  8. 8.
    Derrick, J., Schellhorn, G., Wehrheim, H.: Verifying Linearisability with Potential Linearisation Points. In: Butler, M., Schulte, W. (eds.) FM 2011. LNCS, vol. 6664, pp. 323–337. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  9. 9.
    Doherty, S., Groves, L., Luchangco, V., Moir, M.: Formal Verification of a Practical Lock-Free Queue Algorithm. In: de Frutos-Escrig, D., Núñez, M. (eds.) FORTE 2004. LNCS, vol. 3235, pp. 97–114. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  10. 10.
    Filipovic, I., O’Hearn, P.W., Rinetzky, N., Yang, H.: Abstraction for concurrent objects. Theoretical Computer Science 411(51-52), 4379–4398 (2010)MathSciNetzbMATHCrossRefGoogle Scholar
  11. 11.
    Fu, M., Li, Y., Feng, X., Shao, Z., Zhang, Y.: Reasoning about Optimistic Concurrency Using a Program Logic for History. In: Gastin, P., Laroussinie, F. (eds.) CONCUR 2010. LNCS, vol. 6269, pp. 388–402. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  12. 12.
    Groves, L., Colvin, R.: Derivation of a scalable lock-free stack algorithm. ENTCS 187, 55–74 (2007)Google Scholar
  13. 13.
    Heller, S., Herlihy, M., Luchangco, V., Moir, M., Scherer III, W.N., Shavit, N.: A Lazy Concurrent List-Based Set Algorithm. In: Anderson, J.H., Prencipe, G., Wattenhofer, R. (eds.) OPODIS 2005. LNCS, vol. 3974, pp. 3–16. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  14. 14.
    Herlihy, M., Wing, J.M.: Linearizability: A correctness condition for concurrent objects. ACM TOPLAS 12(3), 463–492 (1990)CrossRefGoogle Scholar
  15. 15.
    Jones, C.B.: Specification and design of (parallel) programs. In: Proceedings of IFIP 1983, pp. 321–332. North-Holland (1983)Google Scholar
  16. 16.
    Web presentation of linearizability theory and the lazy set algorithm (2010),
  17. 17.
    Web presentation of KIV proofs for this paper (2011),
  18. 18.
    Lynch, N.: Distributed Algorithms. Morgan Kaufmann Publishers (1996)Google Scholar
  19. 19.
    Lynch, N., Vaandrager, F.: Forward and Backward Simulations – Part I: Untimed systems. Information and Computation 121(2), 214–233 (1995)MathSciNetzbMATHCrossRefGoogle Scholar
  20. 20.
    Michael, M.M., Scott, M.L.: Simple, fast, and practical non-blocking and blocking concurrent queue algorithms. In: Proc. 15th ACM Symp. on Principles of Distributed Computing, pp. 267–275 (1996)Google Scholar
  21. 21.
    Moir, M., Nussbaum, D., Shalev, O., Shavit, N.: Using elimination to implement scalable and lock-free fifo queues. In: SPAA, pp. 253–262. ACM (2005)Google Scholar
  22. 22.
    O’Hearn, P.W., Rinetzky, N., Vechev, M.T., Yahav, E., Yorsh, G.: Verifying linearizability with hindsight. In: 29th Annual ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing (PODC), pp. 85–94 (2010)Google Scholar
  23. 23.
    Reif, W., Schellhorn, G., Stenzel, K., Balser, M.: Structured specifications and interactive proofs with KIV. In: Automated Deduction—A Basis for Applications, Interactive Theorem Proving, vol. II, ch. 1, pp. 13–39. Kluwer (1998)Google Scholar
  24. 24.
    Tofan, B., Bäumler, S., Schellhorn, G., Reif, W.: Temporal Logic Verification of Lock-Freedom. In: Bolduc, C., Desharnais, J., Ktari, B. (eds.) MPC 2010. LNCS, vol. 6120, pp. 377–396. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  25. 25.
    Tofan, B., Schellhorn, G., Reif, W.: Formal Verification of a Lock-Free Stack with Hazard Pointers. In: Cerone, A., Pihlajasaari, P. (eds.) ICTAC 2011. LNCS, vol. 6916, pp. 239–255. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  26. 26.
    Turon, A., Wand, M.: A separation logic for refining concurrent objects. In: POPL, vol. 46, pp. 247–258. ACM (2011)Google Scholar
  27. 27.
    Vafeiadis, V.: Modular fine-grained concurrency verification. PhD thesis, University of Cambridge (2007)Google Scholar
  28. 28.
    Vafeiadis, V.: Automatically Proving Linearizability. In: Touili, T., Cook, B., Jackson, P. (eds.) CAV 2010. LNCS, vol. 6174, pp. 450–464. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  29. 29.
    Vafeiadis, V., Herlihy, M., Hoare, T., Shapiro, M.: Proving correctness of highly-concurrent linearisable objects. In: PPoPP 2006, pp. 129–136. ACM (2006)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Gerhard Schellhorn
    • 1
  • Heike Wehrheim
    • 2
  • John Derrick
    • 3
  1. 1.Institut für InformatikUniversität AugsburgAugsburgGermany
  2. 2.Institut für InformatikUniversität PaderbornPaderbornGermany
  3. 3.Department of ComputingUniversity of SheffieldSheffieldUK

Personalised recommendations