skip to main content
10.1007/978-3-642-37036-6_17guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Verifying concurrent programs against sequential specifications

Published: 16 March 2013 Publication History

Abstract

We investigate the algorithmic feasibility of checking whether concurrent implementations of shared-memory objects adhere to their given sequential specifications; sequential consistency, linearizability, and conflict serializability are the canonical variations of this problem. While verifying sequential consistency of systems with unbounded concurrency is known to be undecidable, we demonstrate that conflict serializability, and linearizability with fixed linearization points are EXPSPACE-complete, while the general linearizability problem is undecidable.
Our (un)decidability proofs, besides bestowing novel theoretical results, also reveal novel program explorations strategies. For instance, we show that every violation to conflict serializability is captured by a conflict cycle whose length is bounded independently from the number of concurrent operations. This suggests an incomplete detection algorithm which only remembers a small subset of conflict edges, which can be made complete by increasing the number of remembered edges to the cycle-length bound. Similarly, our undecidability proof for linearizability suggests an incomplete detection algorithm which limits the number of "barriers" bisecting non-overlapping operations. Our decidability proof of bounded-barrier linearizability is interesting on its own, as it reduces the consideration of all possible operation serializations to numerical constraint solving. The literature seems to confirm that most violations are detectable by considering very few conflict edges or barriers.

References

[1]
Alur, R., McMillan, K. L., Peled, D.: Model-checking of correctness conditions for concurrent objects. Inf. Comput. 160(1-2), 167-188 (2000)
[2]
Amit, D., Rinetzky, N., Reps, T., 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)
[3]
Berdine, J., Lev-Ami, T., Manevich, R., Ramalingam, G., Sagiv, M.: Thread Quantification for Concurrent Shape Analysis. In: Gupta, A., Malik, S. (eds.) CAV 2008. LNCS, vol. 5123, pp. 399-413. Springer, Heidelberg (2008)
[4]
Bingham, J.: Model Checking Sequential Consistency and Parameterized Protocols. PhD thesis, The University of British Columbia (August 2005)
[5]
Bingham, J. D., Condon, A., Hu, A. J., Qadeer, S., Zhang, Z.: Automatic Verification of Sequential Consistency for Unbounded Addresses and Data Values. In: Alur, R., Peled, D. A. (eds.) CAV 2004. LNCS, vol. 3114, pp. 427-439. Springer, Heidelberg (2004)
[6]
Bouajjani, A., Habermehl, P.: Constrained Properties, Semilinear Systems, and Petri Nets. In: Sassone, V., Montanari, U. (eds.) CONCUR 1996. LNCS, vol. 1119, pp. 481-497. Springer, Heidelberg (1996)
[7]
Bouajjani, A., Emmi, M., Enea, C., Hamza, J.: Verifying concurrent programs against sequential specifications. Technical report (January 2013)
[8]
Burckhardt, S., Alur, R., Martin, M. M. K.: CheckFence: checking consistency of concurrent data types on relaxed memory models. In: PLDI 2007: Proc. ACM SIGPLAN 2007 Conf. on Programming Language Design and Implementation, pp. 12-21. ACM (2007)
[9]
Burckhardt, S., Dern, C., Musuvathi, M., Tan, R.: Line-up: a complete and automatic linearizability checker. In: PLDI 2010: Proc. 2010 ACM SIGPLAN Conf. on Programming Language Design and Implementation, pp. 330-340. ACM (2010)
[10]
Burckhardt, S., Gotsman, A., Musuvathi, M., Yang, H.: Concurrent Library Correctness on the TSO Memory Model. In: Seidl, H. (ed.) ESOP 2012. LNCS, vol. 7211, pp. 87-107. Springer, Heidelberg (2012)
[11]
Burnim, J., Necula, G.C., Sen, K.: Specifying and checking semantic atomicity for multithreaded programs. In: ASPLOS 2011: Proc. 16th Intl. Conf. on Architectural Support for Programming Languages and Operating Systems, pp. 79-90. ACM (2011)
[12]
Cohen, A., O'Leary, J. W., Pnueli, A., Tuttle, M. R., Zuck, L. D.: Verifying correctness of transactional memories. In: FMCAD 2007: Proc. 7th Intl. Conf. on Formal Methods in Computer-Aided Design, pp. 37-44. IEEE Computer Society (2007)
[13]
Dragojević, A., Guerraoui, R., Kapalka, M.: Dividing transactional memories by zero. In: TRANSACT 2008: Proc. 3rd ACM SIGPLAN Workshop on Transactional Computing. ACM (2008)
[14]
Elmas, T., Qadeer, S., Sezgin, A., Subasi, O., Tasiran, S.: Simplifying Linearizability Proofs with Reduction and Abstraction. In: Esparza, J., Majumdar, R. (eds.) TACAS 2010. LNCS, vol. 6015, pp. 296-311. Springer, Heidelberg (2010)
[15]
Emmi, M., Majumdar, R., Manevich, R.: Parameterized verification of transactional memories. In: PLDI 2010: Proc. 2010 ACM SIGPLAN Conf. on Programming Language Design and Implementation, pp. 134-145. ACM (2010)
[16]
Emmi, M., Qadeer, S., Rakamaric, Z.: Delay-bounded scheduling. In: POPL 2011: Proc. 38th ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, pp. 411-422. ACM (2011)
[17]
Farzan, A., Madhusudan, P.: Monitoring Atomicity in Concurrent Programs. In: Gupta, A., Malik, S. (eds.) CAV 2008. LNCS, vol. 5123, pp. 52-65. Springer, Heidelberg (2008)
[18]
Gibbons, P. B., Korach, E.: Testing shared memories. SIAM J. Comput. 26(4), 1208-1244 (1997)
[19]
Guerraoui, R., Henzinger, T. A., Singh, V.: Model checking transactional memories. Distributed Computing 22(3), 129-145 (2010)
[20]
Henzinger, T. A., Qadeer, S., Rajamani, S. K.: Verifying Sequential Consistency on Shared-Memory Multiprocessor Systems. In: Halbwachs, N., Peled, D. A. (eds.) CAV 1999. LNCS, vol. 1633, pp. 301-315. Springer, Heidelberg (1999)
[21]
Herlihy, M., Wing, J. M.: Linearizability: A correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst. 12(3), 463-492 (1990)
[22]
Lal, A., Reps, T. W.: Reducing concurrent analysis under a context bound to sequential analysis. Formal Methods in System Design 35(1), 73-97 (2009)
[23]
Lal, A., Qadeer, S., Lahiri, S. K.: A Solver for Reachability Modulo Theories. In: Madhusudan, P., Seshia, S. A. (eds.) CAV 2012. LNCS, vol. 7358, pp. 427-443. Springer, Heidelberg (2012)
[24]
Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Computers 28(9), 690-691 (1979)
[25]
Liu, Y., Chen, W., Liu, Y. A., Sun, J.: Model Checking Linearizability via Refinement. In: Cavalcanti, A., Dams, D. R. (eds.) FM 2009. LNCS, vol. 5850, pp. 321-337. Springer, Heidelberg (2009)
[26]
Michael, M. M.: ABA prevention using single-word instructions. Technical Report RC 23089, IBM Thomas J. Watson Research Center (January 2004)
[27]
O'Hearn, P. W., Rinetzky, N., Vechev, M. T., Yahav, E., Yorsh, G.: Verifying linearizability with hindsight. In: PODC 2010: Proc. 29th Annual Symp. on Principles of Distributed Computing, pp. 85-94. ACM (2010)
[28]
Papadimitriou, C. H.: The serializability of concurrent database updates. J. ACM 26(4), 631-653 (1979)
[29]
Qadeer, S.: Verifying sequential consistency on shared-memory multiprocessors by model checking. IEEE Trans. Parallel Distrib. Syst. 14(8), 730-741 (2003)
[30]
Tąsiran, S.: A compositional method for verifying software transactional memory implementations. Technical Report MSR-TR-2008-56, Microsoft Research (April 2008)
[31]
Vafeiadis, V.: Automatically Proving Linearizability. In: Touili, T., Cook, B., Jackson, P. (eds.) CAV 2010. LNCS, vol. 6174, pp. 450-464. Springer, Heidelberg (2010)
[32]
Vechev, M. T., Yahav, E.: Deriving linearizable fine-grained concurrent objects. In: PLDI 2008: Proc. ACM SIGPLAN 2008 Conf. on Programming Language Design and Implementation, pp. 125-135. ACM (2008)
[33]
Wang, L., Stoller, S. D.: Static analysis of atomicity for programs with nonblocking synchronization. In: PPOPP 2005: Proc. ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming, pp. 61-71. ACM (2005)
[34]
Zhang, S. J.: Scalable automatic linearizability checking. In: ICSE 2011: Proc. 33rd Intl. Conf. on Software Engineering, pp. 1185-1187. ACM (2011)

Cited By

View all
  1. Verifying concurrent programs against sequential specifications

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image Guide Proceedings
    ESOP'13: Proceedings of the 22nd European conference on Programming Languages and Systems
    March 2013
    613 pages
    ISBN:9783642370359

    Sponsors

    • Sapienza: Sapienza University of Rome

    In-Cooperation

    • EAPLS: European Association for Programming Languages and Systems
    • EATCS: European Association for Theoretical Computer Science
    • European Association of Software Science and Technology

    Publisher

    Springer-Verlag

    Berlin, Heidelberg

    Publication History

    Published: 16 March 2013

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)0
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 06 Jan 2025

    Other Metrics

    Citations

    Cited By

    View all

    View Options

    View options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media