Design and Implementation of an Aspect Instantiation Mechanism

  • Kouhei Sakurai
  • Hidehiko Masuhara
  • Naoyasu Ubayashi
  • Saeko Matuura
  • Seiichi Komiya
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3880)

Abstract

This paper describes the design and implementation of association aspects, which are a linguistic mechanism for the AspectJ language that concisely associates aspect instances to object groups by extending the per-object aspects in AspectJ. This mechanism allows an aspect instance to be associated to a group of objects, and by providing a new pointcut primitive to specify aspect instances as execution context of advice. With association aspects, we can straightforwardly implement crosscutting concerns that have stateful behavior related to a particular group of objects. The new pointcut primitive can more flexibly specify aspect instances when compared against previous implicit mechanisms. We implemented a compiler for association aspects by modifying the AspectJ compiler, which reduces the size of data structures for keeping associations. Our benchmark tests confirm that the overheads of association aspects are reasonably small when compared against functionally equivalent aspects in pure AspectJ that manually manage associations. The expressiveness of association aspects is demonstrated through development of an integrated development environment with and without association aspects.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    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, pp. 327–353. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  2. 2.
    Ossher, H.: Multi-dimensional separation of concerns: The Hyperspace approach. In: Proceedings of Software Architectures and Component Technology (2000)Google Scholar
  3. 3.
    Sullivan, K., Gu, L., Cai, Y.: Non-modularity in aspect-oriented languages: Integration as a crosscutting concern for AspectJ. In: Proceedings of the 1st International Conference on Aspect-Oriented Software Development, pp. 19–26. ACM, New York (2002)CrossRefGoogle Scholar
  4. 4.
    Rajan, H., Sullivan, K.: Eos: Instance-level aspects for integrated system design. In: ESEC/FSE-11: Proceedings of the 9th European Software Engineering Conference Held Jointly with 11th ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 297–306. ACM Press, New York (2003)CrossRefGoogle Scholar
  5. 5.
    The AspectJ Project at Eclipse.org. (2006) : http://www.eclipse.org/aspectj/ (Cited 30 January 2006)
  6. 6.
    Sullivan, K.: Mediators: Easing the Design and Evolution of Integrated Systems. PhD Thesis, Department of Computer Science, Unversity of Washington published as TR UW-CSE-94-08-01 (1994)Google Scholar
  7. 7.
    Sullivan, K.J., Notkin, D.: Reconciling Environment Integration and Software Evolution. ACM Trans. Softw. Eng. Methodol. 1, 229–268 (1992)CrossRefGoogle Scholar
  8. 8.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design patterns. Addison-Wesley, Reading (1995)MATHGoogle Scholar
  9. 9.
    Hannemann, J., Kiczales, G.: Design Pattern Implementation in Java and AspectJ. In: Proceedings of the 17th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 161–173. ACM Press, New York (2002)CrossRefGoogle Scholar
  10. 10.
    Hilsdale, E., Hugunin, J.: Advice weaving in AspectJ. In: Proceedings of the 3rd International Conference on Aspect-Oriented Software Development, pp. 26–35. ACM, New York (2004)CrossRefGoogle Scholar
  11. 11.
    Masuhara, H., Kiczales, G., Dutchyn, C.: A compilation and optimization model for aspect-oriented programs. In: Proceedings of the 12th International Conference Compiler Construction 2003, pp. 46–60. Springer, Heidelberg (2003)Google Scholar
  12. 12.
    Sakurai, K., Masuhara, H., Ubayashi, N., Matsuura, S., Komiya, S.: Association aspects. In: Proceedings of the 3rd International Conference on Aspect-Oriented Software Development, pp. 16–25. ACM, New York (2004)CrossRefGoogle Scholar
  13. 13.
    Helm, R., Holland, I.M., Gangopadhyay, D.: Contracts: Specifying behavioral compositions in object-oriented systems. In: OOPSLA/ECOOP 1990: Proceedings of the European Conference on Object-Oriented Programming on Object-Oriented Programming Systems, Languages, and Applications, pp. 169–180. ACM, New York (1990)CrossRefGoogle Scholar
  14. 14.
    Seiter, L.M., Palsberg, J., Lieberherr, K.J.: Evolution of object behavior using context relations. In: Garlan, D. (ed.) Proceedings of the 4th ACM SIGSOFT Symposium on Foundations of Software Engineering, pp. 46–57 (1996)Google Scholar
  15. 15.
    Seiter, L.M., Palsberg, J., Lieberherr, K.J.: Evolution of Object Behavior using Context Relations. IEEE Transactions on Software Engineering 24, 79–92 (1998)CrossRefGoogle Scholar
  16. 16.
    Mezini, M., Ostermann, K.: Conquering aspects with Caesar. In: AOSD 2003: Proceedings of the 2nd International Conference on Aspect-Oriented Software Development, pp. 90–99. ACM, New York (2003)Google Scholar
  17. 17.
    Mezini, M., Ostermann, K.: Integrating independent components with on-demand remodularization. In: OOPSLA 2002: Proceedings of the 17th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 52–67. ACM, New York (2002)CrossRefGoogle Scholar
  18. 18.
    Mezini, M., Ostermann, K.: Variability management with feature-oriented programming and aspects. In: Proceedings of the 12th ACM SIGSOFT Twelfth International Symposium on Foundations of Software Engineering, pp. 127–136. ACM, New York (2004)Google Scholar
  19. 19.
    Tamai, T., Ubayashi, N., Ichiyama, R.: An Adaptive Object Model with Dynamic Role Binding. In: ICSE 2005: Proceedings of the 27th International Conference on Software Engineering, pp. 166–175. ACM, New York (2005)Google Scholar
  20. 20.
    Veit, M., Herrmann, S.: Model-View-Controller and Object Teams: A Perfect Match of Paradigms. In: AOSD 2003: Proceedings of the 2nd International Conference on Aspect-Oriented Software Development, pp. 140–149. ACM Press, New York (2003)Google Scholar
  21. 21.
    Herrmann, S., Hundt, C., Mehner, K., Wloka, J.: Using Guard Predicates for Generalized Control of Aspect Instantiation and Activation. In: DAW 2005: Dynamic Aspects Workshop (held in conjunction with AOSD 2005), Chicago, Illinois, pp. 93–101 (2005)Google Scholar
  22. 22.
    Suvée, D., Vanderperren, W., Jonckers, V.: JAsCo: An Aspect-Oriented approach tailored for Component Based Software Development. In: AOSD 2003: Proceedings of the 2nd International Conference on Aspect-Oriented Software Development, pp. 21–29. ACM, New York (2003)Google Scholar
  23. 23.
    Ostermann, K., Mezini, M., Bockisch, C.: Expressive Pointcuts for Increased Modularity. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 214–240. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  24. 24.
    Colman, A., Han, J.: Coordination systems in role-based adaptive software. In: Jacquet, J.-M., Picco, G.P. (eds.) COORDINATION 2005. LNCS, vol. 3454, pp. 63–78. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  25. 25.
    Avgustinov, P., Christensen, A.S., Hendren, L., Kuzins, S., Lhoták, J., Lhoták, O., de Moor, O., Sereni, D., Sittampalam, G., Tibble, J.: abc: An extensible AspectJ compiler. In: AOSD 2005: Proceedings of the 4th International Conference on Aspect-Oriented Software Development, pp. 87–98. ACM, New York (2005)Google Scholar
  26. 26.
    Garcia, A., Sant’Anna, C., Figueiredo, E., Kulesza, U., Lucena, C., von Staa, A.: Modularizing Design Patterns with Aspects: A Quantitative Study. In: AOSD 2005: Proceedings of the 4th International Conference on Aspect-Oriented Software Development, pp. 3–14. ACM, New York (2005)Google Scholar
  27. 27.
    Wagelaar, D., Jonckers, V.: A Concept-Based Approach to Software Design. In: SEA 2003 Proceedings of the 7th IASTED International Conference on Software Engineering and Applications, Cambridge, MA (2003)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Kouhei Sakurai
    • 1
  • Hidehiko Masuhara
    • 2
  • Naoyasu Ubayashi
    • 3
  • Saeko Matuura
    • 1
  • Seiichi Komiya
    • 1
  1. 1.Shibaura Institute of TechnologyJapan
  2. 2.University of TokyoJapan
  3. 3.Kyushu Institute of TechnologyJapan

Personalised recommendations