Checking Just Pairs of Threads for Efficient and Scalable Incremental Verification of Multithreaded Programs
Many techniques of automated verification target multithreaded programs, because subtle interactions between threads may trigger concurrency errors such as deadlocks and data races. However, techniques and tools involving systematic exploration of the whole space of possible thread interleavings do not scale to large software systems, despite various clever algorithmic optimizations. A viable approach is to use incremental verification techniques that, in each run, focus just on the recently modified code and the relatively small number of affected execution traces, and therefore can provide results (bug reports) very quickly. In this paper we present a new algorithm for incremental verification of multithreaded programs based on the pairwise approach, whose key idea is systematic exploration of all possible thread interleavings just for specific relevant pairs of threads. We implemented the algorithm with Java Pathfinder as the backend verification tool, and evaluated it on several multithreaded Java programs. Results show that our incremental algorithm (1) can find errors very fast, (2) greatly reduces time needed for complete safety verification, and (3) it can find the same errors as full verification of the whole state space.
Java Pathfinder (JPF) is currently the most feature-rich platform for an in-depth analysis of programs that run on the Java Virtual Machine (JVM). However, using JPF and interpreting its results is a challenge. Dependencies on specific Java versions inhibit the adoption of JPF, and its textual output makes it hard to understand its analysis results. To this end, we present the Theia Trace Viewer (TTV) for JPF traces, which features a web-based graphical user interface. It does not only make it easier to get an overview of JPF traces, but it can visualize traces without requiring an installation on the client side, thus making JPF more accessible at the technical level as well. We evaluated TTV with several groups of users, showing the potential of our approach.