[User's Manual]
It has been shown (Aït-Kaci, 1989) that partially ordered types
can be represented in the form of a bit-vector encoding.
We can use the th row of
to encode the type
, with
unification corresponding to a bit-wise AND. For instance, the
subsumption matrix of the type hierarchy in
Figure 3.1 is given in
Figure 3.2. The AND of the rows for
and
yields
the row
, for example.
In practice, however, we do not initially have access to this
information and we need to compute that. What we do have access to is
the immediate subsumption relation that is specified in type
subsumption declarations, with reflexive transitive closure being
implicit. We can build a base subsumption matrix, , in the same
way, by using the immediate subsumption relation. The question is then
how to obtain
from
quickly. The base subsumption matrix in
Figure 3.2 is given in
Figure 3.3.
One way to achieve this is a reflexive-transitive closure, by directly
filling in the diagonal of with 1s (reflexive) and multiplying the
result by itself until it reaches a fixed point,
(transitive).
This fixed point is reached after no more than
iterations.