...Or what should/gets inherited/transferred/made available when we Generalize a Class (from descendant to ancestor) or Realize a Interface/Class(from specification to instance - although the link is drawn from instance to specification).
As a result of a request from Alexander, I'm opening a thread to discuss these topics.
The starting point is the agreement that Alexander and I have that normal "inheritance" should be modelled as Generalization and that the instantiation of a specification should be modelled by a Realization.
When we use the Generalization relation, EA
conveniently provides a number of (optional) services to us, the modellers:
You can view the names of the immediate parents of the Class (if they are off diagram - but you can't as yet list the entire ancestry)
You can view the inherited Features, attributes and operations, (with some, though not complete indication of Feature override).
These services appear to work pretty well for multiple inheritance but do not allow you to handle the full range of issues concerned with multiple inheritance (such as those identified in Chapters 14 & 15 of
Object-Oriented Software Construction by Bertrand Meyer).
When you actually attach the Generalization, EA will copy (not inherit) the stereotype of (one of) the multiple immediate parents.
I haven't done a lot of round-trip engineering with EA (since I've taken an alternate path and my principle concern at present is the generation of conceptual models) however, I did to enough to discern that if you create a Realization link, and forward engineer and then reverse engineer, then EA will remove the Realization link on import and replace it with a Generalization link.
The reason is that on forward engineer, EA creates what appears to be an inheritance and, naturally, on import can't distinguish between them.
So that's enough to kick off the discussion...
Some questions to consider:
What is the essential difference between the Generalization and Realization relationships? I think, but it's not a well formed thought as yet, that there are many similarities and some distinct differences between the two relationships.
Assuming we can come to agreement on these similarities/differences, what should EA display (provide via API) when we make that kind of linkage between two classes.
In addition to the "inheritance" of Features, should other properties of the ancestor Class (IsSpecification, Stereotypes, Tagged Values etc) should also be made available (in one way or another) to the descendant class.
Finally, what is the relationship between a Parameterized Class (the closest EA currently gets to a full UML 2 Template) and the instantiated (bound) Class therefrom.
For the purposes of this discussion, I'd recommend using the UML 2
Superstructure Specification as the normative reference.
Let the games begin...
Paolo