skip to main content
10.1145/1353482.1353492acmotherconferencesArticle/Chapter ViewAbstractPublication PagesmodularityConference Proceedingsconference-collections
research-article

EJFlow: taming exceptional control flows in aspect-oriented programming

Published:31 March 2008Publication History

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.

References

  1. Avgustinov, P. et al. abc : An Extensible AspectJ Compiler. Trans. AOSD I, pages 293--334, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 ScholarGoogle Scholar
  3. Buschmann, F. et al Pattern-Oriented Software Architecture: a System of Patterns. John Wiley & Sons, Inc. 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Cabral, B and Paulo, M. Exception Handling: A Field Study in Java and .NET. Proc. of ECOOP, Berlin, Germany, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Cacho, N. et al. Composing Design Patterns: A Scalability Study of Aspect-Oriented Programming. Proc. of AOSD.06, Bonn, Germany, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Cargill, T. Exception Handling: A False Sense of Security. C++ Report, vol. 6, no. 9, pp. 21--24, Nov.-Dec. 1994.Google ScholarGoogle Scholar
  7. Castor Filho, F., Garcia, A., Rubira, C. Extracting Error Handling to Aspects: A Cookbook. In Proc. of the 23rd ICSM, Paris, France, 2007.Google ScholarGoogle Scholar
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. Chang, B.-M. et al. Interprocedural exception analysis for java. In Proceedings of 16th ACM SAC, pp. 620--625, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Chidamber, S., and Kemerer, C. A Metrics Suite for Object Oriented Design. IEEE Trans. on Software Engineering, 1994, 476--493.Google ScholarGoogle Scholar
  12. Cui, Q. and Gannon, J. D. Data-Oriented Exception Handling. IEEE Transactions on Software Engineering 18(5), pages 393--401, 1992.Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Cusumano, M. A. 'Systematic' vs. 'Accidental' Reuse in Japanese Software Factories. MIT Sloan School of Management Working Paper #3328-BPS-91, September 1991.Google ScholarGoogle Scholar
  14. 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 ScholarGoogle ScholarCross RefCross Ref
  15. Fahndrich, M. et al. Tracking down exceptions in standard ML. Technical Report CSD-98-996, University of California, Berkeley, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. Figueiredo, E., Garcia, A. and Lucena, C. AJATO: An AspectJ Assessment Tool. Proc. of ECOOP'06 (demo), 2006.Google ScholarGoogle Scholar
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. Gamma, E. et al. Design Patterns: Elements of Reusable Software Systems. Addison-Wesley, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarCross RefCross Ref
  22. Garcia, A. et al. Modularizing Design Patterns with Aspects: A Quantitative Study. Transactions on AOSD, 1, 2006, 36--74. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  24. Goodenough, J. B. Exception handling: Issues and a proposed notation. Comm. of the ACM, 18(12):683--696, 1975.Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Greenwood, P. et al. On the Impact of Aspectual Decompositions on Design Stability: An Empirical Study. Proc. of ECOOP.07, Berlin, Germany, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Kiczales, G. et al. Aspect-oriented programming. In Proceedings of ECOOP'97, pages 220--242, 1997.Google ScholarGoogle ScholarCross RefCross Ref
  27. 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 ScholarGoogle ScholarCross RefCross Ref
  28. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  29. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  30. Malayeri, D. and Aldrich, J. Practical Exception Specifications. Advanced Topics in Exception Handling Techniques, LNCS, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. 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 ScholarGoogle ScholarCross RefCross Ref
  32. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  33. Navarro, L. D. et al. Explicitly Distributed AOP using AWED. In Proc. of AOSD'2006, Bonn, Germany, 2006 Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  35. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  36. 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 ScholarGoogle Scholar
  37. 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 ScholarGoogle Scholar
  38. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  39. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  40. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  41. Soares, S., Laureano, E. and Borba, P. Implementing distribution and persistence aspects with AspectJ. In Proceedings of OOPSLA'02, pages 174--190, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. EJFlow: taming exceptional control flows in aspect-oriented programming

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in
            • Published in

              cover image ACM Other conferences
              AOSD '08: Proceedings of the 7th international conference on Aspect-oriented software development
              March 2008
              212 pages
              ISBN:9781605580449
              DOI:10.1145/1353482
              • Conference Chair:
              • Theo D'Hondt

              Copyright © 2008 ACM

              Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 31 March 2008

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • research-article

              Acceptance Rates

              Overall Acceptance Rate41of139submissions,29%

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader