Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: viewpoints and multiple inheritance.




> ... A polygon is a good illustration of a "virtual base class".  In this
> illustration, a polygon might have methods "calculate_area" and
> "render_image" because every polygon has these features.  However, the
> "calculate_area" method can only be invoked once it is "derived" (via
> inheritance).  If BC is a polygon, Class_1 is a triangle, and Class_2 is a
> square, and Class_3 is multiply inherited from Class_1 and Class_2, then
> what is the meaning of "calculate_area"?  All four classes have different
> meanings of "calculate_area": BC (yet to be specified), Class_1 (triangle),
> Class_2 (square), Class_3 (conflicting definitions).
> 
> The notion of multiple inheritance (1) only works well on a small scale, and
> (2) only with base concepts (or classes) from taxonomies that are orthogonal
> (independent).  In other words, our desire for "multiple inheritance" makes
> us dependent on defining orthogonal taxonomies ... which itself is a
> difficult/impossible task.  I suggest that we avoid multiple inheritance
> because the semantics (its meaning, as defined by interoperability
> standards) are very difficult to define. ...

Multiple inheritance works just fine if you have reasonable semantics
for inheritance (e.g., no exceptions) and moreover, the semantics can
be easily defined.

In your example, do you really intend Class_3 to
be those things which are both a square and a triangle? And if it
is, wouldn't you expect the definition to be incoherent.  A reasonable
ontology language would, of course, be able to detect and report this
incoherence since the attached attributes would be declarative.

--
 Tim Finin, Prof Computer Science & Elect. Eng, Director Inst. for Global
 Electronic Commerce, U. of Maryland Baltimore County, 1000 Hilltop, Balt
 MD 21250. finin@umbc.edu*410-455-3522*fax:-3969*http://umbc.edu/~finin/