Advertisement

Proving Linearizability Using Forward Simulations

  • Ahmed Bouajjani
  • Michael Emmi
  • Constantin EneaEmail author
  • Suha Orhun Mutluergil
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10427)

Abstract

Linearizability is the standard correctness criterion for concurrent data structures such as stacks and queues. It allows to establish observational refinement between a concurrent implementation and an atomic reference implementation. Proving linearizability requires identifying linearization points for each method invocation along all possible computations, leading to valid sequential executions, or alternatively, establishing forward and backward simulations. In both cases, carrying out proofs is hard and complex in general. In particular, backward reasoning is difficult in the context of programs with data structures, and strategies for identifying statically linearization points cannot be defined for all existing implementations. In this paper, we show that, contrary to common belief, many such complex implementations, including, e.g., the Herlihy and Wing Queue and the Time-Stamped Stack, can be proved correct using only forward simulation arguments. This leads to simple and natural correctness proofs for these implementations that are amenable to automation.

Notes

Acknowledgements

This work is supported in part by the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation program (grant agreement No. 678177).

References

  1. 1.
    Abadi, M., Lamport, L.: The existence of refinement mappings. Theoret. Comput. Sci. 82(2), 253–284 (1991)MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Abdulla, P.A., Haziza, F., Holík, L., Jonsson, B., Rezine, A.: An integrated specification and verification technique for highly concurrent data structures. In: Piterman, N., Smolka, S.A. (eds.) TACAS 2013. LNCS, vol. 7795, pp. 324–338. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-36742-7_23 CrossRefGoogle Scholar
  3. 3.
    Alur, R., McMillan, K.L., Peled, D.: Model-checking of correctness conditions for concurrent objects. Inf. Comput. 160(1–2), 167–188 (2000)MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    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). doi: 10.1007/978-3-540-73368-3_49 CrossRefGoogle Scholar
  5. 5.
    Bouajjani, A., Emmi, M., Enea, C., Hamza, J.: Verifying concurrent programs against sequential specifications. In: Felleisen, M., Gardner, P. (eds.) ESOP 2013. LNCS, vol. 7792, pp. 290–309. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-37036-6_17 CrossRefGoogle Scholar
  6. 6.
    Bouajjani, A., Emmi, M., Enea, C., Hamza, J.: On reducing linearizability to state reachability. In: Halldórsson, M.M., Iwama, K., Kobayashi, N., Speckmann, B. (eds.) ICALP 2015. LNCS, vol. 9135, pp. 95–107. Springer, Heidelberg (2015). doi: 10.1007/978-3-662-47666-6_8 CrossRefGoogle Scholar
  7. 7.
    Bouajjani, A., Emmi, M., Enea, C., Hamza, J.: Tractable refinement checking for concurrent objects. In: Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2015, Mumbai, India, 15–17 January 2015, pp. 651–662 (2015)Google Scholar
  8. 8.
    Bouajjani, A., Emmi, M., Enea, C., Mutluergil, S.O.: Proving linearizability using forward simulations. CoRR, abs/1702.02705 (2017). http://arxiv.org/abs/1702.02705
  9. 9.
    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). doi: 10.1007/978-3-642-21437-0_25. ISBN 978-3-642-21437-0CrossRefGoogle Scholar
  10. 10.
    Dodds, M., Haas, A., Kirsch, C.M.: A scalable, correct time-stamped stack. In: Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2015, Mumbai, India, 15–17 January 2015, pp. 233–246 (2015)Google Scholar
  11. 11.
    Drăgoi, C., Gupta, A., Henzinger, T.A.: Automatic linearizability proofs of concurrent objects with cooperating updates. In: Sharygina, N., Veith, H. (eds.) CAV 2013. LNCS, vol. 8044, pp. 174–190. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-39799-8_11 CrossRefGoogle Scholar
  12. 12.
    Filipovic, I., O’Hearn, P.W., Rinetzky, N., Yang, H.: Abstraction for concurrent objects. Theoret. Comput. Sci. 411(51–52), 4379–4398 (2010)MathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    Gorelik, M., Hendler, D.: Brief announcement: an asymmetric flat-combining based queue algorithm. In: ACM Symposium on Principles of Distributed Computing, PODC 2013, Montreal, QC, Canada, 22–24 July 2013, pp. 319–321 (2013)Google Scholar
  14. 14.
    Hamza, J.: On the complexity of linearizability. In: Bouajjani, A., Fauconnier, H. (eds.) NETYS 2015. LNCS, vol. 9466, pp. 308–321. Springer, Cham (2015). doi: 10.1007/978-3-319-26850-7_21 CrossRefGoogle Scholar
  15. 15.
    Hendler, D., Shavit, N., Yerushalmi, L.: A scalable lock-free stack algorithm. In: SPAA 2004, pp. 206–215. ACM (2004)Google Scholar
  16. 16.
    Hendler, D., Incze, I., Shavit, N., Tzafrir, M.: Flat combining and the synchronization-parallelism tradeoff. In: SPAA 2010: Proceedings of the 22nd Annual ACM Symposium on Parallelism in Algorithms and Architectures, Thira, Santorini, Greece, 13–15 June 2010, pp. 355–364 (2010)Google Scholar
  17. 17.
    Henzinger, T.A., Sezgin, A., Vafeiadis, V.: Aspect-oriented linearizability proofs. In: CONCUR, pp. 242–256 (2013)Google Scholar
  18. 18.
    Herlihy, M., Wing, J.M.: Linearizability: a correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst. 12(3), 463–492 (1990)CrossRefGoogle Scholar
  19. 19.
    Hoffman, M., Shalev, O., Shavit, N.: The baskets queue. In: Tovar, E., Tsigas, P., Fouchal, H. (eds.) OPODIS 2007. LNCS, vol. 4878, pp. 401–414. Springer, Heidelberg (2007). doi: 10.1007/978-3-540-77096-1_29. ISBN 978-3-540-77095-4CrossRefGoogle Scholar
  20. 20.
    Liang, H., Feng, X.: Modular verification of linearizability with non-fixed linearization points. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2013, Seattle, WA, USA, 16–19 June 2013, pp. 459–470 (2013)Google Scholar
  21. 21.
    Lynch, N.A., Vaandrager, F.W.: Forward and backward simulations: I. untimed systems. Inf. Comput. 121(2), 214–233 (1995)MathSciNetCrossRefzbMATHGoogle Scholar
  22. 22.
    Morrison, A., Afek, Y.: Fast concurrent queues for x86 processors. In: ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP 2013, Shenzhen, China, 23–27 February 2013, pp. 103–112 (2013)Google Scholar
  23. 23.
    O’Hearn, P.W., Rinetzky, N., Vechev, M.T., Yahav, E., Yorsh, G.: Verifying linearizability with hindsight. In: PODC 2010, pp. 85–94. ACM (2010)Google Scholar
  24. 24.
    Schellhorn, G., Wehrheim, H., Derrick, J.: How to prove algorithms linearisable. In: Madhusudan, P., Seshia, S.A. (eds.) CAV 2012. LNCS, vol. 7358, pp. 243–259. Springer, Heidelberg (2012). doi: 10.1007/978-3-642-31424-7_21 CrossRefGoogle Scholar
  25. 25.
    Vafeiadis, V.: Automatically proving linearizability. In: Touili, T., Cook, B., Jackson, P. (eds.) CAV 2010. LNCS, vol. 6174, pp. 450–464. Springer, Heidelberg (2010). doi: 10.1007/978-3-642-14295-6_40 CrossRefGoogle Scholar
  26. 26.
    Vafeiadis, V.: Modular fine-grained concurrency verification. Ph.D. thesis, University of Cambridge (2008)Google Scholar
  27. 27.
    Vafeiadis, V.: Shape-value abstraction for verifying linearizability. In: Jones, N.D., Müller-Olm, M. (eds.) VMCAI 2009. LNCS, vol. 5403, pp. 335–348. Springer, Heidelberg (2008). doi: 10.1007/978-3-540-93900-9_27 CrossRefGoogle Scholar
  28. 28.
    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
  29. 29.
    Zhu, H., Petri, G., Jagannathan, S.: Poling: SMT aided linearizability proofs. In: Kroening, D., Păsăreanu, C.S. (eds.) CAV 2015. LNCS, vol. 9207, pp. 3–19. Springer, Cham (2015). doi: 10.1007/978-3-319-21668-3_1 CrossRefGoogle Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Ahmed Bouajjani
    • 1
  • Michael Emmi
    • 2
  • Constantin Enea
    • 1
    Email author
  • Suha Orhun Mutluergil
    • 3
  1. 1.IRIFUniv. Paris DiderotParisFrance
  2. 2.Nokia Bell LabsMurray HillUSA
  3. 3.Koc UniversitySarıyerTurkey

Personalised recommendations