The indexing method introduced in this section follows the general strategy outlined in Section 4.3. Each mother is inserted as an edge in the indexed chart only in positions specified by that mother's indexing scheme (which is the list of matching daughters' index keys). When completing a rule, a matching edge is searched for each daughter only in the chart entry labeled with an index key compatible with that daughter's index key.
The structure of the index can be determined at compile-time. The
first step is to create a list containing the descriptions of all
rules' mothers in the grammar. Then, for each mother description, a
list
is created, where each element of the list
represents
the rule number
and daughter position
inside rule
(
) of a category that can match with
.
For UBGs it is not possible to determine the exact list of matches
between daughters and mothers, since there are sometimes infinitely
many possible variants of daughters in a given signature. However, it
is possible to rule out MGSats of daughters that are incompatible
(with respect to unification) with a certain
before parsing.
For the 17 mothers in the grammar used for the experiments presented
in Chapter 7, the number of matching daughters
statically determined before parsing ranges from 30 (the total number
of daughters in the grammar) to 2. This compromise pays off with its
simplicity, which is reflected in the time spent managing the index.
During run-time, each time an edge (representing a rule's mother) is
added to the chart, its category is inserted into the corresponding
hash entries associated with the positions
from the list
(the number of entries where
is inserted is equal
to the cardinality of
). The entry associated to the key
will contain only categories (based on
)
that can possibly unify with the daughter at position
in
the grammar.
It should be mentioned at this point that only daughters
with
are searched for in the chart (and consequently, indexed). As
described in Section 4.1.3, whenever an edge is added
to the chart, all rules are visited in a failure-driven loop. The
rules of which the first (leftmost) daughter unifies with the edge are
then traversed left to right, starting with the second daughter.