A Program Transformation Technique to Support AOP within C++ Template.
Suman Roychoudhury, Jeff Gray, Jing Zhang, Purushotham Bangalore, Anthony Skjellum · The Journal of Object Technology · 2010
Aspect-oriented programming (AOP) provides assistance in modularizing concerns that crosscut the boundaries of system decomposition.Aspects have the potential to interact with many different kinds of language constructs in order to modularize crosscutting concerns.Although several aspect languages have demonstrated advantages in applying aspects to traditional modularization boundaries (e.g., object-oriented hierarchies), additional language concepts such as parametric polymorphism can also benefit from aspects.Many popular programming languages support parametric polymorphism (e.g., C++ templates), but the combination of aspects and generics is a topic in need of further investigation.The paper enumerates the general challenges of uniting aspects with C++ templates.It also underlines the need for new language constructs to extend AOP support to C++ templates and provides an initial solution to realize this goal.A PROGRAM TRANSFORMATION TECHNIQUE TO SUPPORT AOP WITHIN C++ TEMPLATES 144 J OURNAL OF OBJECT TECHNOLOGY V OL. 9, NO. 1Join Points are specific points of execution in a program, such as a method call, a constructor call or an object initialization.Pointcuts are a means to identify a set of join points in a program and are expressed through a predicate expression that indicates a quantification over the code base.Advice specify actions that are performed when a specific join point is matched by a given pointcut expression.Inter-type 1 declarations allows crosscutting concerns to modify the structure of modules by declaring members or parents of another class in a single aspect such that the code related to a concern can reside in the same place.