Enforcing Exception Handling Policies with a Domain-Specific Language

Current software projects deal with exceptions in implementation and maintenance phases without a clear definition of exception handling policies. We call an exception handling policy the set of design decisions that govern the use of exceptions in a software project. Without an explicit exception handling policy, developers can remain unaware of the originally intended use of exceptions. In this paper, we present Exception Handling Policies Language (EPL), a domain-specific language to specify and verify exception handling policies. The evaluation of EPL was based on a user-centric observational study and case studies. The user-centric study was performed to observe how potential users of the language actually use it. With this study, we could better understand the trade-offs related to different language design decisions based on concrete and well-documented observations and experiences reported by participants. We identified some language characteristics that hindered its use and that motivated new language constructs. In addition, we performed case studies with one open-source project and two industry-strength systems to investigate how specifying and verifying exception handling policies may assist in detecting exception handling problems. The results show that violations of exception handling policies help to indicate potential faults in the exception handling code.

[1]  Alessandro Garcia,et al.  Analyzing Exceptional Interfaces on Evolving Frameworks , 2011, 2011 Fifth Latin-American Symposium on Dependable Computing Workshops.

[2]  Alessandro F. Garcia,et al.  Trading robustness for maintainability: an empirical study of evolving c# programs , 2014, ICSE.

[3]  Cristina Marinescu Should We Beware the Exceptions? An Empirical Study on the Eclipse Project , 2013, 2013 15th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing.

[4]  Fernando Castor Filho,et al.  New exception interfaces for Java-like languages , 2013, SAC '13.

[5]  Michael Eichberg,et al.  Defining and continuous checking of structural program dependencies , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

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

[7]  Hina Shah,et al.  Understanding Exception Handling: Viewpoints of Novices and Experts , 2010, IEEE Transactions on Software Engineering.

[8]  Cristina Marinescu Are the classes that use exceptions defect prone? , 2011, IWPSE-EVOL '11.

[9]  David Notkin,et al.  Software reflexion models: bridging the gap between source and high-level models , 1995, SIGSOFT FSE.

[10]  Michael Eichberg,et al.  Blending and reusing rules for architectural degradation prevention , 2014, MODULARITY.

[11]  Standard Glossary of Software Engineering Terminology , 1990 .

[12]  Martin Fowler,et al.  Domain-Specific Languages , 2010, The Addison-Wesley signature series.

[13]  Alessandro F. Garcia,et al.  Categorizing Faults in Exception Handling: A Study of Open Source Projects , 2014, 2014 Brazilian Symposium on Software Engineering.

[14]  Felipe Ebert,et al.  A Reflection on “An Exploratory Study on Exception Handling Bugs in Java Programs” , 2015, 2020 IEEE 27th International Conference on Software Analysis, Evolution and Reengineering (SANER).

[15]  Cecília M. F. Rubira,et al.  A comparative study of exception handling mechanisms for building dependable object-oriented software , 2001, J. Syst. Softw..

[16]  NotkinDavid,et al.  Software reflexion models , 1995 .

[17]  Mira Mezini,et al.  Heuristic Strategies for Recommendation of Exception Handling Code , 2012, 2012 26th Brazilian Symposium on Software Engineering.

[18]  Jonathan Aldrich,et al.  Practical Exception Specifications , 2006, Advanced Topics in Exception Handling Techniques.

[19]  Alessandro F. Garcia,et al.  How Does Exception Handling Behavior Evolve? An Exploratory Study in Java and C# Applications , 2014, 2014 IEEE International Conference on Software Maintenance and Evolution.

[20]  Felipe Ebert,et al.  A Study on Developers' Perceptions about Exception Handling Bugs , 2013, 2013 IEEE International Conference on Software Maintenance.

[21]  Jörg Kienzle,et al.  On exceptions and the software development life cycle , 2008, WEH '08.

[22]  Carlos José Pereira de Lucena,et al.  Quantifying the Effects of Aspect-Oriented Programming: A Maintenance Study , 2006, 2006 22nd IEEE International Conference on Software Maintenance.

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

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

[25]  Mira Mezini,et al.  A recommendation system for exception handling code , 2012, 2012 5th International Workshop on Exception Handling (WEH).

[26]  Jens Knodel,et al.  A Comparison of Static Architecture Compliance Checking Approaches , 2007, 2007 Working IEEE/IFIP Conference on Software Architecture (WICSA'07).

[27]  John W. Creswell,et al.  Designing and Conducting Mixed Methods Research , 2006 .

[28]  Sérgio Soares,et al.  Implementing distribution and persistence aspects with aspectJ , 2002, OOPSLA '02.

[29]  Cecília M. F. Rubira,et al.  Architecting Fault Tolerance with Exception Handling: Verification and Validation , 2009, Journal of Computer Science and Technology.

[30]  René L. Krikhaar,et al.  Languages for formalizing, visualizing and verifying software architectures , 2001, Comput. Lang..

[31]  Roberta Coelho,et al.  Preserving the Exception Handling Design Rules in Software Product Line Context: A Practical Approach , 2011, 2011 Fifth Latin-American Symposium on Dependable Computing Workshops.

[32]  Fred D. Davis Perceived Usefulness, Perceived Ease of Use, and User Acceptance of Information Technology , 1989, MIS Q..

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

[34]  Hina Shah,et al.  Exception handling negligence due to intra-individual goal conflicts , 2009, 2009 ICSE Workshop on Cooperative and Human Aspects on Software Engineering.

[35]  Bertrand Meyer,et al.  Eiffel: The Language , 1991 .

[36]  Rogério de Lemos,et al.  Exception handling in the software lifecycle , 2001, Comput. Syst. Sci. Eng..

[37]  Paul C. Clements,et al.  A survey of architecture description languages , 1996, Proceedings of the 8th International Workshop on Software Specification and Design.

[38]  Eduardo Figueiredo,et al.  EJFlow: taming exceptional control flows in aspect-oriented programming , 2008, AOSD.

[39]  Ricardo Terra,et al.  A dependency constraint language to manage object-oriented software architectures , 2009 .

[40]  Carlos José Pereira de Lucena,et al.  Assessing the Impact of Aspects on Exception Flows: An Exploratory Study , 2008, ECOOP.

[41]  Chanchal Kumar Roy,et al.  On the Use of Context in Recommending Exception Handling Code Examples , 2014, 2014 IEEE 14th International Working Conference on Source Code Analysis and Manipulation.

[42]  Cláudio Sant'Anna,et al.  Evolving software product lines with aspects , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

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

[44]  Edward B. Allen,et al.  Exception Handling Defects: An Empirical Study , 2012, 2012 IEEE 14th International Symposium on High-Assurance Systems Engineering.