A Decision Procedure for Detecting Atomicity Violations for Communicating Processes with Locks

  • Nicholas Kidd
  • Peter Lammich
  • Tayssir Touili
  • Thomas Reps
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5578)

Abstract

We present a new decision procedure for detecting property violations in pushdown models for concurrent programs that use lock-based synchronization, where each thread’s lock operations are properly nested (à la synchronized methods in Java). The technique detects violations expressed as indexed phase automata (PAs)—a class of non-deterministic finite automata in which the only loops are self-loops.

Our interest in PAs stems from their ability to capture atomic-set serializability violations. (Atomic-set serializability is a relaxation of atomicity to only a user-specified set of memory locations.) We implemented the decision procedure and applied it to detecting atomic-set-serializability violations in models of concurrent Java programs. Compared with a prior method based on a semi-decision procedure, not only was the decision procedure 7.5X faster overall, but the semi-decision procedure timed out on about 68% of the queries versus 4% for the decision procedure.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Qadeer, S., Rehof, J.: Context-bounded model checking of concurrent software. In: Halbwachs, N., Zuck, L.D. (eds.) TACAS 2005. LNCS, vol. 3440, pp. 93–107. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  2. 2.
    Lal, A., Touili, T., Kidd, N., Reps, T.: Interprocedural analysis of concurrent programs under a context bound. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 282–298. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  3. 3.
    Lal, A., Reps, T.: Reducing concurrent analysis under a context bound to sequential analysis. In: Gupta, A., Malik, S. (eds.) CAV 2008. LNCS, vol. 5123, pp. 37–51. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  4. 4.
    Bouajjani, A., Esparza, J., Touili, T.: A generic approach to the static analysis of concurrent programs with procedures. In: POPL (2003)Google Scholar
  5. 5.
    Chaki, S., Clarke, E., Kidd, N., Reps, T., Touili, T.: Verifying concurrent message-passing C programs with recursive calls. In: Hermanns, H., Palsberg, J. (eds.) TACAS 2006. LNCS, vol. 3920, pp. 334–349. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  6. 6.
    Kahlon, V., Ivancic, F., Gupta, A.: Reasoning about threads communicating via locks. In: Etessami, K., Rajamani, S.K. (eds.) CAV 2005. LNCS, vol. 3576, pp. 505–518. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  7. 7.
    Kahlon, V., Gupta, A.: On the analysis of interacting pushdown systems. In: POPL (2007)Google Scholar
  8. 8.
    Vaziri, M., Tip, F., Dolby, J.: Associating synchronization constraints with data in an object-oriented language. In: POPL (2006)Google Scholar
  9. 9.
    Flanagan, C., Qadeer, S.: A type and effect system for atomicity. In: PLDI (2003)Google Scholar
  10. 10.
    Kidd, N., Reps, T., Dolby, J., Vaziri, M.: Finding concurrency-related bugs using random isolation. In: Jones, N.D., Müller-Olm, M. (eds.) VMCAI 2009. LNCS, vol. 5403, pp. 198–213. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  11. 11.
    Bouajjani, A., Esparza, J., Maler, O.: Reachability analysis of pushdown automata: Application to model checking. In: Mazurkiewicz, A., Winkowski, J. (eds.) CONCUR 1997. LNCS, vol. 1243, pp. 135–150. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  12. 12.
    Finkel, A., Willems, B.: A direct symbolic approach to model checking pushdown systems. Elec. Notes in Theor. Comp. Sci., vol. 9 (1997)Google Scholar
  13. 13.
    Kidd, N., Lammich, P., Touili, T., Reps, T.: A decision procedure for detecting atomicity violations for communicating processes with locks. Technical Report 1649r, Univ. of Wisconsin (April 2009), http://www.cs.wisc.edu/wpis/abstracts/tr1649.abs.html
  14. 14.
    Kidd, N., Lal, A., Reps, T.: Language strength reduction. In: Alpuente, M., Vidal, G. (eds.) SAS 2008. LNCS, vol. 5079, pp. 283–298. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  15. 15.
    Kahlon, V., Gupta, A.: Personal communication (January 2009)Google Scholar
  16. 16.
    Schwoon, S.: Model-Checking Pushdown Systems. PhD thesis, TUM (2002)Google Scholar
  17. 17.
    Eytani, Y., Havelund, K., Stoller, S.D., Ur, S.: Towards a framework and a benchmark for testing tools for multi-threaded programs. Conc. and Comp. Prac. and Exp. 19(3) (2007)Google Scholar
  18. 18.
    Reps, T.: Program analysis via graph reachability. Inf. and Softw. Tech. 40 (1998)Google Scholar
  19. 19.
    Harrison, M.: Introduction to Formal Language Theory. Addison-Wesley, Reading (1978)MATHGoogle Scholar
  20. 20.
    Reps, T., Schwoon, S., Jha, S., Melski, D.: Weighted pushdown systems and their application to interprocedural dataflow analysis. SCP 58 (2005)Google Scholar
  21. 21.
    Kidd, N., Lal, A., Reps, T.: WALi: The Weighted Automaton Library (February 2009), http://www.cs.wisc.edu/wpis/wpds/download.php
  22. 22.
    BuDDy: A BDD package (July 2004), http://buddy.wiki.sourceforge.net/
  23. 23.
    Bouajjani, A., Müller-Olm, M., Touili, T.: Regular symbolic analysis of dynamic networks of pushdown systems. In: Abadi, M., de Alfaro, L. (eds.) CONCUR 2005. LNCS, vol. 3653, pp. 473–487. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  24. 24.
    Lammich, P., Müller-Olm, M., Wenner, A.: Predecessor sets of dynamic pushdown networks with tree-regular constraints. In: CAV (2009) (to appear)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Nicholas Kidd
    • 1
  • Peter Lammich
    • 2
  • Tayssir Touili
    • 3
  • Thomas Reps
    • 1
    • 4
  1. 1.University of WisconsinUSA
  2. 2.Westfälische Wilhelms-Universität MünsterGermany
  3. 3.LIAFA, CNRS & Université Paris DiderotFrance
  4. 4.GrammaTech, Inc.USA

Personalised recommendations