Towards Automatic Exception Safety Verification

Many programming languages provide exceptions as a structured way for detecting and recovering from abnormal conditions. However, using exceptions properly is non-trivial. Programmers are often careless when handling exceptions, and exception related mistakes are common in software products. We present a technique for verifying that exceptions are used in a safe way. This technique integrates static analysis with model checking to visit all possible exception-raising execution paths. To demonstrate the potential utility of our approach, we applied it to two open source Java applications.

[1]  Albert L. Baker,et al.  JML: A Notation for Detailed Design , 1999, Behavioral Specifications of Businesses and Systems.

[2]  Bjarne Stroustrup,et al.  C++ Programming Language , 1986, IEEE Softw..

[3]  Matthew B. Dwyer,et al.  Bogor: an extensible and highly-modular software model checking framework , 2003, ESEC/FSE-11.

[4]  James C. Corbett,et al.  Bandera: extracting finite-state models from Java source code , 2000, ICSE.

[5]  Roy A. Maxion,et al.  Improving software robustness with dependability cases , 1998, Digest of Papers. Twenty-Eighth Annual International Symposium on Fault-Tolerant Computing (Cat. No.98CB36224).

[6]  Martin P. Robillard,et al.  Static analysis to support the evolution of exception structure in object-oriented systems , 2003, TSEM.

[7]  Mark Weiser,et al.  Program Slicing , 1981, IEEE Transactions on Software Engineering.

[8]  K. Rustan M. Leino,et al.  Exception safety for C# , 2004, Proceedings of the Second International Conference on Software Engineering and Formal Methods, 2004. SEFM 2004..

[9]  George C. Necula,et al.  Finding and preventing run-time error handling mistakes , 2004, OOPSLA.

[10]  Ken Arnold,et al.  The Java Programming Language , 1996 .

[11]  Mark Ryan,et al.  Logic in Computer Science: Modelling and Reasoning about Systems , 2000 .

[12]  Klaus Havelund,et al.  Model Checking Programs , 2004, Automated Software Engineering.

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

[14]  Mark Lillibridge,et al.  Extended static checking for Java , 2002, PLDI '02.

[15]  Kwangkeun Yi,et al.  An uncaught exception analysis for Java , 2004, J. Syst. Softw..