Abstract
Efficient implementations of concurrent objects such as semaphores, locks, and atomic collections are essential to modern computing. Yet programming such objects is error prone: in minimizing the synchronization overhead between concurrent object invocations, one risks the conformance to reference implementations --- or in formal terms, one risks violating observational refinement. Testing this refinement even within a single execution is intractable, limiting existing approaches to executions with very few object invocations.
We develop a polynomial-time (per execution) approximation to refinement checking. The approximation is parameterized by an accuracy k∈N representing the degree to which refinement violations are visible. In principle, more violations are detectable as k increases, and in the limit, all are detectable. Our insight for this approximation arises from foundational properties on the partial orders characterizing the happens-before relations between object invocations: they are interval orders, with a well defined measure of complexity, i.e., their length. Approximating the happens-before relation with a possibly-weaker interval order of bounded length can be efficiently implemented by maintaining a bounded number of integer counters. In practice, we find that refinement violations can be detected with very small values of k, and that our approach scales far beyond existing refinement-checking approaches.
Supplemental Material
- P. A. Abdulla, F. Haziza, L. Holík, B. Jonsson, and A. Rezine. An integrated specification and verification technique for highly concurrent data structures. In TACAS, pages 324--338, 2013. Google Scholar
Digital Library
- R. Alur, K. L. McMillan, and D. Peled. Model-checking of correctness conditions for concurrent objects. Inf. Comput., 16 (12):167--188, 2000. Google Scholar
Digital Library
- D. Amit, N. Rinetzky, T.W. Reps, M. Sagiv, and E. Yahav. Comparison under abstraction for verifying linearizability. In CAV '07, volume 4590 of LNCS, pages 477--490, 2007. Google Scholar
Digital Library
- A. Bouajjani, M. Emmi, C. Enea, and J. Hamza. Verifying concurrent programs against sequential specifications. In ESOP '13, volume 7792 of LNCS, pages 290--309. Springer, 2013. Google Scholar
Digital Library
- S. Burckhardt, C. Dern, M. Musuvathi, and R. Tan. Line-Up: a complete and automatic linearizability checker. In PLDI '10, pages 330--340. ACM. Google Scholar
Digital Library
- I. Filipovic, P. W. O'Hearn, N. Rinetzky, and H. Yang. Abstraction for concurrent objects. Theor. Comput. Sci., 411(51--52):4379--4398, 2010. Google Scholar
Digital Library
- B. Fischer, O. Inverso, and G. Parlato. CSeq: a concurrency preprocessor for sequential C verification tools. In ASE '13, pages 710--713. IEEE, 2013.Google Scholar
- P. B. Gibbons and E. Korach. Testing shared memories. SIAM J. Comput., 26(4):1208--1244, 1997. Google Scholar
Digital Library
- T. L. Greenough. Representation and Enumeration of Interval Orders and Semiorders. PhD thesis, Dartmouth College, 1976.Google Scholar
Cross Ref
- T. A. Henzinger, A. Sezgin, and V. Vafeiadis. Aspect-oriented linearizability proofs. In CONCUR, pages 242--256, 2013. Google Scholar
Digital Library
- M. Herlihy and J. M.Wing. Linearizability: A correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst., 12(3):463--492, 1990. Google Scholar
Digital Library
- C. M. Kirsch, M. Lippautz, and H. Payer. Fast and scalable, lock-free k-FIFO queues. In PaCT 13, volume 7979 of LNCS, pages 208--223, 2013.Google Scholar
Digital Library
- D. Kroening and M. Tautschnig. CBMC - C bounded model checker - (competition contribution). In TACAS '14, volume 8413 of LNCS, pages 389--391, 2014.Google Scholar
- A. Lal and T. W. Reps. Reducing concurrent analysis under a context bound to sequential analysis. Formal Methods in System Design, 35(1): 73--97, 2009. Google Scholar
Digital Library
- A. Lal, S. Qadeer, and S. K. Lahiri. A solver for reachability modulo theories. In CAV '12, volume 7358 of LNCS, pages 427--443. Google Scholar
Digital Library
- Y. Liu, W. Chen, Y. A. Liu, and J. Sun. Model checking linearizability via refinement. In FM '09, volume 5850 of LNCS, pages 321--337. Google Scholar
Digital Library
- M. M. Michael. ABA prevention using single-word instructions. Technical Report RC 23089, IBM T. J. Watson Res. Ctr., 2004.Google Scholar
- M. M. Michael and M. L. Scott. Simple, fast, and practical nonblocking and blocking concurrent queue algorithms. In PODC '96, pages 267--275. ACM, 1996. Google Scholar
Digital Library
- M. Moir and N. Shavit. Concurrent data structures. In D. Metha and S. Sahni, editors, Handbook of Data Structures and Applications, pages 47:14--30. Chapman and Hall/CRC Press, San Jose, CA, 2007.Google Scholar
- M. Musuvathi, S. Qadeer, T. Ball, G. Basler, P. A. Nainar, and I. Neamtiu. Finding and reproducing heisenbugs in concurrent programs. In OSDI '08, pages 267--280. USENIX Association, 2008. Google Scholar
Digital Library
- P. W. O'Hearn, N. Rinetzky, M. T. Vechev, E. Yahav, and G. Yorsh. Verifying linearizability with hindsight. In PODC '10, pages 85--94. ACM. Google Scholar
Digital Library
- R. Parikh. On context-free languages. J. ACM, 13(4):570--581, 1966. Google Scholar
Digital Library
- I. Rabinovitch. The dimension of semiorders. Journal of Combinatorial Theory, Series A, 25(1):50--61, 1978. ISSN 0097-3165.Google Scholar
Cross Ref
- Z. Rakamaric and M. Emmi. SMACK: Decoupling source language details from verifier implementations. In CAV '14, volume 8559 of LNCS, pages 106--113. Springer, 2014. Google Scholar
Digital Library
- O. Shacham, N. G. Bronson, A. Aiken, M. Sagiv, M. T. Vechev, and E. Yahav. Testing atomicity of composed concurrent operations. In OOPSLA '11, pages 51--64. ACM, 2011. Google Scholar
Digital Library
- R. Treiber. Systems programming: Coping with parallelism. Technical Report RJ5118, IBM Almaden Res. Ctr., 1986.Google Scholar
- V. Vafeiadis. Automatically proving linearizability. In CAV '10, volume 6174 of LNCS, pages 450--464. Google Scholar
Digital Library
- P. Wolper. Expressing interesting properties of programs in propositional temporal logic. In POPL '86, pages 184--193. ACM Press, 1986. Google Scholar
Digital Library
- S. J. Zhang. Scalable automatic linearizability checking. In ICSE '11, pages 1185--1187. ACM. Google Scholar
Digital Library
Index Terms
Tractable Refinement Checking for Concurrent Objects
Recommendations
Tractable Refinement Checking for Concurrent Objects
Efficient implementations of concurrent objects such as semaphores, locks, and atomic collections are essential to modern computing. Yet programming such objects is error prone: in minimizing the synchronization overhead between concurrent object ...







Comments