[developers] Finding the minimal type for which a feature is declared
Emily M. Bender
ebender at u.washington.edu
Thu Apr 7 23:54:54 CEST 2005
What I had done (having missed that a) maximal-type-of-list already
existed and b) the maximal types for individual features are cached)
was to walk the type hierarchy looking for the first type for which
the feature in question was appropriate and which had no ancestors for
which the feature was also appropriate. I was keeping track of where
I'd been, of course, but it would be faster to have just one list to
search through where the first type for which the features were
appropriate was also the maximal type (saving the ancestors check). I
suppose it's possible that that strategy using the topological order
might be faster than what's currently there, but I was only expecting
it to be faster than what I was doing.
I see that maximal-type-of-list is called by find-type-of-fs
and thus is used in make-well-formed. Is it worth experimenting
to see if this speeds up overall processing time?
Out of curiosity, what's the l in ltype for?
On Thu, Apr 07, 2005 at 10:43:25PM +0100, Ann Copestake wrote:
> type-ancestors (now called ltype-ancestors) stores a list of all
> supertypes of a given type. This is what's used for checking
> whether one type is a subtype of the other (see fns in
> main/types.lsp). I can't quite see the circumstances under which it
> would be better to store a single list. The maximum types for
> individual features are cached - I can imagine that there are faster
> implementations of maximal-type-of-list, which proceeds by doing
> successive binary glb calculations on the maximal types for each
> feature, but the glb calculations are very optimised and I doubt the
> time taken is very significant.
More information about the developers