Abstract
We consider how we can use the process algebra CSP and the model checker FDR in order to obtain assurance about the correctness of concurrent datatypes. In particular, we perform a formal analysis of a concurrent queue based on a linked list of nodes. We model the queue in CSP and analyse it using FDR. We capture two important properties using CSP, namely linearizability and lock-freedom.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
- 2.
The Scala code ignores the possibility of new nodes not being available, but we will need to consider this possibility in our CSP models.
- 3.
The CSP script is available from http://www.cs.ox.ac.uk/people/gavin.lowe/LockFreeQueue/LockFreeQueueLin.csp.
References
Alur, R., McMillan, K., Peled, D.: Model-checking of correctness conditions for concurrent objects. In: Proceedings of the 11th Annual IEEE Symposium on Logic in Computer Science, LICS 1996 (1996)
Burckhardt, S., Dern, C., Musuvathi, M., Tan, R.: Line-Up: a complete and automatic linearizability checker. In: Proceedings of the 2010 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2010), pp. 330–340 (2010)
Č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). doi:10.1007/978-3-642-14295-6_41
Chen, K.: Analysing concurrent datatypes in CSP. Master’s thesis. University of Oxford (2015)
Colvin, R., Dohery, S., Groves, L.: Verifying concurrent data structures by simulation. Electron. Notes Theor. Comput. Sci. 137, 93–110 (2005)
Derrick, J., Schellhorn, G., Wehrheim, H.: Mechanically verified proof obligations for linearizability. ACM Trans. Programm. Lang. Syst. 33(1), 4:1–4:43 (2011)
Gibson-Robinson, T., Armstrong, P., Boulgakov, A., Roscoe, A.W.: Failures Divergences Refinement (FDR) Version 3 (2013)
Gibson-Robinson, T., Lowe, G.: Symmetry reduction in CSP model checking. Submitted for publication (2016)
Herlihy, M., Shavit, N.: The Art of Multiprocessor Programming, 1st edn. Morgan Kaufmann, San Francisco (2012)
Herlihy, M., Wing, J.: Linearizability: a correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst. 12(3), 463–492 (1990)
Janssen, R.: Verification of concurrent datatypes using CSP. Master’s thesis. University of Oxford (2015)
Liu, Y., Chen, W., Liu, Y.A., Sun, J., Zhang, S.J., Dong, J.S.: Verifying linearizability via optimized refinement checking. IEEE Trans. Softw. Eng. 39(7), 1018–1039 (2013)
Lowe, G.: Implementing generalised alt – a case study in validated design using CSP. In: Communicating Process Architectures, pp. 1–34 (2011)
Mazur, T., Lowe, G.: Counter abstraction in the CSP/FDR setting. In: Proceedings of the Seventh International Workshop on Automated Verification of Critical Systems (AVoCS 2007). Electronic Notes on Theoretical Computer Science, vol. 250, pp. 171–186 (2007)
Mazur, T., Lowe, G.: CSP-based counter abstraction for systems with node identifiers. Sci. Comput. Program. 81, 3–52 (2014)
Michael, M., Scott, M.: Simple, fast, and practical non-blocking and blocking concurrent queue algorithms. In: Proceedings of the Fifteenth Annual ACM Symposium on Principles of Distributed Computing, pp. 267–275 (1996)
Michael, M.M.: Safe memory reclamation for dynamic lock-free objects using atomic reads and writes. In: Proceedings of Principles of Distributed Computing (PODC 2002) (2002)
Pnueli, A., Jessie, X., Zuck, L.D.: Liveness with (0, 1, \(\infty \))-counter abstraction. In: Proceedings of the 14th International Conference on Computer Aided Verification (CAV 2002), pp. 107–122 (2002)
Roscoe, A.W.: The Theory and Practice of Concurrency. Prentice Hall, Upper Saddle River (1998)
Roscoe, A.W.: Understanding Concurrent Systems. Springer, London (2010)
Roscoe, A.W., Broadfoot, P.J.: Proving security protocols with model checkers by data independence techniques. J. Comput. Secur. 7(2,3), 147–190 (1999)
Roscoe, A.W., Gibson-Robinson, T.: The relationship between CSP. FDR and Büchi automata, Draft paper (2016)
Roscoe, A.W., Hopkins, D.: SVA, a tool for analysing shared-variable programs. In: Proceedings of AVoCS 2007, pp. 177–183 (2007)
Shalev, O., Shavit, N.: Split-ordered lists: lock-free extensible hash tables. J. ACM 53(3), 379–405 (2006)
Sundell, H., Tsigas, P.: Lock-free deques and doubly linked lists. J. Parallel Distrib. Comput. 68(7), 1008–1020 (2008)
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
Vechev, M., Yahav, E., Yorsh, G.: Experience with model checking linearizability. In: Păsăreanu, C.S. (ed.) SPIN 2009. LNCS, vol. 5578, pp. 261–278. Springer, Heidelberg (2009). doi:10.1007/978-3-642-02652-2_21
Welch, P., Martin, J.: A CSP model for Java multithreading. In: Proceedings of the International Symposium on Software Engineering for Parallel and Distributed Systems, pp. 114–122. IEEE (2000)
Acknowledgements
This work has benefited from my working with Bill Roscoe for over 25 years. It would have been impossible without his contributions to CSP and FDR. Many of the techniques used in this paper are based on his ideas.
I would like to thank Tom Gibson-Robinson for useful discussions on this work, in particular concerning our joint work on adding symmetry reduction to FDR, and for producing the CSP model that allowed comparison with the work of [12]. I would also like to thank Ke Chen and Ruben Janssen for more general discussions concerning CSP model checking of concurrent datatypes.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this chapter
Cite this chapter
Lowe, G. (2017). Analysing Lock-Free Linearizable Datatypes Using CSP. In: Gibson-Robinson, T., Hopcroft, P., Lazić, R. (eds) Concurrency, Security, and Puzzles. Lecture Notes in Computer Science(), vol 10160. Springer, Cham. https://doi.org/10.1007/978-3-319-51046-0_9
Download citation
DOI: https://doi.org/10.1007/978-3-319-51046-0_9
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-51045-3
Online ISBN: 978-3-319-51046-0
eBook Packages: Computer ScienceComputer Science (R0)