AOSD Conference   Printable view   
Program Overview
Technical Program
Student Extravaganza
Social Events
Technical Papers
Practitioner Reports
Student Extravaganza
Places to Eat
Internet Access
Lancaster & Lake District Photos

T6: Aspect-Oriented Programming with C++ and AspectC++

Date Tuesday, March 23, 2004, afternoon (half day)
Presenters Olaf Spinczyk, Friedrich-Alexander-Universität Erlangen-Nürnberg
Andreas Gal, University of California, Irvine
Daniel Lohmann, Friedrich-Alexander-Universität Erlangen-Nürnberg
Level Introductory: Attendees should be familiar with C++. Prior experience with aspect-oriented programming is helpful, but not required.


Aspect-oriented programming (AOP) with C++ does not necessarily require a language extension like AspectJ for Java. The C++ community has already developed a rich set of idioms, generally based on templates, to support the modular implementation of many crosscutting concerns. Although these techniques are powerful, they also have important limitations in terms of applicability and usability.

The first part of this tutorial will present the idioms available for AOP in standard C++. We will describe and give examples of these techniques, and in addition, we will explore the limitations and drawbacks of these approaches. Participants will learn to recognize when standard C++ patterns are adequate and when dedicated AOSD tools and language extensions should be preferred.

The second part of the tutorial will concentrate on AspectC++, an extension to C++ that provides more powerful and usable constructs for modularizing the implementation of crosscutting concerns in C++ programs. In AspectC++, programmers can define and apply aspects to existing component code without making changes to that code base. Tutorial attendees will learn the AspectC++ language elements and see how they are applied in various examples. The tutorial will then focus on using AspectC++ within popular development environments such as Visual Studio and Eclipse. The tutorial will conclude with the presentation of a more complex "real-world" application that highlights AspectC++ as a powerful language for the development of embedded software product lines.

A compiler for AspectC++, which transforms AspectC++ code into standard C++, is freely available at


Olaf Spinczyk has been doing research in applying aspect-oriented programming to operating systems for more than five years. In 2002, he received the "best dissertation of 2002" award from the computer science faculty of the University of Magdeburg, Germany, for his work in this field and was a candidate for the dissertation award by the German Computer Science Society (GI). In 2001, with Andreas Gal, Olaf started the development of AspectC++ and the compiler, ac++. In 2002, he started to cooperate with pure-systems GmbH in Magdeburg, Germany, to speed up ac++ development and evolve the compiler from a research prototype to a commercial product. Today, Olaf is the main designer and developer of the ac++ weaver.

Andreas Gal received his BS in Computer Information Systems from the University of Wisconsin in 2000 and completed his MS in Computer Science at the University of Magdeburg, Germany, in 2001. He worked as research assistant at the University of Magdeburg, Germany, and the University of Erlangen-Nürnberg, Germany. Currently, he is a PhD student and graduate student researcher at the University of California, Irvine. Andreas is member of the ACM.

Daniel Lohmann worked as software developer, consultant, and trainer for several years. He finished his Diploma in Computer Science in 2002. His PhD research is on the development of aspect-oriented operating system product-lines. Since joining the University of Erlangen-Nürnberg, he has actively participated in the AspectC++ language design and compiler development. His main focus is the combination of aspects with generic code.

Edited by the AOSD Conference Committee.  Send comments to: