ABSTRACT
It is usually assumed that the implementation of exception handling can be better modularized by the use of aspect-oriented programming (AOP). However, the trade-offs involved in using AOP with this goal are not well-understood. This paper presents an in-depth study of the adequacy of the AspectJ language for modularizing exception handling code. The study consisted in refactoring existing applications so that the code responsible for implementing heterogeneous error handling strategies was moved to separate aspects. We have performed quantitative assessments of four systems - three object-oriented and one aspect-oriented - based on four quality attributes, namely separation of concerns, coupling, cohesion, and conciseness. Our investigation also included a multi-perspective analysis of the refactored systems, including (i) the reusability of the aspectized error handling code, (ii) the beneficial and harmful aspectization scenarios, and (iii) the scalability of AOP to aspectize exception handling in the presence of other crosscutting concerns.
- T. Anderson and P. A. Lee. Fault Tolerance: Principles and Practice. Springer, 2nd edition, 1990. Google ScholarDigital Library
- P. Avgustinov, A. S. Christensen, L. J. Hendren, S. Kuzins, J. Lhoták, O. Lhoták, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. abc: an extensible aspectj compiler. In Proceedings of AOSD'05, pages 87--98, March 2005. Google ScholarDigital Library
- N. Cacho, C. Sant'Anna, E. Figueiredo, A. Garcia, and T. B. C. Lucena. Composing design patterns: A scalability study of aspect-oriented programming. In Proceedings of AOSD'06, March 2006. Google ScholarDigital Library
- F. Castor Filho, A. Garcia, and C. M. F. Rubira. A quantitative study on the aspectization of exception handling. In Proceedings of ECOOP'2005 Workshop on Exception Handling in OO Systems, 2005.Google Scholar
- S. Chidamber and C. Kemerer. A metrics suite for oo design. IEEE Trans. Sw. Eng., 20(6):476--493, 1994. Google ScholarDigital Library
- F. Cristian. A recovery mechanism for modular software. In Proceedings of the 4th ICSE, pages 42--51, 1979. Google ScholarDigital Library
- F. Cristian. Exception handling. In Dependability of Resilient Computers. BSP Professional Books, 1989.Google Scholar
- C. Fetzer, K. Högstedt, and P. Felber. Automatic detection and masking of nonatomic exception handling. IEEE Trans. Sw. Eng., 30(8):547--560, 2004. Google ScholarDigital Library
- P. Fradet and M. Südolt. An aspect language for robust programming. In Proceedings of the ECOOP'99 Workshop on AOP, June 1999. Google ScholarDigital Library
- A. Garcia, C. Rubira, A. Romanovsky, and J. Xu. A comparative study of exception handling mechanisms for building dependable object-oriented software. Journal of Systems and Software, 59(2):197--222, 2001. Google ScholarDigital Library
- A. Garcia, C. Sant'Anna, E. Figueiredo, U. Kulesza, C. J. P. de Lucena, and A. von Staa. Modularizing design patterns with aspects: A quantitative study. Trans. AOSD, 1:36--74, 2006. Google ScholarDigital Library
- I. Godil and H. Jacobsen. Horizontal decomposition of prevlayer. In Proceedings of CASCON 2005, 2005. Google ScholarDigital Library
- J. B. Goodenough. Exception handling: Issues and a proposed notation. Communications of the ACM, 18(12):683--696, December 1975. Google ScholarDigital Library
- P. Greenwood and L. Blair. A framework for policy-driven auto-adaptive systems using dynamic framed aspects. Trans. AOSD, 2006. To appear. Google ScholarDigital Library
- J. Hannemann and G. Kiczales. Design pattern implementation in java and AspectJ. In Proceedings of OOPSLA'02, pages 161--173, November 2002. Google ScholarDigital Library
- B. Harbulot and J. R. Gurd. A join point for loops in aspectj. In Proceedings of AOSD'06, pages 63--74, Bonn, Germany, March 2006. Google ScholarDigital Library
- G. Kiczales, J. Lamping, A. Mendhekar, C. Maeda, C. V. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-oriented programming. In Proceedings of ECOOP'97, pages 220--242, 1997.Google ScholarCross Ref
- J. Kienzle and R. Guerraoui. AOP: Does it make sense? the case of concurrency and failures. In Proceedings of ECOOP'02, pages 37--61, June 2002. Google ScholarDigital Library
- R. Laddad. AspectJ in Action. Manning, 2003.Google Scholar
- M. Lippert and C. V. Lopes. A study on exception detection and handling using aspect-oriented programming. In Proceedings of ICSE'2000, pages 418--427, June 2000. Google ScholarDigital Library
- M. P. Monteiro and J. M. Fernandes. Towards a catalog of aspect-oriented refactorings. In Proceedings of AOSD'05, pages 111--122, March 2005. Google ScholarDigital Library
- S. Soares, E. Laureano, and P. Borba. Implementing distribution and persistence aspects with AspectJ. In Proceedings of OOPSLA'02, pages 174--190, 2002. Google ScholarDigital Library
- M. van Dooren and E. Steegmans. Combining the robustness of checked exceptions with the flexibility of unchecked exceptions using anchored exception declarations. In Proceedings of OOPSLA'05, pages 455--471, October 2005. Google ScholarDigital Library
- W. Weimer and G. Necula. Finding and preventing run-time error handling mistakes. In Proceedings of OOPSLA'04, pages 419--433, October 2004. Google ScholarDigital Library
Index Terms
- Exceptions and aspects: the devil is in the details
Recommendations
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 ...
Unveiling and taming liabilities of aspects in the presence of exceptions: A static analysis based approach
As aspects extend or replace existing functionality at specific join points in the code, their behavior may raise new exceptions, which can flow through the program execution in unexpected ways. Assuring the reliability of exception handling code in ...
Composition of dynamic analysis aspects
GPCE '10: Proceedings of the ninth international conference on Generative programming and component engineeringAspect-oriented programming provides a convenient high-level model to define several kinds of dynamic analyses, in particular thanks to recent advances in exhaustive weaving in core libraries. Casting dynamic analyses as aspects allows the use of a ...
Comments