[aspectc-user] "Reverse Inheritance"

EXTERN Sacher Dominik (Diplomand; FV/SLD) Dominik.Sacher at de.bosch.com
Wed Oct 9 12:13:38 CEST 2002


Dear All!

I try to give some classes a new Base-Class through ac++
(aka "Reverse Inheritance") as it can be seen in examples/IconCache.ah.

I like to let Objects fullfill "Roles" in a "Role-Model" (aka "Collaboration
Based Design"),
as it is introduced by Osterby et al., specified and implemented in
[Kend99a] and
in [SmarEtAl02]. To fullfill this, i have to weave "extrinsic behaviour"
([Kend99a], Chapter 1.3)
into the "business-classes". Many authors (e.g. [CzarEtAl00]) see in this a
major issue which 
can be achieved easily through AOP. This is a key-issue for my work, too.

This can only be achieved  through "public inheritance".
All my ac++ tests only generated "private inheritance",
which represents _not_ an "Is a"-relationship,
but a "Contains a"-relationship ([Stro98], P.798f).
So this is only a kind of "member-introduction" and not of "reverse
inheritance".

Is it possible to generate "real (public) reverse inheritance" -code with
ac++?
(I havenĀ“t found any comments on this in your publications!)

If not:
- for which reason you decided to generate only private inheritance?
  None of the above mentioned concepts can be acomplished through this;
  i (and Stroustrup in [Stro98], P.819 as well ;-) would prefer 
  aggregation over private inheritance.

- Are there plans to integrate "public inheritance" into the grammar?
  e.g.
  advice classes("BusinessClass") : public baseclass(Role_X); ?
  advice classes("BusinessClass") : baseclass(public Role_X); ?


Many thanks,
Dominik



--
Literature:
[Kend99a]
E.A. Kendall: Role Model Designs and Implementations with Aspect-oriented
Programming.
Position Paper OOPSLA 1999,
Departments of Computer Science and Computer Systems Engineering,
Royal Melbourne Institute of Technology 

[SmarEtAl02]
Smaragdakis, Y., and D. Batory: Mixin Layers: An Object-Oriented
Implementation 
Technique for Refinements and Collaboration-Based Designs.
ACM Transactions on Software Engineering and Methodology April 2002,
Georgia Institute of Technology,
The University of Texas at Austin

[CzarEtAl00]
Czarnecki, K. and U.W. Eisenecker: Generative Programming: Methods, Tools
and Applications.
Addison Wesley, 2000. 

[Stro98]
B. Stroustrup: Die C++ Programmiersprache.
3 aktualisierte und erweiterte Auflage, Addison-Wesley 1998 



--
Dominik Sacher
ROBERT BOSCH GmbH
Corporate Research and Development Software Technology	
Eschborner Landstr. 130-132
60489 Frankfurt

Fon +49 (69) 7909-557
Fax +49 (69) 7909-540
mailto:Dominik.Sacher at de.bosch.com





More information about the aspectc-user mailing list