Static analysis to support the evolution of exception structure in object-oriented systems

Exception-handling mechanisms in modern programming languages provide a means to help software developers build robust applications by separating the normal control flow of a program from the control flow of the program under exceptional situations. Separating the exceptional structure from the code associated with normal operations bears some consequences. One consequence is that developers wishing to improve the robustness of a program must figure out which exceptions, if any, can flow to a point in the program. Unfortunately, in large programs, this exceptional control flow can be difficult, if not impossible, to determine.In this article, we present a model that encapsulates the minimal concepts necessary for a developer to determine exception flow for object-oriented languages that define exceptions as objects. Using these concepts, we describe why exception-flow information is needed to build and evolve robust programs. We then describe Jex, a static analysis tool we have developed to provide exception-flow information for Java systems based on this model. The Jex tool provides a view of the actual exception types that might arise at different program points and of the handlers that are present. Use of this tool on a collection of Java library and application source code demonstrates that the approach can be helpful to support both local and global improvements to the exception-handling structure of a system.

[1]  David F. Bacon,et al.  Fast and effective optimization of statically typed object-oriented languages , 1997 .

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

[3]  Bjarne Stroustrup,et al.  The C++ programming language (2nd ed.) , 1991 .

[4]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

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

[6]  Ken Kennedy,et al.  Interprocedural constant propagation , 1986, SIGP.

[7]  Juris Hartmanis,et al.  The Programming Language Ada Reference Manual American National Standards Institute, Inc. ANSI/MIL-STD-1815A-1983 , 1983, Lecture Notes in Computer Science.

[8]  John D. Litke A systematic approach for implementing fault tolerant software designs in Ada , 1990, TRI-Ada '90.

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

[10]  Brian Postow Book review: A Theory of Objects by Martin Abadi and Luca Cardelli (Springer-Verlag, 1996): Series--Monographs in Computer Science , 1999, SIGA.

[11]  Kwangkeun Yi,et al.  An Abstract Interpretation for Estimating Uncaught Exceptions in Standard ML Programs , 1998, Sci. Comput. Program..

[12]  David B. Stewart,et al.  A study of the applicability of existing exception-handling techniques to component-based real-time software technology , 1998, TOPL.

[13]  Jens Palsberg,et al.  Object-oriented type inference , 1991, OOPSLA 1991.

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

[15]  David Grove,et al.  Optimization of Object-Oriented Programs Using Static Class Hierarchy Analysis , 1995, ECOOP.

[16]  François Pessaux,et al.  Type-based analysis of uncaught exceptions , 1999, POPL '99.

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

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

[19]  Alan Snyder,et al.  Exception Handling in CLU , 1979, IEEE Transactions on Software Engineering.

[20]  Christophe Dony,et al.  Exception handling and object-oriented programming: towards a synthesis , 1990, OOPSLA/ECOOP '90.

[21]  Michael L. Scott,et al.  Programming Language Pragmatics , 1999 .

[22]  Vladimir I. Shelekhov,et al.  Data Flow Analysis of Java Programs in the Presence of Exceptions , 1999, Ershov Memorial Conference.

[23]  Toshio Nakatani,et al.  A study of exception handling and its dynamic optimization in Java , 2001, OOPSLA '01.

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

[25]  David F Bacon Fast and Effective Optimization of Statically Typed Object-Oriented , 1998 .

[26]  Alexander Romanovsky,et al.  Except for exception handling … , 2001, ALET.

[27]  Henry Ledgard,et al.  Reference Manual for the ADA® Programming Language , 1983, Springer New York.

[28]  Byeong-Mo Chang,et al.  Visualization of exception propagation for Java using static analysis , 2002, Proceedings. Second IEEE International Workshop on Source Code Analysis and Manipulation.

[29]  Martin P. Robillard,et al.  Designing robust Java programs with exceptions , 2000, SIGSOFT '00/FSE-8.

[30]  Martín Abadi,et al.  A Theory of Objects , 1996, Monographs in Computer Science.

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

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

[33]  Jeannette M. Wing,et al.  A behavioral notion of subtyping , 1994, TOPL.

[34]  Peter T. Brennan Observations on program-wide Ada exception propagation , 1993, TRI-Ada '93.

[35]  Peter A. Buhr,et al.  Advanced Exception Handling Mechanisms , 2000, IEEE Trans. Software Eng..

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

[37]  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).

[38]  Carl F. Schaefer,et al.  Static analysis of exception handling in Ada , 1993, Softw. Pract. Exp..

[39]  Daniel M. Berry,et al.  A modular verifiable exception handling mechanism , 1985, TOPL.

[40]  Daniel C. Halbert,et al.  Using Types and Inheritance in Object-Oriented Programming , 1987, IEEE Software.

[41]  Robin Milner,et al.  Definition of standard ML , 1990 .

[42]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[43]  Anand R. Tripathi,et al.  Issues with Exception Handling in Object-Oriented Systems , 1997, ECOOP.

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

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

[46]  K. Yi,et al.  Exception analysis for multithreaded Java programs , 2001, Proceedings Second Asia-Pacific Conference on Quality Software.

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

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

[49]  Andrew A. Chien,et al.  Precise concrete type inference for object-oriented languages , 1994, OOPSLA 1994.

[50]  Michel Gauthier Exception Handling in Ada-94: Initial Users' Requests and Final Features , 1995, ALET.