Skip to main content

Feature-oriented programming: A fresh look at objects

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1241))

Abstract

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.

This is a preview of subscription content, log in via an institution.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  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.

    Article  Google Scholar 

  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).

    Article  Google Scholar 

  3. K. E. Cheng and T. Ohta, editors. Feature Interactions in Telecommunications III. IOS Press, Tokyo, Japan, Oct 1995.

    Google Scholar 

  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. 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. James Gosling, Bill Joy, and Guy Steele. The Java Language Specification. Addison-Wesley, September 1996.

    Google Scholar 

  7. R. E. Johnson and J. M. Zweig. Delegation in C++. J. of Object-Oriented Programming, 4(3), November 1991.

    Google Scholar 

  8. Jo A. Lawless and M. Molly. Understanding CLOS: the Common LISP object system. Digital Press, Nashua, NH, 1991.

    Google Scholar 

  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. Mira Mezini. Dynamic object modification without name collisions. In this volume, 1997.

    Google Scholar 

  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. 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. 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. Christian Prehofer. From inheritance to feature interaction or composing monads. Technical report, TU München, 1997. to appear.

    Google Scholar 

  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. 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. Lynn A. Stein. Delegation is inheritance. ACM SIGPLAN Notices, 22(12):138–146, December 1987.

    Article  MathSciNet  Google Scholar 

  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. B. Stroustrup. The C++ Programming Language. Addison-Wesley, Reading, 1991. 2nd edition.

    Google Scholar 

  20. David Ungar and Randall B. Smith. Self: The power of simplicity. Lisp and symbolic computation, 3(3), 1991.

    Google Scholar 

  21. P. Zave. Feature interactions and formal specifications in telecommunications. IEEE Computer, XXVI(8), August 1993.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Mehmet Akşit Satoshi Matsuoka

Rights and permissions

Reprints and permissions

Copyright information

© 1997 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Prehofer, C. (1997). Feature-oriented programming: A fresh look at objects. In: Akşit, M., Matsuoka, S. (eds) ECOOP'97 — Object-Oriented Programming. ECOOP 1997. Lecture Notes in Computer Science, vol 1241. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0053389

Download citation

  • DOI: https://doi.org/10.1007/BFb0053389

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-63089-0

  • Online ISBN: 978-3-540-69127-3

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics