Feature-oriented programming: A fresh look at objects

  • Christian Prehofer
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1241)


We propose a new model for flexible composition of objects from a set of features. Features are similar to (abstract) subclasses, but only provide the core functionality of a (sub)class. Overwriting other methods is viewed as resolving feature interactions and is specified separately for two features at a time. This programming model allows to compose features (almost) freely in a way which generalizes inheritance and aggregation. For a set of n features, an exponential number of different feature combinations is possible, assuming a quadratic number of interaction resolutions. We present the feature model as an extension of Java and give two translations to Java, one via inheritance and the other via aggregation. We further discuss parameterized features, which work nicely with our feature model and can be translated into Pizza, an extension of Java.


Interaction Resolution Feature Combination Class Hierarchy Core Functionality Instance Variable 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Lodewijk Bergmans and Mehmet Akşit. Composing synchronization and real-time constraints. Journal of Parallel and Distributed Computing, 36(1):32–52, 10 July 1996.CrossRefGoogle Scholar
  2. 2.
    Gilad Bracha and William Cook. Mixin-based inheritance. ACM SIGPLAN Notices, 25(10):303–311, October 1990. OOPSLA ECOOP '90 Proceedings, N. Meyrowitz (editor).CrossRefGoogle Scholar
  3. 3.
    K. E. Cheng and T. Ohta, editors. Feature Interactions in Telecommunications III. IOS Press, Tokyo, Japan, Oct 1995.Google Scholar
  4. 4.
    H. J. Fröhlich. Prototype of a run-time adaptable object-oriented system. In PSI '96 (Perspectives of System Informatics), Akademgorodok, 1996. Springer-LNCS.Google Scholar
  5. 5.
    E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Micro-Architectures for Reusable Object-Oriented Design. Addison Wesley, Reading, MA, 1994.Google Scholar
  6. 6.
    James Gosling, Bill Joy, and Guy Steele. The Java Language Specification. Addison-Wesley, September 1996.Google Scholar
  7. 7.
    R. E. Johnson and J. M. Zweig. Delegation in C++. J. of Object-Oriented Programming, 4(3), November 1991.Google Scholar
  8. 8.
    Jo A. Lawless and M. Molly. Understanding CLOS: the Common LISP object system. Digital Press, Nashua, NH, 1991.Google Scholar
  9. 9.
    Ole Lehrmann Madsen, Birger Moller-Pedersen, and Kristen Nygaard. Object-Oriented Programming in the BETA Programming Language. Addison-Wesley, Reading, 1993.Google Scholar
  10. 10.
    Mira Mezini. Dynamic object modification without name collisions. In this volume, 1997.Google Scholar
  11. 11.
    Martin Odersky and Philip Wadler. Pizza into Java: Translating theory into practice. In Proc. 24th ACM Symposium on Principles of Programming Languages, January 1997.Google Scholar
  12. 12.
    W. F. Opdyke and R. J. Johnson. Refactoring: An Aid in Designing Application Frameworks. In Proceedings of the Symposium on Object-Oriented Programming emphasizing Practical Applications. ACM-SIGPLAN, September 1990.Google Scholar
  13. 13.
    Christian Prehofer. From inheritance to feature interaction. In Max Mühlhäuser et al., editor, Special Issues in Object-Oriented Programming. ECOOP 1996 Workshop on Composability Issues in Object-Orientation, Heidelberg, 1997. dpunkt-Verlag.Google Scholar
  14. 14.
    Christian Prehofer. From inheritance to feature interaction or composing monads. Technical report, TU München, 1997. to appear.Google Scholar
  15. 15.
    Christian Prehofer. An object-oriented approach to feature interaction. In Fourth IEEE Workshop on Feature Interactions in Telecommunications networks and distributed systems, 1997. to appear.Google Scholar
  16. 16.
    Linda M. Seiter, Jens Palsberg, and Karl J. Lieberherr. Evolution of object behavior using context relations. In David Garlan, editor, Symposium on Foundations of Software Engineering, San Francisco, 1996. ACM Press.Google Scholar
  17. 17.
    Lynn A. Stein. Delegation is inheritance. ACM SIGPLAN Notices, 22(12):138–146, December 1987.MathSciNetCrossRefGoogle Scholar
  18. 18.
    Patrick Steyaert, Wim Codenie, Theo D'Hondt, Koen De Hondt, Carine Lucas, and Marc Van Limberghen. Nested Mixin-Methods in Agora. In O. Nierstrasz, editor, Proceedings of the ECOOP '93 European Conference on Object-oriented Programming, LNCS 707, Kaiserslautern, Germany, July 1993. Springer-Verlag.Google Scholar
  19. 19.
    B. Stroustrup. The C++ Programming Language. Addison-Wesley, Reading, 1991. 2nd edition.Google Scholar
  20. 20.
    David Ungar and Randall B. Smith. Self: The power of simplicity. Lisp and symbolic computation, 3(3), 1991.Google Scholar
  21. 21.
    P. Zave. Feature interactions and formal specifications in telecommunications. IEEE Computer, XXVI(8), August 1993.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1997

Authors and Affiliations

  • Christian Prehofer
    • 1
  1. 1.Institut für InformatikTechnische Universität MünchenMünchenGermany

Personalised recommendations