Feature-Oriented Programming: A Fresh Look at Objects

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.

[1]  Liwu Li,et al.  The Java Language , 1998 .

[2]  Jo A. Lawless,et al.  Understanding CLOS - the common LISP object system , 1991 .

[3]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[4]  Jens Palsberg,et al.  Evolution of Object Behavior Using Context Relations , 1998, IEEE Trans. Software Eng..

[5]  K. E. Cheng,et al.  Feature Interactions in Telecommunications III , 1995 .

[6]  Lodewijk Bergmans,et al.  Composing Synchronization and Real-Time Constraints , 1995, J. Parallel Distributed Comput..

[7]  Christian Prehofer From Inheritance to Feature Interaction or Composing Monads , 1997, GI Jahrestagung.

[8]  Bjarne Stroustrup,et al.  C++ Programming Language , 1986, IEEE Softw..

[9]  Randall B. Smith,et al.  SELF: The power of simplicity , 1991 .

[10]  Pamela Zave,et al.  Feature interactions and formal specifications in telecommunications , 1993, Computer.

[11]  Joachim Hans Fröhlich,et al.  Prototype of a Run-Time Adaptable, Object-Oriented System , 1996, Ershov Memorial Conference.

[12]  Christian Prehofer An Object-Oriented Approach to Feature Interaction , 1997, FIW.

[13]  Ole Lehrmann Madsen,et al.  Object-oriented programming in the BETA programming language , 1993 .

[14]  Theo D'Hondt,et al.  Nested Mixin-Methods in Agora , 1993, ECOOP.

[15]  Lynn Andrea Stein,et al.  Delegation is inheritance , 1987, OOPSLA '87.

[16]  William R. Cook,et al.  Mixin-based inheritance , 1990, OOPSLA/ECOOP '90.

[17]  Martin Odersky,et al.  Pizza into Java: translating theory into practice , 1997, POPL '97.

[18]  Mira Mezini,et al.  Dynamic Object Evolution without Name Collisions , 1997, ECOOP.

[19]  John Cowell The Java Language , 1999 .

[20]  Mira Mezini Dynamic Object Modification Without Name Collisions , 1997 .