Algorithm-C3 - Re: There is no description about what inheritance trees are compatible with C3

Posted on Sun Jun 15 23:18:16 2008 by blblack in response to 8084 (See the whole thread of 4)
Re: There is no description about what inheritance trees are compatible with C3

Hmm I should add that although rarer, I think you can generate an invalid hierarchy via making it impossible to simultaneously satisfy both monotonicity and local precedence order at the same time. Example:

C isa (D, E) B isa (C, D, E) IF A isa (B, C), A's C3 lin is ABCDE IF A isa (C, B), A's C3 lin is invalid

The issue in the second case is that C3 gaurantees preservation of local precedence order (in other words, the ordering of @ISA won't be violated), so C3 requires on the one hand that C come before B due to the local precedence in A's @ISA, but due to B inheriting C this would violate monotonicity. (CB at the start of A's linearization vs BC at the start of B's linearizaton).

Write a response