ARJ: Extending AspectJ with Aspect Refinement and Mixin-Based Aspect Inheritance


Latest Version 0.2 (Feb 2, 2007)

Introduction

ARJ is an extension to the aspect-oriented language AspectJ. ARJ is based on the AspectBench Compiler (abc) framework. It extends the common AspectJ language by constucts for expressing aspect refinement. Aspect refinement is a novel notion that proclaims that aspects should be subject to subsequent refinement in order to reuse and specialize functionality. Therewith, the approach of aspect refinement follows the prominet software development methodologies of step-wise refinement and incremental software development. In order to express and implement aspect refinement, ARJ introduces and employs the mechanism of mixin-based aspect inheritance. Mixin-based aspect inheritance introduces mixin capabilities to aspects. Hence, it becomes possible to compose aspects and subsequent refinement via mixin composistion. Introducing mixin-based inheritance to AOP improves the capabilities of aspects to implement incremental designs. Since it enhances the inheritance mechanism with more flexibility, it is a key technology to reuse, compose, and evolve aspects in a step-wise manner over several development stages (step-wise aspect refinement). The introduction of mixin capabilities to aspects leads further to the unification of the aspect’s structural elements with respect to step-wise refinement, i.e. in a chain of refining aspects every element (methods, pointcuts, advice) can be refined by subsequent elements without knowing the exact type of the enclosing aspect. Therefore, ARJ provides mechanims for anonymously refering to parent pointcuts as well as a novel advice construct: named advice are named entities that unify advice and methods and that can be refined in subsequent steps. Making these extensions to aspects, ARJ enables the programmer to implement higher-order aspects – aspects that modify other aspects by refinement.

For more details on the theoretical concepts of aspect refinement and mixin-based aspect inheritance see our technical publications section. An overview with introductionary examples as well as a tutorial can be found in the corresponding sections.