Design and Implementation of an Aspect Instantiation Mechanism

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.

[1]  Farhad Arbab,et al.  Coordination Models and Languages , 1998, Adv. Comput..

[2]  Ondrej Lhoták,et al.  abc: an extensible AspectJ compiler , 2005, AOSD '05.

[3]  William G. Griswold,et al.  An Overview of AspectJ , 2001, ECOOP.

[4]  Wim Vanderperren,et al.  JAsCo: an aspect-oriented approach tailored for component based software development , 2003, AOSD '03.

[5]  Gregor Kiczales,et al.  Design pattern implementation in Java and aspectJ , 2002, OOPSLA '02.

[6]  Hridesh Rajan,et al.  Eos: instance-level aspects for integrated system design , 2003, ESEC/FSE-11.

[7]  Stephan Herrmann,et al.  Model-view-controller and object teams: a perfect match of paradigms , 2003, AOSD '03.

[8]  Jun Han,et al.  Coordination Systems in Role-Based Adaptive Software , 2005, COORDINATION.

[9]  Andrew P. Black ECOOP 2005 - Object-Oriented Programming, 19th European Conference, Glasgow, UK, July 25-29, 2005, Proceedings , 2005, ECOOP.

[10]  T. Tamai,et al.  An adaptive object model with dynamic role binding , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[11]  Carlos José Pereira de Lucena,et al.  Modularizing design patterns with aspects: a quantitative study , 2005, AOSD '05.

[12]  Yuanfang Cai,et al.  Non-modularity in aspect-oriented languages: integration as a crosscutting concern for AspectJ , 2002, AOSD '02.

[13]  Christopher G. Lasater,et al.  Design Patterns , 2008, Wiley Encyclopedia of Computer Science and Engineering.

[14]  Ian M. Holland,et al.  Contracts: specifying behavioral compositions in object-oriented systems , 1990, OOPSLA/ECOOP '90.

[15]  Mira Mezini,et al.  Variability management with feature-oriented programming and aspects , 2004, SIGSOFT '04/FSE-12.

[16]  Jens Palsberg,et al.  Evolution of Object Behavior Using Context Relations , 1998, IEEE Trans. Software Eng..

[17]  Mira Mezini,et al.  Conquering aspects with Caesar , 2003, AOSD '03.

[18]  Mira Mezini,et al.  Integrating independent components with on-demand remodularization , 2002, OOPSLA '02.

[19]  Mira Mezini,et al.  Expressive Pointcuts for Increased Modularity , 2005, ECOOP.

[20]  Hidehiko Masuhara,et al.  A Compilation and Optimization Model for Aspect-Oriented Programs , 2003, CC.

[21]  Satoshi Matsuoka,et al.  Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications , 2002, OOPSLA 2002.

[22]  Kevin Sullivan,et al.  Mediators: easing the design and evolution of integrated systems , 1994 .

[23]  Harold Ossher,et al.  Multi-Dimensional Separation of Concerns and the Hyperspace Approach , 2002 .

[24]  Cyril S. Ku,et al.  Design Patterns , 2008, Wiley Encyclopedia of Computer Science and Engineering.

[25]  Naoyasu Ubayashi,et al.  Association aspects , 2004, AOSD '04.

[26]  Stephan Herrmann,et al.  Using Guard Predicates for Generalized Control of Aspect Instantiation and Activation , 2005 .

[27]  Dennis Wagelaar A Concept-Based Approach to Software Design , 2003 .

[28]  Jørgen Lindskov Knudsen ECOOP 2001 — Object-Oriented Programming , 2001, Lecture Notes in Computer Science.

[29]  David Notkin,et al.  Reconciling environment integration and software evolution , 1992, TSEM.

[30]  Jim Hugunin,et al.  Advice weaving in AspectJ , 2004, AOSD '04.