Reasoning About Threads Communicating via Locks
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 . 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 . As a case study, we consider the Daisy file system  which is a benchmark for analyzing the efficacy of different methodologies for debugging concurrent programs and provide results for the detection of several bugs.
Unable to display preview. Download preview PDF.
- 1.Joint CAV/ISSTA Special Event on Specification, Verification, and Testing of Concurrent Software, http://research.microsoft.com/~qadeer/cav-issta.htm
- 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.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.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.Godefroid, P.: Model Checking for Programming Languages using Verisoft. In: POPL, pp. 174–186 (1997)Google Scholar
- 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
- 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.Qadeer, S., Rajamani, S.K., Rehof, J.: Summarizing procedures in concurrent programs. In: POPL, pp. 245–255 (2004)Google Scholar
- 12.Reps, T.W., Horwitz, S., Sagiv, S.: Precise Interprocedural Dataflow Analysis via Graph Reachability. In: POPL, pp. 49–61 (1985)Google Scholar
- 14.Stoller, S.D.: Model-Checking Multi-Threaded Distributed Java Programs. In: STTT, vol. 4(1), pp. 71–91 (2002)Google Scholar