Generic Advice: On the Combination of AOP with Generative Programming in AspectC++

Besides object-orientation, generic types or templates and aspect- oriented programming (AOP) gain increasing popularity as they provide addi- tional dimensions of decomposition. Most modern programming languages like Ada, Eiffel, and C++ already have built-in support for templates. For Java and C# similar extensions will be available in the near future. Even though promis- ing, the combination of aspects with generic and generative programming is still a widely unexplored field. This paper presents our extensions to the As- pectC++ language, an aspect-oriented C++ derivate. By these extensions aspects can now affect generic code and exploit the potentials of generic code and tem- plate metaprogramming in their implementations. This allows aspects to inject template metaprograms transparently into the component code. A case study demonstrates that this feature enables the development of highly expressive and efficient generic aspect implementations in AspectC++. A discussion whether these concepts are applicable in the context of other aspect-oriented language extensions like AspectJ rounds up our contribution.

[1]  Jaakko Järvi,et al.  A comparative study of language support for generic programming , 2003, OOPSLA '03.

[2]  Andrei Alexandrescu,et al.  Modern C++ design: generic programming and design patterns applied , 2001 .

[3]  Vinny Cahill,et al.  Language-independent aspect-oriented programming , 2003, OOPSLA 2003.

[4]  Magne Haveraaen,et al.  Design of the CodeBoost transformation system for domain-specific optimisation of C++ programs , 2003, Proceedings Third IEEE International Workshop on Source Code Analysis and Manipulation.

[5]  Krzysztof Czarnecki,et al.  Generative programming - methods, tools and applications , 2000 .

[6]  William G. Griswold,et al.  An Overview of AspectJ , 2001, ECOOP.

[7]  William G. Griswold,et al.  Getting started with ASPECTJ , 2001, CACM.

[8]  Languages Object-Oriented Programming Systems,et al.  OOPSLA 2002 : 17th ACM Conference on Object-oriented Programming, Systems, Languages, and Applications, conference proceedings, November 4-8, 2002, Washington State Convention and Trade Center, Seattle, Washington, USA , 2002 .

[9]  Detlef Vollmann Visibility of Join-Points in AOP and Implementation Languages , 2002 .

[10]  Gregor Kiczales,et al.  Aspect-oriented programming , 1996, CSUR.

[11]  Shigeru Chiba,et al.  A metaobject protocol for C++ , 1995, OOPSLA.

[12]  Howard Kim,et al.  AspectC#: An AOSD implementation for C# , 2002 .

[13]  Jørgen Lindskov Knudsen ECOOP 2001 — Object-Oriented Programming , 2001, Lecture Notes in Computer Science.

[14]  Andrew Kennedy,et al.  Design and implementation of generics for the .NET Common language runtime , 2001, PLDI '01.

[15]  Krzysztof Czarnecki,et al.  Generative Programming , 2001, ECOOP Workshops.

[16]  Sibylle Schupp,et al.  Semantic and behavioral library transformations , 2002, Inf. Softw. Technol..