Advertisement

Measuring and Characterizing Crosscutting in Aspect-Based Programs: Basic Metrics and Case Studies

  • Roberto E. Lopez-Herrejon
  • Sven Apel
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4422)

Abstract

Aspects are defined as well-modularized crosscutting concerns. Despite being a core tenet of Aspect Oriented Programming, little research has been done in characterizing and measuring crosscutting concerns. Some of the issues that have not been fully explored are: What kinds of crosscutting concerns exist? What language constructs do they use? And what is the im pact of crosscutting in actual Aspect Oriented programs? In this paper we present basic code metrics that categorize crosscutting according to the number of classes crosscut and the language constructs used. We applied the metrics to four non-trivial open source programs implemented in AspectJ. We found that for these systems, the number of classes crosscut by advice per crosscutting is small in relation to the number of classes in the program. We argue why we believe this result is not atypical for Aspect Oriented programs and draw a relation to other non-AOP techniques that provide crosscutting.

Keywords

Software Product Line Language Construct Static Crosscut Crosscutting Concern Aspect Code 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

References

  1. 1.
    AJHotDraw project web site, http://sourceforge.net/projects/ajhotdraw
  2. 2.
  3. 3.
  4. 4.
    Alves, V., Matos Jr., P., Cole, L., Borba, P., Ramalho, G.L.: Extracting and Evolving Mobile Games Product Lines. In: Obbink, H., Pohl, K. (eds.) SPLC 2005. LNCS, vol. 3714, pp. 70–81. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  5. 5.
    Anastasopoulos, M., Muthig, D.: An Evaluation of Aspect-Oriented Programming as a Product Line Implementation Technology. In: Bosch, J., Krueger, C. (eds.) ICOIN 2004 and ICSR 2004. LNCS, vol. 3107, pp. 141–156. Springer, Heidelberg (2004)Google Scholar
  6. 6.
    Apel, S.: The Role of Features and Aspects in Software Development. PhD Dissertation. School of Computer Science, University of Magdeburg (2007)Google Scholar
  7. 7.
    Apel, S., Leich, T., Saake, G.: Aspectual Mixin Layers: Aspects and Features in Concert. In: ICSE (2006)Google Scholar
  8. 8.
    Apel, S., Batory, D.: When to Use Features and Aspects? A Case Study. In: GPCE (2006)Google Scholar
  9. 9.
    Apel, S., Batory, D.: On the Structure of Crosscutting Concerns: Using Aspects or Collaborations? In: AOPLE (2006)Google Scholar
  10. 10.
  11. 11.
    Bartsch, M., Harrison, R.: An Evaluation of Coupling Measures for AspectJ. In: LATE Workshop AOSD (2006)Google Scholar
  12. 12.
    Batory, D., Cardone, R., Smaragdakis, Y.: Object-Oriented Frameworks and Product-Lines. In: SPLC (2000)Google Scholar
  13. 13.
    Batory, D., Sarvela, J.N., Rauschmayer, A.: Scaling Step-Wise Refinement. IEEE TSE (June 2004)Google Scholar
  14. 14.
    Bird, R.: Introduction to Functional Programming using Haskell. Prentice-Hall, Englewood Cliffs (1998)Google Scholar
  15. 15.
    Ceccato, M., Tonella, P.: Measuring the Effects of Software Aspectization. In: First Workshop on Aspect Reverse Engineering, Delft, The Netherlands (2004)Google Scholar
  16. 16.
    Chidamber, S., Kemerer, C.: A Metrics Suite for OOD Design. IEEE TSE 20(6) (1994)Google Scholar
  17. 17.
    Clements, P., Northrop, L.: Software product lines: practices and patterns. Addison-Wesley, Reading (2002)Google Scholar
  18. 18.
    Coyler, A., Clement, A.: Large-scale AOSD for Middleware. In: AOSD (2004)Google Scholar
  19. 19.
    Coyler, A., Rashid, A., Blair, G.: On the Separation of Concerns in Program Families. TRCOMP-001-2004, Computing Department, Lancaster University, UK (2004)Google Scholar
  20. 20.
    Garcia, A., Sant’Anna, C., Figueiredo, E., Kulesza, U., Lucena, C.J.P., von Staa, A.: Modularizing Design Patterns with Aspects: A Quantitative Study. In: Rashid, A., Aksit, M. (eds.) Transactions on Aspect-Oriented Software Development I. LNCS, vol. 3880, pp. 36–74. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  21. 21.
    Godil, I., Jacobsen, H.-A.: Horizontal Decomposition of Prevayler. In: CASCON (2005)Google Scholar
  22. 22.
    Hannemann, J.: AspectJ implementation of GoF patterns. AODPs, http://www.cs.ubc.ca/~jan/
  23. 23.
    Holland, I.M.: Specifying Reusable Components Using Contracts. In: Lehrmann Madsen, O. (ed.) ECOOP 1992. LNCS, vol. 615, pp. 287–308. Springer, Heidelberg (1992)CrossRefGoogle Scholar
  24. 24.
    Hunleth, F., Cytron, R.: Footprint and Feature Management Using Aspect-Oriented Programming Techniques. ACM SIGPLAN Notices 37(7), 38–45 (2002)CrossRefGoogle Scholar
  25. 25.
    Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An Overview of AspectJ. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, p. 327. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  26. 26.
    Laddad, R.: AspectJ in Action. Practical Aspect-Oriented Programming. Manning, Greenwich (2003)Google Scholar
  27. 27.
    Lämmel, R.: Declarative Aspect-Oriented Programming. In: PEPM (1999)Google Scholar
  28. 28.
    Lopez-Herrejon, R.E., Batory, D., Cook, W.: Evaluating Support for Features in Advanced Modularization Technologies. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 169–194. Springer, Heidelberg (2005)Google Scholar
  29. 29.
    Lopez-Herrejon, R.E., Batory, D., Lengauer, C.: A disciplined approach to aspect composition. In: PEPM (2006)Google Scholar
  30. 30.
    Lopez-Herrejon, R.E., Batory, D.: From Crosscutting Concerns to Product Lines: A Function Composition Approach. Tech. Report UT Austin CS TR-06-24 (May 2006)Google Scholar
  31. 31.
    Lopez-Herrejon. R.E.: Towards Crosscutting Metrics for Aspect-Based Features. In: AOPLE Workshop at GPCE (2006)Google Scholar
  32. 32.
    Masuhara, H., Kiczales, G.: Modeling Crosscutting Aspect-Oriented Mechanisms. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 219–233. Springer, Heidelberg (2003)Google Scholar
  33. 33.
    Mehner, K.: On Using Metrics in the Evaluation of Aspect-Oriented Programs and Designs. In: LATE Workshop AOSD (2006)Google Scholar
  34. 34.
    Reenskaug, T., Anderson, E., Berre, A., Hurlen, A., Landmanrk, A., Lehne, O., Nordhagen, E., Ness-Ulseth, E., Ofdetal, G., Skaar, A., Stenslet, P.: OORASS: Seamsless Support for the Creation and Maintenance of Object-Oriented Systems. Journal of Object Oriented Programming 5(6) (1992)Google Scholar
  35. 35.
    Smaragdakis, Y., Batory, D.: Mixin Layers: An Object-Oriented Implementation Technique for Refinements and Collaboration-Based Designs. ACM TOSEM (April 2002)Google Scholar
  36. 36.
    Van Hilst, M., Notkin, D.: Using C++ Templates to Implement Role-Based Designs. In: Futatsugi, K., Matsuoka, S. (eds.) ISOTAS 1996. LNCS, vol. 1049, pp. 22–37. Springer, Heidelberg (1996)Google Scholar
  37. 37.
    Van Hilst, M., Notkin, D.: Using Role Components to Implement Collaboration-Based Designs. In: OOPSLA (1996)Google Scholar
  38. 38.
    Wand, M., Kiczales, G., Dutchyn, C.: A Semantics for Advice and Dynamic Join Points in Aspect Oriented Programming. TOPLAS (2004)Google Scholar
  39. 39.
    Zave, P.: FAQ Sheet on Feature Interaction, http://www.research.att.com/~pamela/faq.html
  40. 40.
    Zhao, J.: Measuring Coupling in Aspect-Oriented Systems. Technical Report SE-142-6. Information Processing Society of Japan (IPSJ) (June 2003)Google Scholar
  41. 41.
    Zhao, J., Xu, B.: Measuring Aspect Cohesion. In: Wermelinger, M., Margaria-Steffen, T. (eds.) FASE 2004. LNCS, vol. 2984, pp. 54–68. Springer, Heidelberg (2004)Google Scholar

Copyright information

© Springer Berlin Heidelberg 2007

Authors and Affiliations

  • Roberto E. Lopez-Herrejon
    • 1
  • Sven Apel
    • 2
  1. 1.Computing Laboratory, University of OxfordEngland
  2. 2.School of Computer Science, University of MagdeburgGermany

Personalised recommendations