Epistemology for Software Representations

[Next] [Previous] [Top]


4 Spanning Objects

A slightly more powerful second order extension to frame-based knowledge representation languages has been proposed [Welty and Ferrucci, 1994], and will eventually be available as an extension to Classic. This extension delves a little deeper into second order representation, allowing for some inferences, though still under tight control.

This extension, briefly, identifies first order predicates, that can themselves be predicated, as special objects called spanning objects. They are given this name because the representation is divided into two (or more) universes of discourse. One universe contains the spanning object as an instance, the other contains the spanning object as a class. The object spans these two universes through a mapping function that defines only the relationship between the two parts of the object. The mapping function can be set up e.g. to change the class in the one universe when the instance in the other universe changes.

Computational problems are avoided with this approach by separating the objects that interact at the same level into distinct universes. No links are allowed between universes other than between the two parts of a spanning object via the mapping function.

4.1 Integrating Models Revisited

Spanning objects fully account for the problems of integrating the domain and code models. Instances of data-type and function (as well as a few others) are spanning objects which span the two universes representing the code and domain models, as shown in Figure 4. The mapping functions insure that the domain model classes accurately reflect their corresponding code model instances.

Considering the view in Figure 4, it may seem that a first order solution could be achieved by making group and mail-message subclasses of the class data-type, rather than instances. There are several reasons why this will not work.

First of all, recall that in Section 2.3 it was stated that classes can not have links in a first order representation. Figure 3 shows the representation of a program as a set of instances, and the purpose of this representation was to allow inference that could assist a maintainer in understanding the program. If group and mail-message were classes rather than instances, the links shown and thus the inference would not be possible.

Second of all, group and mail-message are simply not subclasses of data-type. If there were, then by superclass inheritance their instances would also be instances of data-type. Clearly a mail message or a group like those shown in Figure 4, are not data-types.

4.2 Epistemology

The reason representing software requires a facility like spanning objects is that it is a domain of second order concepts. When we attempt to represent the constructs used by programmers to write programs, we are representing a representation language. Programming languages are representation languages, whether or not they are particularly good at it.

Another example of this kind of higher order concept in Computer Science is the notion of a grammar. We can think of a grammar as a class that has some subclasses, such as context-free grammar or regular grammar, etc., which describe the nature of these grammars in general. An instance of context-free grammars is the grammar for the language Pascal. This grammar can also be thought of as a description of how all Pascal programs are constructed, and each Pascal program is an instance of the grammar. A Pascal program is itself a description of some general computational behavior, which can be instantiated on some set of data. If each execution of the program is considered an instance of the program, the grammar concept becomes third order.

One feature of the spanning object facility is that it can be used to span arbitrary numbers of universes, in essence spanning objects can handle third order representations. Combinatorial explosion based on the number of universes does result if the instance part of a spanning object is an instance of the class part of another spanning object, although in practise really useful representations beyond three layers are hard to come by.


Epistemology for Software Representations - 01 MAY 95
[Next] [Previous] [Top]

Generated with CERN WebMaker