Predictive Runtime Analysis of Multithreaded Programs

We present a technique to predict property violations in multi-threaded programs from successful executions. An appealing aspect of our technique is that it is entirely automatic; another is that no special simulation or modeling infrastructure is needed. All the user needs to do is to provide the multi-threaded system and the property to check. An observer is automatically generated from the property and an instrumentation procedure based on vector clocks automatically modifies the program to emit relevant events to the observer. By making intensive use of a dynamically computed generalized “happens-before” causal partial order that is refined with control-flow and data-flow dependency information obtained apriory via static analysis of the program, the observer is able to build from one concrete execution trace a set of abstract execution traces. Those abstract execution traces correspond to concrete executions that have not necessarily happened but “were close to happen” and could indeed happen in another execution of the system under a different thread scheduling. The predictive aspect of our technique comes from the fact that some of those executions may violate the property. If that is the case, a counter-example is provided. The technique has been implemented in the context of Java and has been shown to be useful via a series of experiments.

[1]  Frank Tip,et al.  A survey of program slicing techniques , 1994, J. Program. Lang..

[2]  Jong-Deok Choi,et al.  Hybrid dynamic data race detection , 2003, PPoPP '03.

[3]  Jong-Deok Choi,et al.  Techniques for debugging parallel programs with flowback analysis , 1991, TOPL.

[4]  Marcelo d'Amorim,et al.  A Formal Monitoring-Based Framework for Software Development and Analysis , 2004, ICFEM.

[5]  Gary T. Leavens,et al.  JML: notations and tools supporting detailed design in Java , 2000 .

[6]  Grigore Rosu,et al.  Rewriting-Based Techniques for Runtime Verification , 2005, Automated Software Engineering.

[7]  Joe D. Warren,et al.  The program dependence graph and its use in optimization , 1984, TOPL.

[8]  Stephen N. Freund,et al.  Atomizer: a dynamic atomicity checker for multithreaded programs , 2004, 18th International Parallel and Distributed Processing Symposium, 2004. Proceedings..

[9]  Koushik Sen,et al.  Detecting Errors in Multithreaded Programs by Generalized Predictive Analysis of Executions , 2005, FMOODS.

[10]  Leslie Lamport,et al.  Time, clocks, and the ordering of events in a distributed system , 1978, CACM.

[11]  Koushik Sen,et al.  Runtime safety analysis of multithreaded programs , 2003, ESEC/FSE-11.

[12]  Michael Burrows,et al.  Eraser: a dynamic data race detector for multithreaded programs , 1997, TOCS.

[13]  Eitan Farchi,et al.  Concurrent bug patterns and how to test them , 2003, Proceedings International Parallel and Distributed Processing Symposium.

[14]  Marcelo d'Amorim,et al.  Checking and Correcting Behaviors of Java Programs at Runtime with Java-MOP , 2006, RV@CAV.

[15]  Koushik Sen,et al.  Online efficient predictive safety analysis of multithreaded programs , 2005, International Journal on Software Tools for Technology Transfer.