AspectMaps pages navigation: — Introduction — DocumentationDownloads

—NEWS— AspectMaps V2 is a port to Moose 4.8 and Roassal, and downloadable from SmalltalkHub. Go to the Downloads page to get it, play with the examples, and start visualizing your Java + AspectJ software!

The implicit invocation mechanism of AOP introduces an additional layer of complexity in the construction of a system. This can make it harder to understand how base system and aspects interact and thus how the system will behave. For example, when writing pointcut definitions, it is not always clear for a developer where the aspect will intervene in the base code. This can then lead to situations where the pointcut either captures too many join points (false positives), or where certain join points that were intended to be captured, are not (false negatives). One variant of this problem is the so-called fragile pointcut problem.

AspectMaps is a software visualization tool built to aid the understanding of aspect-oriented software systems. It provides a scalable visualization of implicit invocation. AspectMaps visualizes selected join point shadows (a.k.a. shadow points): locations in the source code that at run-time produce a join point. AspectMaps visualizes the shadow points where an aspect will execute, and if multiple aspects will execute, the order in which they are specified to run. This results in a visualization that clearly shows how aspects cross-cut the base code, as well as how they interact at each join point. AspectMaps is a scalable visualization mainly due to its use of selective structural zooming. The structure of source code is shown at different levels of granularity, as specified by the user.


Below we show the SpaceWar example (that is part of AJDT), fully zoomed in on all join point shadows except for the dark blue Debug aspect.

  • An element is colored with the color of the aspect that applies in the element, or the color that indicates multiple aspects apply.
  • Zooming in on a package reveals the classes and aspects contained in that package, using a Polymetric Views-like visualisation.
  • Zooming in on a class reveals the list of instance variables and methods. These are drawn as diamonds and squares, respectively.
  • Zooming in on a method visualizes the shadow points where an aspect will execute, painting colored rectangles for each aspect execution. Visualization of these shadow points follows the template below.

Template of visualization of shadow points.

For a quick comparison between visualizations, below we show both the AspectMaps as well as the AJDT visualization of the same example.