FeatureC++: On the Symbiosis of Feature-Oriented and Aspect-Oriented Programming

  • Sven Apel
  • Thomas Leich
  • Marko Rosenmüller
  • Gunter Saake
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3676)


This paper presents FeatureC++, a novel language extension to C++ that supports Feature-Oriented Programming (FOP) and Aspect-Oriented Programming (AOP). Besides well-known concepts of FOP languages, FeatureC++ contributes several novel FOP language features, in particular multiple inheritance and templates for generic programming. Furthermore, FeatureC++ solves several problems regarding incremental software development by adopting AOP concepts. Starting our considerations on solving these problems, we give a summary of drawbacks and weaknesses of current FOP languages in expressing incremental refinements. Specifically, we outline five key problems and present three approaches to solve them: Multi Mixins, Aspectual Mixin Layers, and Aspectual Mixins that adopt AOP concepts in different ways. We use FeatureC++ as a representative FOP language to explain these three approaches. Finally, we present a case study to clarify the benefits of FeatureC++ and its AOP extensions.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Apel, S., Böhm, K.: Towards the Development of Ubiquitous Middleware Product Lines. In: Gschwind, T., Mascolo, C. (eds.) SEM 2004. LNCS, vol. 3437, pp. 137–153. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  2. 2.
    Apel, S., et al.: FeatureC++: Feature-Oriented and Aspect-Oriented Programming in C++. Technical report, Department of Computer Science, Otto-von-Guericke University, Magdeburg, Germany (2005)Google Scholar
  3. 3.
    Batory, D., et al.: Creating Reference Architectures: An Example from Avionics. In: Symposium on Software Reusability (1995)Google Scholar
  4. 4.
    Batory, D., Liu, J., Sarvela, J.N.: Refinements and Multi-Dimensional Separation of Concerns. In: ACM SIGSOFT (2003)Google Scholar
  5. 5.
    Batory, D., Sarvela, J.N., Rauschmayer, A.: Scaling Step-Wise Refinement. IEEE TSE 30(6) (2004)Google Scholar
  6. 6.
    Batory, D., Thomas, J.: P2: A Lightweight DBMS Generator. Journal of Intelligent Information Systems 9(2) (1997)Google Scholar
  7. 7.
    Cardone, R., et al.: Using Mixins to Build Flexible Widgets. In: AOSD (2002)Google Scholar
  8. 8.
    Cardone, R., Lin, C.: Comparing Frameworks and Layered Refinement. In: ICSE (2001)Google Scholar
  9. 9.
    Colyer, A., Clement, A.: Large-Scale AOSD for Middleware. In: AOSD (2004)Google Scholar
  10. 10.
    Colyer, A., Rashid, A., Blair, G.: On the Separation of Concerns in Program Families. Technical report, Computing Department, Lancaster University (2004)Google Scholar
  11. 11.
    Czarnecki, K., Eisenecker, U.: Generative Programming: Methods, Tools, and Applications. Addison-Wesley, Reading (2000)Google Scholar
  12. 12.
    Dijkstra, E.W.: A Discipline of Programming. Prentice-Hall, Englewood Cliffs (1976)MATHGoogle Scholar
  13. 13.
    Eisenecker, U.W., Blinn, F., Czarnecki, K.: A Solution to the Constructor-Problem of Mixin-Based Programming in C++. In: Workshop on C++ Template Programming (2000)Google Scholar
  14. 14.
    Findler, R., Flatt, M.: Modular Object-Oriented Programming with Units and Mixins. In: ICFP (1998)Google Scholar
  15. 15.
    Kendall, E.A.: Role Model Designs and Implementations with Aspect-Oriented Programming. In: OOPSLA (1999)Google Scholar
  16. 16.
    Kiczales, G., et al.: Aspect-Oriented Programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  17. 17.
    Laddad, R.: AspectJ in Action – Practical Aspect-Oriented Programming. Manning Publication Co. (2003)Google Scholar
  18. 18.
    Lieberherr, K.: Controlling the Complexity of Software Designs. In: ICSE (2004)Google Scholar
  19. 19.
    Lieberherr, K., Lorenz, D.H., Ovlinger, J.: Aspectual Collaborations: Combining Modules and Aspects. The Computer Journal (Special issue on AOP), 46(5) (2003)Google Scholar
  20. 20.
    Lopez-Herrejon, R., Batory, D., Cook, W.: Evaluating Support for Features in Advanced Modularization Technologies. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 169–194. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  21. 21.
    Lopez-Herrejon, R.E., Batory, D.: Improving Incremental Development in AspectJ by Bounding Quantification. In: Software Engineering Properties and Languages for Aspect Technologies (2005)Google Scholar
  22. 22.
    Loughran, N., et al.: Supporting Product Line Evolution with Framed Aspects. In: AOSD ACP4IS Workshop (2004)Google Scholar
  23. 23.
    McDirmid, S., Hsieh, W.: Aspect-Oriented Programming in Jiazzi. In: AOSD (2003)Google Scholar
  24. 24.
    Mezini, M., Ostermann, K.: Variability Management with Feature-Oriented Programming and Aspects. In: ACM SIGSOFT (2004)Google Scholar
  25. 25.
    Ostermann, K.: Dynamically Composable Collaborations with Delegation Layers. In: Magnusson, B. (ed.) ECOOP 2002. LNCS, vol. 2374, p. 89. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  26. 26.
    Ostermann, K., Mezini, M., Bockisch, C.: Expressive Pointcuts for Increased Modularity. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 214–240. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  27. 27.
    Parnas, D.L.: Designing Software for Ease of Extension and Contraction. IEEE TSE SE-5(2) (1979)Google Scholar
  28. 28.
    Rajan, H., Sullivan, K.J.: Classpects: Unifying Aspect- and Object-Oriented Language Design. In: ICSE (2005)Google Scholar
  29. 29.
    Singhal, V., Batory, D.: P++: A Language for Large-Scale Reusable Software Components. In: Workshop on Software Reuse (1993)Google Scholar
  30. 30.
    Smaragdakis, Y., Batory, D.: Mixin-Based Programming in C++. In: Butler, G., Jarzabek, S. (eds.) GCSE 2000. LNCS, vol. 2177, p. 163. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  31. 31.
    Smaragdakis, Y., Batory, D.: Mixin Layers: An Object-Oriented Implementation Technique for Refinements and Collaboration-Based Designs. In: ACM TOSEM, vol. 11(2) (2002)Google Scholar
  32. 32.
    Tarr, P., et al.: N Degrees of Separation: Multi-Dimensional Separation of Concerns. In: ICSE (1999)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Sven Apel
    • 1
  • Thomas Leich
    • 1
  • Marko Rosenmüller
    • 1
  • Gunter Saake
    • 1
  1. 1.Department of Computer ScienceUniversity of MagdeburgGermany

Personalised recommendations