This is what was proposed in A1(force type index of all the sub-classes to be in a range)
Hmmm…While euler tour of tree exactly means “force some index to be contiguous within a tree”, I am not saying that is type index. What I am trying to say is that we can map those immutable type_index to a mutable index using an array called euler_order_range
.
In other words, we allow type_index
to be arbitrary, but enforce $euler_order_range(type_index(child)) \subseteq euler_order_range(type_index(parent))$
, where euler_order_range
can be implemented as a global array. Every time after we load a new module, we can re-calculate this array.
Is that this solution much like A2?