Data flow analysis for checking properties of concurrent Java programs

In this paper we show how the FLAVERS data flow analysis technique, originally formulated for systems using a rendezvous concurrency model, can be applied to the various concurrency models used in Java programs. The general approach of FLAVERS is based on modeling a concurrent system as a flow graph and, using a data flow analysis algorithm over this graph, statically checking if a property holds on all (or no) executions of the program. The accuracy of this analysis can be iteratively improved, as needed, by supplying additional constraints, represented as finite state automata, to the data flow analysis algorithm. In this paper we present an approach for analyzing Java programs that uses the constraint mechanism to model the possible communications among threads in Java programs, instead of representing them directly in the flow graph model. We also discuss a number of error-prone thread communication patterns that can arise in Java and describe how FLAVERS can be used to check for the presence of these. A preliminary evaluation of this approach is carried out by analyzing some small concurrent Java programs for these error-prone communication patterns and other, program-specific, faults.

[1]  George S. Avrunin,et al.  An efficient algorithm for computing MHP information for concurrent Java programs , 1999, ESEC/FSE-7.

[2]  Martin Peschke,et al.  Design and Validation of Computer Protocols , 2003 .

[3]  Barbara G. Ryder,et al.  Pointer-induced aliasing: a problem classification , 1991, POPL '91.

[4]  Schwetman Proceedings of the 1991 international conference on parallel processing , 1991 .

[5]  Andrew A. Chien,et al.  Precise Concrete Type Inference for Object-Oriented Languages , 1994, OOPSLA.

[6]  Lori A. Clarke,et al.  Data flow analysis for verifying properties of concurrent programs , 1994, SIGSOFT '94.

[7]  George S. Avrunin,et al.  Using integer programming to verify general safety and liveness properties , 1995, Formal Methods Syst. Des..

[8]  David Luckham,et al.  Debugging Ada Tasking Programs , 1985, IEEE Software.

[9]  Doug Lea,et al.  Concurrent Programming In Java , 1996 .

[10]  Patrice Godefroid,et al.  Model checking for programming languages using VeriSoft , 1997, POPL '97.

[11]  Claudio Demartini,et al.  Static Analysis of Java Multithreaded and Distributed Applications , 1998, PDSE.

[12]  Sérgio Vale Aguiar Campos,et al.  Symbolic Model Checking , 1993, CAV.

[13]  Lori A. Clarke,et al.  Comparing Implementation Strategies for Composite Data Flow Analysis Problems , 1997 .

[14]  Gerard J. Holzmann,et al.  Design and validation of computer protocols , 1991 .

[15]  Lori A. Clarke,et al.  Efficient composite data flow analysis applied to concurrent programs , 1998, PASTE '98.

[16]  Barbara G. Ryder,et al.  Static Infinite Wait Anomaly Detection in Polynomial Time , 1990, ICPP.

[17]  George S. Avrunin,et al.  A conservative data flow algorithm for detecting all pairs of statements that may happen in parallel , 1998, SIGSOFT '98/FSE-6.

[18]  Richard N. Taylor,et al.  Anomaly Detection in Concurrent Software by Static Data Flow Analysis , 1980, IEEE Transactions on Software Engineering.

[19]  James C. Corbett,et al.  Constructing compact models of concurrent Java programs , 1998, ISSTA '98.

[20]  Shing-Chi Cheung,et al.  Tractable Dataflow Analysis for Distributed Systems , 1994, IEEE Trans. Software Eng..