ActiveAspect A Crosscutting Structure Presentation Tool |
||
Overview |
||
Aspect-oriented programming languages require tool support
to indicate how crosscutting concerns influence an underlying program.
Existing tools provide features such as gutter annotations to indicate the
presence of crosscutting and outline views that list the program elements
advised by a particular advice. These tools provide useful information but
do not provide an overview of the effect of an entire aspect. ActiveAspect
produces interactive graphical models of program structures affected by
aspects in AspectJ. The model is displayed using a UML-like notation that has been extended to support AOP
constructs. Models are initially constructed by displaying the direct
influence of an aspect such as the static shadows of its advice and the
inter-type members it declares. This initial model can then be
automatically expanded to show additional context such as calls made to
introduced members or from advice bodies. Unique user interaction and
automated abstraction techniques limit the model's complexity as
additional context is incrementally added.
|
||
|
||
ActiveAspect screen shot. The developer is currently hovering over the Billing aspect. This causes the blue arrows to appear, which show members introduced by the aspect. | ||
Structure Identification |
||
ActiveAspect identifies program
structure affected by an aspect using declarations in aspect source files.
The particular aspect members considered during this initial structure
identification are those that are directly involved in applying changes to
the base program. Thus, the structure associated with the effects of
advice, inter-type declarations, and declare parents
statements are included in the initial model.
|
||
|
||
This active model snapshot shows the crosscutting structure of a concern as identified from an aspect (Billing.aj from the telecom example in the AspectJ distribution). The user's mouse is hovering over an icon that indicates the presence of crosscutting. This causes an arrow (dashed in the diagram) to be drawn indicating the advice that is inserting the crosscutting behavior. | ||
Structure Expansion |
||
The initial model provides an
overview of a concern structure. Often, though, additional context is
needed. For example, a developer may need to know the callers of an
advised or introduced method. Calls made from an advice body may also be
particularly useful for understanding a concern. ActiveAspect
automatically expands the model to show additional related structure when
requested by the developer, saving the developer from issuing many single
queries. The structure is expanded incrementally by invoking the expand
operation until the desired level of detail is reached.
|
||
|
||
The model from the previous figure after expansion. The model now shows several additional method calls from the Billing aspect. The Timer class has also been added to the model. | ||
Structure Abstraction |
||
Concerns may involve many program
elements and relationships. For example, consider a performance profiling
concern that counts the number of times each method in a program is
called. A complete diagram of such a concern would include all methods in
the system. For any non-trivial program, the resulting diagram would be
excessively cluttered with classes and methods. However, the inclusion of
all of these methods and classifiers in a structure presentation model is
not required for understanding the concern. Therefore, ActiveAspect
automatically applies abstraction techniques to control the complexity of
the diagram. Some concrete examples are displayed along with abstracted
entities to aid program comprehension. |
||
|
||
A model of a profiling aspect where many program elements have been abstracted. Several concrete methods are shown as examples. |
||
Contact |
||
This project is part of the M.Sc. research of Wesley Coelho under the supervision of Gail Murphy at the Software Practices Lab, Department of Computer Science, University of British Columbia, Canada. Please email Wesley (coelho at cs.ubc.ca) if you have any questions or comments. |