LogicAJ demonstrates the feasibility of a uniformly generic aspect language design. Its seamless integration of logic meta-variables into the language lets LogicAJ provide much of the expressive power of approaches based on logic meta-programming. However, LogicAJ integrates all the necessary functionality within one uniform aspect language design instead of requiring the programmer to work completely in a logic-based environment (thus failing to use the advantages of object-orientation) or in two different environments at the same time (object-oriented and logic-based).
Uniform genericity lets aspects concisely express effects that may vary depending on the static context of a join point. Moreover, it alleviates the dependency of aspects on names of base entities, making them more reusable and more resilient to changes in base programs.
Interference analysis enables unanticipated joint deployment of independently developed aspects by inferring aspect order automatically. Moreover, it makes aspect semantics independent of the textual ordering of advice declarations and verifies that explicit aspect order specifications are consistent with the aspects you wrote.
A limitation of AspectJ and other aspect languages is the need to refer explicitly to the names of base program entities (types, classes, methods, etc). This makes aspect code highly vulnerable to changes in base programs. Moreover, in order to express multiple introduction or advice that are similar but not entirely identical one often needs to write code that is largely redundant and differs only in the names of referenced base entities. Such code is difficult to maintain - it replaces base level scattering by intra-aspect scattering. The foremost problem introduced by the dependency on base names is the inability to express aspect effects that are dependent on the static context of the join point. For instance, generic forwarding functionality (as required by many design patterns, like Decorator, Adapter, Wrapper, State, and Strategy) cannot be expressed at all in AspectJ.
LogicAJ enables the use of meta-variables for base program elements (fields, methods, parameter lists, argument lists, method bodies, etc.). Meta-variables can be used uniformly in pointcut definitions, introductions and advice. Generic introductions and generic advice can both be subject to prior pointcut evaluation. This enables implementation of aspect effects that can vary depending on the values produced for meta-variables during the evaluation of pointcuts.
Generic introductions make it easy to introduce new types, determine new class members, and vary the code of introduced methods by evaluating predicates. Generic advices replace otherwise redundant or reflective advices and reference methods and fields created by generic introductions.
Uniform genericity leverages aspect technology by enabling reusable, robust, concise, easy to write, understand, and maintain solutions for problems like
* generic implementations of forwarding-based design patterns (Kniesel, Rho, Hanenberg - RAM-SE04)
* generic implementation of class posing (Rho, Kniesel - IAI-TR-2004-4)
* generic mock objects (Rho, Kniesel - IAI-TR-2004-4)
* variability of aspect effects based on the static context of a join point (Rho, Kniesel - IAI-TR-2004-4)
For more details on the syntax, semantics and use of LogicAJ have a look at our papers.
An interference is an undesired interaction between different aspects or between aspects and the base program. Asect-to-aspect interference analysis is indispensible whenever different aspects are deployed jointly:
No implemented aspect language we know of supports interference analysis.
In addition, AspectJ makes the sematics of aspects dependent of the textual ordering of advice declarations, in order to compensate for missing analysis capabilities.
Using Condor, LogicAJ provides an aspect-to-aspect interference analysis that includes
The interference analysis is
The interference analysis makes aspect semantics independent of the textual ordering of advice declarations within an aspect.
Aspect-level interference analysis is not included in the current release of LogicAJ.
Our aspect interference analysis leverages aspect technology by making joint deployment of multiple aspects a little bit safer.