[Uml-devel] ambiguity

Jonathan Riddell jr at jriddell.org
Wed Jan 15 17:08:17 UTC 2003


> hey, does anybody know anything about disambiguating the "OO circle of death"
> inheritance problem? as i go thru the MOF implementation i'm finding a couple
> of instances of multiple inheritance that make the inheritance tree cyclic.
> for example (this isn't quite right, but its enough to illustrate the point):
>
> class ModelElement;
> class TypedElement : public ModelElement;
> class DataType : public ModelElement;
> class AliasType : public DataType, public TypedElement;
>
> if you can imagine a UML diagram of this, you'd end up with a cyclic graph -
> the dreaded circle of death? unfortunately, i don't see any way around this
> in our implementation.
>
> actually, this isn't really a problem until you instantiate AliasType and
> return a reference to ModelElement. because of the multiple inheritance,
> ModelElement appears twice in the supertype list of AliasType. so, returning
> a reference to ModelElement is ambiguous.

Surely this is up to the language to sort out, and it would be slightly
different depending on the rules of the language.  But I don't see why UML
should have a problem with it.

Jonathan Riddell






More information about the umbrello-devel mailing list