Online efficient predictive safety analysis of multithreaded programs

We present an automated and configurable technique for runtime safety analysis of multithreaded programs that is able to predict safety violations from successful executions. Based on a formal specification of safety properties provided by a user, our technique enables us to automatically instrument a given program and create an observer so that the program emits relevant state update events to the observer and the observer checks these updates against the safety specification. The events are stamped with dynamic vector clocks, enabling the observer to infer a causal partial order on the state updates. All event traces that are consistent with this partial order, including the actual execution trace, are then analyzed online and in parallel. A warning is issued whenever one of these potential traces violates the specification. Our technique is scalable and can provide better coverage than conventional testing, but its coverage need not be exhaustive. In fact, one can trade off scalability and comprehensiveness: a window in the state space may be specified allowing the observer to infer some of the more likely runs; if the size of the window is 1, then only the actual execution trace is analyzed, as is the case in conventional testing; if the size of the window is ∞, then all the execution traces consistent with the actual execution trace are analyzed.

[1]  Doron Drusinsky,et al.  The Temporal Rover and the ATG Rover , 2000, SPIN.

[2]  O. Shtrichman,et al.  The 'Logic Assurance (LA)' system-a tool for testing and controlling real-time systems , 1997, Proceedings of the Eighth Israeli Conference on Computer Systems and Software Engineering.

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

[4]  Mikko H. Lipasti,et al.  Verifying sequential consistency using vector clocks , 2002, SPAA '02.

[5]  Mahesh Viswanathan,et al.  Java-MaC: a Run-time Assurance Tool for Java Programs , 2001, RV@CAV.

[6]  R. Stephenson A and V , 1962, The British journal of ophthalmology.

[7]  Grigore Rosu,et al.  Synthesizing Monitors for Safety Properties , 2002, TACAS.

[8]  Friedemann Mattern,et al.  Virtual Time and Global States of Distributed Systems , 2002 .

[9]  Ozalp Babaoglu,et al.  Consistent global states of distributed systems: fundamental concepts and mechanisms , 1993 .

[10]  Albert R. Meyer,et al.  Word problems requiring exponential time(Preliminary Report) , 1973, STOC.

[11]  Gul Agha,et al.  Online Efficient Predictive Safety Analysis of Multithreaded Programs , 2004, TACAS.

[12]  Jong-Deok Choi,et al.  Escape analysis for Java , 1999, OOPSLA '99.

[13]  Markus Dahm Byte Code Engineering with the BCEL API , 2007 .

[14]  Vijay K. Garg,et al.  Partial Order Trace Analyzer (POTA) for Distributed Programs , 2003, RV@CAV.

[15]  Doron A. Peled,et al.  PET: An Interactive Software Testing Tool , 2000, CAV.

[16]  David Lee,et al.  Principles and methods of testing finite state machines-a survey , 1996, Proc. IEEE.

[17]  Koushik Sen,et al.  Rule-Based Runtime Verification , 2004, VMCAI.

[18]  Jeremy Dick,et al.  Automating the Generation and Sequencing of Test Cases from Model-Based Specifications , 1993, FME.

[19]  Doron Drusinsky Monitoring Temporal Rules Combined with Time Series , 2003, CAV.

[20]  Colin J. Fidge,et al.  Partial orders for parallel debugging , 1988, PADD '88.

[21]  Keith Marzullo,et al.  Detection of Global State Predicates , 1991, WDAG.

[22]  Grigore Rosu,et al.  Monitoring Java Programs with Java PathExplorer , 2001, RV@CAV.

[23]  Jonathan P. Bowen,et al.  Formalization of software testing criteria using the Z notation , 2001, 25th Annual International Computer Software and Applications Conference. COMPSAC 2001.

[24]  Koushik Sen,et al.  Generating Optimal Monitors for Extended Regular Expressions , 2003, RV@CAV.

[25]  Koushik Sen,et al.  Generating Optimal Linear Temporal Logic Monitors by Coinduction , 2003, ASIAN.

[26]  Alexander Ran,et al.  Third Eye - specification-based analysis of software execution traces , 2000, Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium.