Relational aspects as tracematches

  • Authors:
  • Eric Bodden;Reehan Shaikh;Laurie Hendren

  • Affiliations:
  • McGill University, Montréal, Québec, Canada;McGill University, Montréal, Québec, Canada;McGill University, Montréal, Québec, Canada

  • Venue:
  • Proceedings of the 7th international conference on Aspect-oriented software development
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

The relationships between objects in an object-oriented program are an essential property of the program's design and implementation. Two previous approaches to implement relationships with aspects were association aspects, an AspectJ-based language extension, and the relationship aspects library. While those approaches greatly ease software development, we believe that they are not general enough. For instance, the library approach only works for binary relationships, while the language extension does not allow for the association of primitive values or values from non-weavable classes. Hence, in this work we propose a generalized alternative implementation via a direct reduction to tracematches, a language feature for executing an advice after having matched a sequence of events. This new implementation scheme yields multiple benefits. Firstly, our implementation is more general than existing ones, avoiding most previous limitations. It also yields a new language construct, relational tracematches. We provide an efficient implementation based on the AspectBench Compiler, along with test cases and microbenchmarks. Our empirical studies showed that our implementation, when compared to previous approaches, uses a similar memory footprint with no leaking, but the generality of our approach does lead to some runtime overhead. We believe that our implementation can provide a solid foundation for future research.