Abstract
The problem of interest is to verify data consistency of a concurrent Java program. In particular, we present a new decision procedure for verifying that a class of data races caused by inconsistent accesses on multiple fields of an object cannot occur (so-called atomic-set serializability). Atomic-set serializability generalizes the ordinary notion of a data race (i.e., inconsistent coordination of accesses on a single memory location) to a broader class of races that involve accesses on multiple memory locations. Previous work by some of the authors presented a technique to abstract a concurrent Java program into an EML program, a modeling language based on pushdown systems and a finite set of reentrant locks. Our previous work used only a semi-decision procedure, and hence provides a definite answer only some of the time. In this paper, we rectify this shortcoming by developing a decision procedure for verifying data consistency, i.e., atomic-set serializability, of an EML program. When coupled with the previous work, it provides a decision procedure for verifying data consistency of a concurrent Java program. We implemented the decision procedure, and applied it to detect both single-location and multi-location data races in models of concurrent Java programs. Compared with the prior method based on a semi-decision procedure, not only was the decision procedure 34 times faster overall, but the semi-decision procedure timed out on about 50% of the queries, whereas the decision procedure timed out on none of the queries.
Similar content being viewed by others
References
Bouajjani, A., Esparza, J., Maler, O.: Reachability analysis of pushdown automata: Application to model checking. In: CONCUR (1997)
Bouajjani, A., Esparza, J., Touili, T.: A generic approach to the static analysis of concurrent programs with procedures. In: POPL (2003)
Bouajjani, A., Müller-Olm, M., Touili, T.: Regular symbolic analysis of dynamic networks of pushdown systems. In: CONCUR (2005)
BuDDy: A BDD package. http://buddy.wiki.sourceforge.net/ (2004)
Chaki, S., Clarke, E., Kidd, N., Reps, T., Touili, T.: Verifying concurrent message-passing C programs with recursive calls. In: TACAS (2006)
Eytani Y., Havelund K., Stoller S.D., Ur S.: Towards a framework and a benchmark for testing tools for multi-threaded programs. Conc. Comp. Prac. Exp. 19(3), 267–279 (2007)
Finkel A., Willems B., Wolper P.: A direct symbolic approach to model checking pushdown systems. Electron. Notes Theor. Comput. Sci 9, 27–37 (1997)
Flanagan, C., Qadeer, S.: A type and effect system for atomicity. In: PLDI (2003)
Harrison M.: Introduction to Formal Language Theory. Addison-Wesley, Reading (1978)
Kahlon, V., Gupta, A.: On the analysis of interacting pushdown systems. In: POPL (2007)
Kahlon, V., Gupta, A.: Personal communication (2009)
Kahlon, V., Ivancic, F., Gupta, A.: Reasoning about threads communicating via locks. In: CAV (2005)
Kidd, N., Lal, A., Reps, T.: Language strength reduction. In: SAS (2008)
Kidd, N., Lal, A., Reps, T.: WALi: The Weighted Automaton Library. http://www.cs.wisc.edu/wpis/wpds/download.php (2009)
Kidd, N., Reps, T., Dolby, J., Vaziri, M.: Finding concurrency-related bugs using random isolation. In: VMCAI (2009)
Kidd, N.A., Lammich, P., Touili, T., Reps, T.: A decision procedure for detecting atomicity violations for communicating processes with locks. In: SPIN (2009)
Lal, A., Touili, T., Kidd, N., Reps, T.: Interprocedural analysis of concurrent programs under a context bound. In: TACAS (2008)
Lammich, P., Müller-Olm, M., Wenner, A.: Predecessor sets of dynamic pushdown networks with tree-regular constraints. In: CAV (2009)
Lu, S., Park, S., Seo, E., Zhou, Y.: Learning from mistakes—a comprehensive study on real world concurrency bug characteristics. In: ASPLOS (2008)
Qadeer, S., Rehof, J.: Context-bounded model checking of concurrent software. In: TACAS (2005)
Ramalingam G.: Context-sensitive synchronization-sensitive analysis is undecidable. ACM Trans. Programming. Lang. Syst. 22, 416–430 (2000)
Reps T.: Program analysis via graph reachability. Inf. Softw. Technol. 40, 5–19 (1998)
Reps T., Schwoon S., Jha S., Melski D.: Weighted pushdown systems and their application to interprocedural dataflow analysis. SCP 58, 206–263 (2005)
Schwoon, S.: Model-checking pushdown systems. PhD thesis, TUM (2002)
Vaziri, M., Tip, F., Dolby, J.: Associating synchronization constraints with data in an object-oriented language. In: POPL (2006)
Author information
Authors and Affiliations
Corresponding author
Additional information
Supported by NSF under grants CCF-0540955, CCF-0524051, and CCF-0810053, by AFRL under contract FA8750-06-C-0249, and by ONR under grant N00014-09-1-0510.
This work was performed while N. Kidd was at the University of Wisconsin.
Rights and permissions
About this article
Cite this article
Kidd, N., Lammich, P., Touili, T. et al. A decision procedure for detecting atomicity violations for communicating processes with locks. Int J Softw Tools Technol Transfer 13, 37–60 (2011). https://doi.org/10.1007/s10009-010-0159-5
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10009-010-0159-5