ABSTRACT
Many of the problems that stem from the use of exception handling are caused by the local way in which exceptions are handled. It demands that developers understand the source of an exception, the place where it is handled, and everything in between. As a consequence, exceptions easily get "out of control" and, as system development progresses, exceptional control flows become less well-understood, with potentially negative consequences for the program maintainability and reliability. This paper presents an innovative aspect-oriented model for exception handling implementation. In contrast to other exception handling mechanisms, our model provides abstractions to explicitly describe global views of exceptional control flows. As a result, this new model makes it possible to understand exception flows from an end-to-end perspective by looking at a single part of the program. Also, it leverages existing pointcut languages to make the association of handlers with normal code more flexible. The implementation of our proposed model, called EJFlow, extends the AspectJ programming language with the aim of promoting enhanced robustness and program modularization. We evaluate qualitatively and quantitatively the proposed exception handling model through a case study targeting a real mobile application.
- Avgustinov, P. et al. abc : An Extensible AspectJ Compiler. Trans. AOSD I, pages 293--334, 2006. Google ScholarDigital Library
- Buhr, P. A. and Krischer, R. Bound Exceptions in Object Programming. In Proceedings of the ECOOP 2003 Workshop on Exception Handling in Object Oriented Systems, pp. 20--26, Darmstadt, Germany, July 2003.Google Scholar
- Buschmann, F. et al Pattern-Oriented Software Architecture: a System of Patterns. John Wiley & Sons, Inc. 1996. Google ScholarDigital Library
- Cabral, B and Paulo, M. Exception Handling: A Field Study in Java and .NET. Proc. of ECOOP, Berlin, Germany, 2007. Google ScholarDigital Library
- Cacho, N. et al. Composing Design Patterns: A Scalability Study of Aspect-Oriented Programming. Proc. of AOSD.06, Bonn, Germany, 2006. Google ScholarDigital Library
- Cargill, T. Exception Handling: A False Sense of Security. C++ Report, vol. 6, no. 9, pp. 21--24, Nov.-Dec. 1994.Google Scholar
- Castor Filho, F., Garcia, A., Rubira, C. Extracting Error Handling to Aspects: A Cookbook. In Proc. of the 23rd ICSM, Paris, France, 2007.Google Scholar
- Castor Filho, F. et al. Exceptions and Aspects: The Devil is in the Details. Proc. of Int'l Symp. on Foundations of Software Engineering (FSE), 2006. Google ScholarDigital Library
- Chang, B., Jo, J. and Her, S. H. Visualization of exception propagation for Java using static analysis. Proc. 2nd IEEE Workshop on Source Code Analysis and Manipulation, pages 173--182, 2002. Google ScholarDigital Library
- Chang, B.-M. et al. Interprocedural exception analysis for java. In Proceedings of 16th ACM SAC, pp. 620--625, 2001. Google ScholarDigital Library
- Chidamber, S., and Kemerer, C. A Metrics Suite for Object Oriented Design. IEEE Trans. on Software Engineering, 1994, 476--493.Google Scholar
- Cui, Q. and Gannon, J. D. Data-Oriented Exception Handling. IEEE Transactions on Software Engineering 18(5), pages 393--401, 1992.Google ScholarDigital Library
- Cusumano, M. A. 'Systematic' vs. 'Accidental' Reuse in Japanese Software Factories. MIT Sloan School of Management Working Paper #3328-BPS-91, September 1991.Google Scholar
- Dooren, M. and Steegmans, E. Combining the Robustness of Checked Exceptions with the Flexibility of Unchecked Exceptions Using Anchored Exception Declarations. In Proceedings of OOPSLA'2005, pages 455--471, USA, 2005. Google ScholarCross Ref
- Fahndrich, M. et al. Tracking down exceptions in standard ML. Technical Report CSD-98-996, University of California, Berkeley, 1998. Google ScholarDigital Library
- Fetzer, C., Högstedt, K., and Felber, P. Automatic detection and masking of nonatomic exception handling. IEEE Trans. Sw. Eng., 30(8):547--560, 2004. Google ScholarDigital Library
- Figueiredo, E., Garcia, A. and Lucena, C. AJATO: An AspectJ Assessment Tool. Proc. of ECOOP'06 (demo), 2006.Google Scholar
- Figueiredo, E. et al. Evolving Software Product Lines with Aspects: An Empirical Study on Design Stability. To appear in Proceedings of ICSE'08, Leipzig, Germany, 2008. Google ScholarDigital Library
- Fu, C. and Ryder, B. G. Exception-Chain Analysis: Revealing Exception Handling Architecture in Java Server Applications. In Proceedings of ICSE'07, pages 230--239, Minneapolis, USA, 2007. Google ScholarDigital Library
- Gamma, E. et al. Design Patterns: Elements of Reusable Software Systems. Addison-Wesley, 1995. Google ScholarDigital Library
- Garcia, A, Beder, D. and Rubira, C. An exception handling software architecture for developing fault-tolerant software, Proceedings of the 5th IEEE High Assurance Systems Engineering Symposium, USA, 2000, 311--320.Google ScholarCross Ref
- Garcia, A. et al. Modularizing Design Patterns with Aspects: A Quantitative Study. Transactions on AOSD, 1, 2006, 36--74. Google ScholarDigital Library
- Garcia, A. et al. A Comparative Study of Exception Handling Mechanisms for Building Dependable Object-Oriented Software. Journal of Systems and Software, 59(2):197--222, November 2001. Google ScholarDigital Library
- Goodenough, J. B. Exception handling: Issues and a proposed notation. Comm. of the ACM, 18(12):683--696, 1975.Google ScholarDigital Library
- Greenwood, P. et al. On the Impact of Aspectual Decompositions on Design Stability: An Empirical Study. Proc. of ECOOP.07, Berlin, Germany, 2007. Google ScholarDigital Library
- Kiczales, G. et al. Aspect-oriented programming. In Proceedings of ECOOP'97, pages 220--242, 1997.Google ScholarCross Ref
- Lacourte, S. Exceptions in guide, an object-oriented language for distributed applications. In Proceedings of the 5th ECOOP'91, LNCS 512, pages 268--287, 1991.Google ScholarCross Ref
- Lippert, M and Lopes, C. A Study on Exception Detection and Handling Using Aspect-Oriented Programming. In Proc. of the 22nd ICSE, pages 418--427, Limmerick, Ireland, 2000. Google ScholarDigital Library
- Litke, J. D. A systematic approach for implementing fault tolerant software designs in Ada. In Proceedings of the Conference on TRI-ADA '90 (Baltimore, Maryland, United States, December 03--06, 1990).Google ScholarDigital Library
- Malayeri, D. and Aldrich, J. Practical Exception Specifications. Advanced Topics in Exception Handling Techniques, LNCS, 2006. Google ScholarDigital Library
- Miller, M. and Tripathi, A. Issues with Exception Handling in Object-Oriented Systems. In Proceedings of ECOOP, pp.85--103, LNCS-1241, Finland, 1997.Google ScholarCross Ref
- Molesini, A., Garcia, A., Chavez, C., Batista, T. On the Quantitative Analysis of Architecture Stability in Aspectual Decompositions. Proc. 7th IEEE Conference on Software Architecture (WICSA) 2008, Vancouver, BC, Canada. Google ScholarDigital Library
- Navarro, L. D. et al. Explicitly Distributed AOP using AWED. In Proc. of AOSD'2006, Bonn, Germany, 2006 Google ScholarDigital Library
- Nishizawa, M., Chiba, S., and Tatsubori, M. Remote pointcut: a language construct for distributed AOP. In Proceedings of the AOSD'2004, pages 7--15, Lancaster, UK, 2004. Google ScholarDigital Library
- Parnas, D. L. and Würges, H. Response to Undesired Events in Software Systems. In Proceedings of the 2nd International Conference on Software Engineering, pages 437--446, San Francisco, USA, 1976.Google ScholarDigital Library
- Randell, B. and Xu, J. The Evolution of the Recovery Block Concept. In Software Fault Tolerance (M. Lyu, Ed.), Trends in Software, pages 1--22, J. Wiley, 1994.Google Scholar
- Reimer, D., Srinivasan, H. Analyzing exception usage in large Java applications. In: Proceedings of ECOOP'2003 Workshop on Exception Handling in Object-Oriented Systems.Google Scholar
- Robillard, M. P. and Murphy, G. C. Designing robust Java programs with exceptions. In Proceedings of the 8th ACM SIGSOFT international Symposium on Foundations of Software Engineering: Twenty-First Century Applications. ACM Press, New York, 2000, 2--10. Google ScholarDigital Library
- Robillard, M. P. and Murphy, G. C. Static analysis to support the evolution of exception structure in object-oriented systems. ACM Trans. Softw. Eng. Methodol. 12, 2 (Apr. 2003), 191--221. Google ScholarDigital Library
- Schaefer, C. F. and Bundy, G. N. Static analysis of exception handling in Ada. Software: Practice and Experience, 23(10):1157--1174, October 1993.Google ScholarDigital Library
- Soares, S., Laureano, E. and Borba, P. Implementing distribution and persistence aspects with AspectJ. In Proceedings of OOPSLA'02, pages 174--190, 2002. Google ScholarDigital Library
- Vall'ee-Rai, R. et al. Optimizing Java bytecode using the Soot framework: Is it feasible? In David A. Watt, editor, Compiler Construction, 9th International Conference (CC 2000), pages 18--34, 2000. Google ScholarDigital Library
Index Terms
- EJFlow: taming exceptional control flows in aspect-oriented programming
Recommendations
Improving robustness of evolving exceptional behaviour in executable models
WEH '08: Proceedings of the 4th international workshop on Exception handlingExecutable models are increasingly being employed by development teams to implement robust software systems. Modern executable models offer powerful composition mechanisms that allow developers to deliver a running system in small increments and in a ...
On the modularization and reuse of exception handling with aspects
This paper presents an in-depth study of the adequacy of the AspectJ language for modularizing and reusing exception-handling code. The study consisted of refactoring existing applications so that the code responsible for implementing error-handling ...
A catalogue of bug patterns for exception handling in aspect-oriented programs
PLoP '08: Proceedings of the 15th Conference on Pattern Languages of ProgramsAspects allow a developer to externally add new functionality to a program. This additional functionality may also throw new exceptions that will flow through the program execution until they are handled. Moreover, aspects can also be used to handle ...
Comments