The 28th IPP Symposium

Better Separation of Crosscutting Concerns with Aspectual Components

Karl Lieberherr, Northeastern University

Proper separation of concerns is still of interest in software development. Here we focus on traversal-related concerns and how to encapsulate them as reusable components. Traversal-related concerns involve a group of connected objects that we traverse and manipulate to implement a behavior. Traversal-related concerns cut across multiple classes and are very common. Following the ideas of aspect-oriented programming (AOP), we would like to encapsulate a traversal-related concern into an aspect. Doing this in the straightforward way leads to reduced scattering, but often results in an aspect that is tangled with accidental structural information. We notice a tradeoff between reducing scattering across classes and increasing tangling of structural information in the aspect.

Ideas from nondeterministic finite automata theory, however, can often simultaneously reduce both scattering and tangling. The well localized traversal-related aspects are conceptually aspectual components and can be simulated in plain Java using basically three classes from the Java package DJ. We explain the basics of DJ and how you can better structure your Java programs using ideas from aspectual components.