Reasoning About Threads Communicating via Locks

  • Vineet Kahlon
  • Franjo Ivančić
  • Aarti Gupta
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3576)

Abstract

We propose a new technique for the static analysis of concurrent programs comprised of multiple threads. In general, the problem is known to be undecidable even for programs with only two threads but where the threads communicate using CCS-style pairwise rendezvous [11]. However, in practice, a large fraction of concurrent programs can either be directly modeled as threads communicating solely using locks or can be reduced to such systems either by applying standard abstract interpretation techniques or by exploiting separation of control from data. For such a framework, we show that for the commonly occurring case of threads with nested access to locks, the problem is efficiently decidable. Our technique involves reducing the analysis of a concurrent program with multiple threads to individually analyzing augmented versions of the given threads. This not only yields decidability but also avoids construction of the state space of the concurrent program at hand and thus bypasses the state explosion problem making our technique scalable. We go on to show that for programs with threads that have non-nested access to locks, the static analysis problem for programs with even two threads becomes undecidable even for reachability, thus sharpening the result of [11]. As a case study, we consider the Daisy file system [1] which is a benchmark for analyzing the efficacy of different methodologies for debugging concurrent programs and provide results for the detection of several bugs.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Joint CAV/ISSTA Special Event on Specification, Verification, and Testing of Concurrent Software, http://research.microsoft.com/~qadeer/cav-issta.htm
  2. 2.
    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)Google Scholar
  3. 3.
    Bouajjani, A., Esparza, J., Touili, T.: A generic approach to the static analysis of concurrent programs with procedures. In: IJFCS, vol. 14(4), p. 551 (2003)Google Scholar
  4. 4.
    Dwyer, M.B., Clarke, L.A.: Data flow analysis for verifying properties of concurrent programs. In: ACM SIGSOFT, pp. 62–75 (1994)Google Scholar
  5. 5.
    Godefroid, P.: Model Checking for Programming Languages using Verisoft. In: POPL, pp. 174–186 (1997)Google Scholar
  6. 6.
    Godefroid, P., Wolper, P.: Using Partial Orders for Efficient Verification of deadlock-freedom and safety properties. In: Formal Methods in Systems Design, pp. 149–164 (1993)Google Scholar
  7. 7.
    Henzinger, T., Jhala, R., Mazumdar, R., Qadeer, S.: Thread-Modular Abstraction Refinement. In: Hunt Jr., W.A., Somenzi, F. (eds.) CAV 2003. LNCS, vol. 2725, pp. 262–274. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  8. 8.
    Ivančić, F., Yang, Z., Ganai, M., Gupta, A., Ashar, P.: Efficient SAT-based Bounded Model Checking for Software Verification. In: Symposium on Leveraging Applications of Formal Methods (2004)Google Scholar
  9. 9.
    Qadeer, S., Rajamani, S.K., Rehof, J.: Summarizing procedures in concurrent programs. In: POPL, pp. 245–255 (2004)Google Scholar
  10. 10.
    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
  11. 11.
    Ramalingam, G.: Context-sensitive synchronization-sensitive analysis is undecidable. ACM Trans. Program. Lang. Syst. 22(2), 416–430 (2000)CrossRefGoogle Scholar
  12. 12.
    Reps, T.W., Horwitz, S., Sagiv, S.: Precise Interprocedural Dataflow Analysis via Graph Reachability. In: POPL, pp. 49–61 (1985)Google Scholar
  13. 13.
    Schmidt, D.A., Steffen, B.: Program Analysis as Model Checking of Abstract Interpretations. In: Levi, G. (ed.) SAS 1998. LNCS, vol. 1503, pp. 351–380. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  14. 14.
    Stoller, S.D.: Model-Checking Multi-Threaded Distributed Java Programs. In: STTT, vol. 4(1), pp. 71–91 (2002)Google Scholar
  15. 15.
    Visser, W., Havelund, K., Brat, G.P., Park, S., Lerda, F.: Model Checking Programs. Automated Software Engineering 10(2), 203–232 (2003)CrossRefGoogle Scholar
  16. 16.
    Walukeiwicz, I.: Model Checking CTL Properties of Pushdown Systems. In: Kapoor, S., Prasad, S. (eds.) FST TCS 2000. LNCS, vol. 1974, pp. 127–138. Springer, Heidelberg (2000)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Vineet Kahlon
    • 1
  • Franjo Ivančić
    • 1
  • Aarti Gupta
    • 1
  1. 1.NEC Labs AmericaPrincetonUSA

Personalised recommendations