previous up contents next
Left: Local inheritance Up: Inheritance in DATR Right: Definition by default

Global inheritance

  Like local inheritance, global inheritance comes in three types: node, path, and node/path pair. However, when either the node or the path is omitted from a global inheritance descriptor, rather than using the node or path of the left-hand-side of the statement it is contained in (the local context of the definition), the values of a global context are used instead. This behaviour is perhaps also more easily introduced procedurally rather than declaratively. As we saw above, we can think of local inheritance in terms of following descriptors starting from the query. The local context is initially set to the node and path specified in the query, and when a local descriptor is encountered, any missing node or path components are filled in from the local context, and then control passes to the new context created (that is, we look at the definition associated with the new node/path pair). In doing this, the local context also changes to be the new context. Global inheritance operates in exactly the same way: the global context is initially set to the node and path specified in the query. It is not altered when local inheritance descriptors are followed (so it ``remembers'' where we started from), but when a global descriptor is encountered, it is the global context that is used to fill in any missing node or path components in the descriptor, and hence to decide where to pass control to. In addition, both global and local contexts are updated to the new settings. So global inheritance can be seen as essentially the same mechanism as local inheritance, but layered on top of it - following global links alters the local context too, but not vice versa.

For example, when a global path is specified, it effectively ``returns control'' to the current global node (often the original query node) but with the newly given path. Thus in Section 2, above, we saw that the node VERB defines the default morphology of present forms using global inheritance from the path for the morphological root:

    VERB:<mor present> == "<mor root>".
The node from which inheritance occurs is that stored in the global context. So a query of Love:<mor present> will result in inheritance from Love:<mor root> (via VERB:<mor present>), while a query of Do:<mor present> will inherit from Do:<mor root>.

Similarly, a quoted node form accesses the globally stored path value, as in the following example:

        <vocative> == -a
        <accusative> == -am.
        <vocative> == "Declension1"
        <accusative> == -um.
        <vocative> == -e
        <accusative> == Declension2:<vocative>.
Here, the value of Declension3:<accusative> inherits from Declension2:<vocative> and then from Declension1:< accusative>, using the global path (in this case the query path), rather than the local path (<vocative>) to fill out the specification. So the resulting value is -am and not -a as it would have been if the descriptor in Declension2 had been local rather than global.

We observed above that when inheritance through a global descriptor occurs, the global context is altered to reflect the new node/path pair. Thus after Love:<mor present> has inherited through "VERB:<mor root>", the global path will be <mor root> rather than <mor present>. When we consider quoted node/path pairs, it turns out that this is the only property that makes them useful. Since a quoted node/path pair completely respecifies both node and path, its immediate inheritance characteristics are the same as the unquoted node/path pair. However, because it also alters the global context, its effect on any subsequent global descriptors (in the evaluation of the same query) will be different:

        <vocative> == "<nominative>"
        <nominative> == -a.
        <vocative> == Declension1
        <nominative> == -u.
        <nominative> == -i
        <accusative> == "Declension2:<vocative>".
In this example, the value of Declension3:<accusative> inherits from Declension2: <vocative> and then from Declension1:<vocative> and then from Declension2: <nominative> (because the global node has changed from Declension3 to Declension2) giving a value of -u and not -i as it would have been if the descriptor in Declension3 had been local rather than global.

There are a number of ways of understanding this global inheritance mechanism. The description we have given above amounts to a ``global memory'' model, in which a DATR query evaluator is a machine equipped with two memories: one containing the current local node and path, and another containing the current global node and path. Both are initialised to the query node and path, and the machine operates by repeatedly examining the definition associated with the current local settings. Local descriptors alter just the local memory, while global descriptors alter both the local and global settings.

This model is the basis of at least one implementation of DATR but it is not, of course, declarative. Nevertheless, the notion of global inheritance does have a declarative reading, very similar to local inheritance but, as we have already suggested, layered on top of it. Recall that local inheritance establishes a network of weak equality relationships among node/path pairs, and these equalities are used to distribute values across this network. As we mentioned above, formally speaking the local inheritance network controls the distribution not only of simple values, but of global descriptors as well. That is, to local inheritance, values and global descriptors are one and the same, and are inherited through the network. Indeed, this is the intuitive warrant for the use of the quote notation: the quotes turn an inheritance descriptor into a (kind of) value. Consequently, global descriptors are also distributed through the local inheritance network, and so are implicitly present at many node/path pairs in addition to those they are explicitly defined for. In fact, a global descriptor is implicitly present at every node/path pair which could ever occur as the global context for evaluation of the descriptor at its original explicitly defined location. This means that once distributed like this, the global descriptors form a network of weak equality relationships just like the local descriptors, and distribute the simple values (alone) in just the same way.

To see this interpretation in action, we consider an alternative analysis of the past participle form of Come. The essential elements of the analysis are as follows:

        <mor past participle> == "<mor root>".
        <mor root> == come
        <mor past participle> == BARE_VERB.
Local inheritance from BARE_VERB to Come implicitly defines the following statement (in addition to the above):
         <mor past participle> == "<mor root>".
Because we have now brought the global inheritance descriptor to the node corresponding to the global context for its interpretation, global inheritance can now operate entirely locally - the required global node is the local node, Come, producing the desired result:
         <mor past participle> = come.

Notice that, in this last example, the final statement was extensional, not definitional. So far in this document we have almost entirely ignored the distinction we established between definitional and extensional statements, but with this declarative reading of global inheritance we can do so no longer. Local inheritance uses definitional inheritance statements to distribute simple values and global descriptors. The simple-valued definitional statements thereby defined map directly to extensional statements, and global inheritance uses the global inheritance statements (now distributed), to further distribute these extensional statements about simple values. The statements have to be of a formally distinct type, to prevent local inheritance descriptors from distributing them still further. In practice, however, we need not be too concerned about the distinction: descriptions are written as definitional statements, queries are read off as extensional statements.

The declarative interpretation of global inheritance suggests an alternative procedural characterisation to the one already discussed, which we outline as follows. Starting from a query, local descriptors alone are used to determine either a value or a global descriptor associated with the queried node/path pair. If the result is a global descriptor, this is used to construct a new query, which is evaluated in the same way. The process repeats until a value is returned. The difference between this and the earlier model is really just one of perspective. When a global descriptor is encountered one can either bring the global context to the current evaluation context (first model), or take the new descriptor back to the global context and continue from there (second model). The significance of the latter approach is that it reduces both kinds of inheritance to a single basic operation which has a straightforward declarative interpretation. Thus we see that DATR contains two instances of essentially the same declarative inheritance mechanism. The first, local inheritance, is always specified explicitly, while the second, global inheritance, is specified implicitly in terms of the first.

Extending these inheritance mechanisms to the more complex DATR expressions is straightforward. Descriptors nested within definitional expressions are treated independently -- as though each was the entire value definition rather than just an item in a sequence. In particular, global descriptors which alter the global context in one nested definition have no effect on any others. Each descriptor in a definitional sequence or evaluable path is evaluated from the same global state. In the case of global evaluable paths, once the subexpressions have been evaluated, the expression containing the resultant path is also evaluated from the same global state.


previous up contents next
Left: Local inheritance Up: Inheritance in DATR Right: Definition by default
Copyright © Roger Evans, Gerald Gazdar & Bill Keller, Tuesday 10 November 1998