The relationships between objects in object-oriented applications 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 relations, while the language extension does not allow for the association of primitive values or values from non-weavable classes.
Hence, in our work we proposed 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.