rowley@bath.cs.ucla.edu (Michael T Rowley) (02/22/90)
I have been looking into questions of multiple inheritance, especially with regard to repeated inheritance. In eiffel a feature may be renamed along one of the inheritance paths, giving the descendant two features inherited from the same ancestor. (See FRANCE_US_DIVER on p.276 of OOSC). If the feature is not renamed, the descendent gets only one feature. It seems that the use of renaming would break the conformance rule (on p.262). The problem arises with a variable declared as the ancestor type (A). It should be possible to assign to this variable objects of any of its descendent types. But if a feature (f) was renamed on both paths to the descendent (D), then what does A.f mean. The conformance rule would claim that the assignment of A = D is valid, and therefore it should be possible to use the features of A. But, clearly this is ambiguous. Should the conformance rule specify that an object does not conform to an ancestral type from which it inherits at least one of the ancestor's features under two different names?
sakkinen@tukki.jyu.fi (Markku Sakkinen) (02/22/90)
In article <32149@shemp.CS.UCLA.EDU> rowley@cs.ucla.edu writes: >I have been looking into questions of multiple inheritance, especially >with regard to repeated inheritance. In eiffel a feature may be >renamed along one of the inheritance paths, giving the descendant two >features inherited from the same ancestor. (See FRANCE_US_DIVER on >p.276 of OOSC). If the feature is not renamed, the descendent gets >only one feature. It seems that the use of renaming would break the >conformance rule (on p.262). > ... Similar problems were last discussed in this group last autumn, I think. The points you make are important and valid. If a plug is allowed (again), I happened to analyse exactly this example in my paper at ECOOP'89. Look in the proceedings if you can get them or contact me for details. Markku Sakkinen Department of Computer Science University of Jyvaskyla (a's with umlauts) Seminaarinkatu 15 SF-40100 Jyvaskyla (umlauts again) Finland SAKKINEN@FINJYU.bitnet (alternative network address)