Context-Bounded Analysis For Concurrent Programs With Dynamic Creation of Threads

Mohamed Faouzi Atig,Ahmed Bouajjani,Shaz Qadeer
DOI: https://doi.org/10.2168/LMCS-7%284%3A4%292011
2011-11-22
Abstract:Context-bounded analysis has been shown to be both efficient and effective at finding bugs in concurrent programs. According to its original definition, context-bounded analysis explores all behaviors of a concurrent program up to some fixed number of context switches between threads. This definition is inadequate for programs that create threads dynamically because bounding the number of context switches in a computation also bounds the number of threads involved in the computation. In this paper, we propose a more general definition of context-bounded analysis useful for programs with dynamic thread creation. The idea is to bound the number of context switches for each thread instead of bounding the number of switches of all threads. We consider several variants based on this new definition, and we establish decidability and complexity results for the analysis induced by them.
Logic in Computer Science
What problem does this paper attempt to address?
The problem that this paper attempts to solve is whether the traditional context - bounded analysis method is still applicable in concurrent programs with dynamic thread creation. Specifically: 1. **Limitations of Traditional Context - Bounded Analysis**: - Traditional context - bounded analysis simplifies the verification of concurrent programs by limiting the number of context switches between threads. - However, this method is insufficient for programs with dynamic thread creation because limiting the total number of context switches also indirectly limits the number of threads participating in the computation. 2. **New Problems Proposed**: - The paper explores how to define and implement effective context - bounded analysis when a program allows dynamic thread creation. - Specifically, the author proposes a new context - bounded analysis method, that is, limiting the number of context switches for each thread instead of limiting the total number of switches for all threads. 3. **Objectives**: - Propose a more general definition of context - bounded analysis to make it applicable to concurrent programs with dynamic thread creation. - Establish decidability and complexity results under this new definition. ### Key Points of the New Definition - **K - Bounded Computation**: Each thread can be interrupted and resumed at most K times. - **Hierarchical Context - Bounded Analysis**: Threads are scheduled hierarchically according to the allowed number of context switches, gradually from 0 to K. ### Complexity Results - For finite - state threads, the K - bounded reachability problem is EXPSPACE - complete. - For pushdown systems, even in the case of dynamic thread creation, the K - bounded reachability problem is still decidable. Through these improvements, the paper aims to provide a more effective method to verify the behavior of concurrent programs with dynamic thread creation, thereby improving the coverage and efficiency of program verification.