Improving the robustness and reliability of object-oriented programs through exception analysis and testing

Exception handling is a powerful mechanism that separates the error handling code from normal code. It makes software do its utmost to run on the normal state. However, incorrect usage of exception will bring about more potential faults in the code. Based on the study of exception model of C++, a typical object-oriented language, we present a method of constructing control flows for both explicit exception and implicit exception. Subsequently, provide a model that can improve the robustness of programs via static exception analysis. This paper also discusses methods of dynamic exception structural testing and proposes several testing strategies. Finally, a rough prototype tool for exception analysis and testing has been implemented, and some preliminary experiments have been performed under it. The experiment results show that our methods of static exception inspection and dynamic exception testing are fairly effective to expose the potential exception errors. Furthermore, statistical structural exception testing is also considerably useful to find out some normal faults.

[1]  Jeffrey K. Hollingsworth,et al.  Efficient instrumentation for code coverage testing , 2002, ISSTA '02.

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

[3]  Tsong Yueh Chen,et al.  TACCLE: a methodology for object-oriented software testing at the class and cluster levels , 2001, TSEM.

[4]  David Chenho Kung,et al.  On object state testing , 1994, Proceedings Eighteenth Annual International Computer Software and Applications Conference (COMPSAC 94).

[5]  Saurabh Sinha,et al.  Analysis of programs with exception-handling constructs , 1998, Proceedings. International Conference on Software Maintenance (Cat. No. 98CB36272).

[6]  Christof Fetzer,et al.  Automatic detection and masking of nonatomic exception handling , 2003, IEEE Transactions on Software Engineering.

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

[8]  Kwangkeun Yi,et al.  Interprocedural exception analysis for Java , 2001, SAC.

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

[10]  Byeong-Mo Chang,et al.  Constructing Control Flow Graph for Java by Decoupling Exception Flow from Normal Flow , 2004, ICCSA.

[11]  Saurabh Sinha,et al.  Criteria for testing exception-handling constructs in Java programs , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

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

[13]  Tom Cargill Exception handling: a false sense of security , 1996 .

[14]  Arnaud Gotlieb,et al.  Automatic test data generation using constraint solving techniques , 1998, ISSTA '98.

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