An uncaught exception analysis for Java

Current JDK Java compiler relies on programmer's declarations (by throws clauses) for checking against uncaught exceptions of the input program. It is not elaborate enough to remove programmer's unnecessary handlers nor suggest to programmers for specialized handlings (when programmer's declarations are too broad). We propose a static analysis of Java programs that estimates their uncaught exceptions independently of the programmer's declarations. This analysis is designed and implemented based on set-based framework. Its cost-effectiveness is suggested by sparsely analyzing the program at method level (hence reducing the number of unknowns in the flow equations). We have shown that our interprocedural exception analysis is more precise than JDK-style intraprocedural analysis, and also that our analysis can effectively detect uncaught exceptions for realistic Java programs.

[1]  Sophia Drossopoulou,et al.  Java Type Soundness Revisited , 2000 .

[2]  Kwangkeun Yi,et al.  A cost-effective estimation of uncaught exceptions in Standard ML programs , 2002, Theor. Comput. Sci..

[3]  Patrick Cousot,et al.  Compositional and Inductive Semantic Definitions in Fixpoint, Equational, Constraint, Closure-condition, Rule-based and Game-Theoretic Form , 1995, CAV.

[4]  Jens Palsberg,et al.  Object-oriented type inference , 1991, OOPSLA '91.

[5]  Kwangkeun Yi,et al.  Towards a Cost-Effective Estimation of Uncaught Exceptions in SML Programs , 1997, SAS.

[6]  David Grove,et al.  Fast interprocedural class analysis , 1998, POPL '98.

[7]  Sophia Drossopoulou,et al.  Java is Type Safe - Probably , 1997, ECOOP.

[8]  John B. Goodenough,et al.  Exception handling: issues and a proposed notation , 1975, CACM.

[9]  Tobias Nipkow,et al.  Javalight is type-safe—definitely , 1998, POPL '98.

[10]  Saurabh Sinha,et al.  Analysis and Testing of Programs with Exception Handling Constructs , 2000, IEEE Trans. Software Eng..

[11]  Barbara G. Ryder,et al.  Data-flow-based Testing of Object-Oriented Libraries , 1999 .

[12]  Kwangkeun Yi Compile-time Detection of Uncaught Exceptions in Standard ML Programs , 1994, SAS.

[13]  Jong-Deok Choi,et al.  Efficient and precise modeling of exceptions for the analysis of Java programs , 1999, PASTE '99.

[14]  Barbara G. Ryder,et al.  Complexity of Concrete Type-Inference in the Presence of Exceptions , 1998, ESOP.

[15]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[16]  Jeffrey S. Foster,et al.  Tracking down Exceptions in Standard ML Programs , 1998 .

[17]  Martin P. Robillard,et al.  Analyzing exception flow in Java programs , 1999, ESEC/FSE-7.

[18]  Nevin Charles Heintze,et al.  Set based program analysis , 1992 .

[19]  François Pessaux,et al.  Type-based analysis of uncaught exceptions , 2000, TOPL.

[20]  Barbara G. Ryder,et al.  A Static Study of Java Exceptions Using JESP , 2000, CC.