The Class Hierarchy Viewer


The class hierarchy viewer is the viewer that you will be in by default when you first start up the GKB-Editor. It allows you to incrementally browse the class-instance taxonomy. The class hierarchy is drawn as a tree-structured graph in which each frame is a node in the graph, and directed edges are drawn from classes to subclasses and instances. If a frame has multiple superclasses, an edge is drawn from each superclass to the frame. Classes are distinguished visually from instances. By default, browsing starts at the root of the class hierarchy. This can be changed, however. A sample hierarchy browse is shown in the figure below. Classes are drawn in red, and instances are drawn in blue. Notice that some class labels are drawn in bold type, and there are some additional nodes in black labelled N more. These are described below in the section on incremental browsing.

From the class hierarchy viewer, you can create, delete, and rename classes and instances, as well as change the position of any frame within the class-instance hierarchy. You can also perform operations on the KB, change various preferences, and start up one of the other two viewers.

Connections

A connection specifies the location of an OKBC-compliant knowledge base server. For example, for a KB residing on a remote server, a connection may enocde the host name and port number. Before a KB can be accessed, a connection must be established to a knowledge base server.

At present, three types of connection are supported: local, simple network and KSL Network. The local connection is used to access a KB that resides on the same machine as the one on which the GKB-Editor is running. There is only one local connection, and it is always open. A simple network connection encodes only a host name and port number. It can be used to connect to an OKBC server that does not require user name and passowrd. A KSL network connection is used for connecting to the Ontolingua server.

If you select the KSL Network Connection, you will be prompted for a host, a port, a user name and a password. The user name and password can be obtained from the Ontolingua server. After authentication for the user name and password is successful, you will be prompted for the session information. You can choose between an existing session and a new one. If you choose to connect to a new session, you have to choose the group of the session, its description and a duration in hours. Once done the GKB-Editor displays a message aknowledging the connection.

The Connection menu can be used to open or close a connection. When a user performs a KB operation, she is asked to select a connection. The user may select one of the avilable connections or establish a new one. If a user saves preferences associated with a KB, the connection information associated with that KB is recorded with the preferences. If the user attempts to open the same KB using the Select KB command, GKB-Editor will try to open the KB by reusing the connection information as recorded in the preferences.

Opening a KB

Initially, when you start up the GKB-Editor, usually no KB will be open yet (even if you have loaded a KB by other means before starting the GKB-Editor, the KB will usually not be visible to the GKB-Editor unless you officially open it using the GKB-Editor or with OKBC commands). If no KB is open, most of the menu commands will be disabled, and the status line will contain the message Create or Open a KB. To create or open a KB, select New or Open from the Knowledge Base menu. If creating a new KB, you will be prompted for a name, package and filename for the new KB. If opening an existing KB for the first time, you will be prompted for a filename. After checking that the file exists, and trying to determine the KB name and package from the file contents, the GKB-Editor will ask you to verify the KB name and package before opening the KB.

The GKB-Editor stores a record of KBs that you have opened in the past, so in subsequent sessions when you invoke the Open command, as a shortcut, you will be offered a menu of KBs that you have previously worked with (if they still exist). The menu also has an option (Other...) to select a KB not on the list, in which case, you must go through the set of dialogs described above.

If your FRS permits you to have multiple KBs open at once, the Select command enables you to switch between open KBs. Other operations that are accessible from the Knowledge Base menu enable you to save, revert, close, or destroy a KB. There are also limited KB analysis tools available. These commands are described in more detail below.

Knowledge Base Commands

Incremental Browsing

To begin browsing initially, select the Browse Class Hierarchy command from the View menu. You may also begin browsing by selecting the Browse from New Root(s) command: this command requires that you enter the name of a frame to serve as the root. Subsequent browses invoked using the Browse Class Hierarchy command will then use this same root. The GKB-Editor has a sophisticated incremental browse facility that allows you to reduce screen clutter and screen redisplay time by drawing only the parts of the KB that you wish to see. Thus, initially, you will see only the top few levels of the class hierarchy, and classes with many children will show only a truncated list of children. The degree to which the graph is initially expanded is determined by a depth limit and a breadth limit, which you can change using the Incremental Expansion dialog (you can also change the way the root nodes are chosen with this command). If a node has children that are not displayed because of the depth limit, that node, called a depth cutoff node, will be displayed in boldface. If a node has more children than the breadth limit, then only the number of children up to the breadth limit will be displayed. An additional node, a breadth cutoff node, will be drawn with the boldface label N more, where N is the number of remaining children. A number of depth and breadth cutoff nodes are shown in the figure above.

It is possible to also specify whether the depth limit is a hard depth limit or not. If a hard limit is used, then expanding one branch of the tree will cause expanded branches in other sections of the graph to be compacted. This allows you to focus in on only the current region of interest.

To expand a depth or breadth cutoff node, middle click on the node, Expanding a depth cutoff node causes its children to be drawn. Expanding a breadth cutoff node, or a node that has a breadth cutoff node for a child, causes the breadth limit for that node to double, and the additional children are drawn up to the new breadth limit. Attempting to expand a node that is neither a depth nor breadth cutoff has no effect. Middle clicking on a node while holding the Shift key down compacts the node, erasing all its children and turning that node into a depth cutoff node. Right clicking on a node brings up a menu of operations. The possible operations (not all operations may be applicable to every node) include:

There are times when you may wish to expand the browse all the way to some frame, without knowing exactly which sequence of classes need to be expanded in order to find the frame. To do this, invoke the Find command from the Frame menu. You will be prompted (with completion) for the name of a frame to find. If the frame is present in the KB, the current browse will be expanded to make it visible, and the frame is highlighted. Sometimes, no ancestor of the specified frame is currently visible in the display, in which case the found frame is shown as a root frame with no parent classes. In this situation, you must use the Expand parents option in the right-click menu in order to determine the frame's place in the class hierarchy.

You may also save a browse to a file, so that in subsequent sessions you can begin browsing exactly where you left off. The Save Browse and Load Browse commands are further described below.

View Commands

Editing Operations

The Class Hierarchy Viewer enables you to create new frames and to rename, delete, and change class-subclass and class-instance links for existing frames. If an editing operation acts on a particular frame, you will be required to select the frame either before or after selecting the command. See the section on selecting frames for more details. All of the editing commands can be found under the Frame menu. These are described below. To perform additional editing operations on an individual frame, such as altering its slot values, you must invoke the Frame Editing Viewer, which can also be done from this menu.

Frame Commands

The following commands all operate on one or more frames. The first few commands are not actually editing operations, but they may facilitate selecting frames on which to perform editing operations.

Customizing the Display

The GKB-Editor is highly customizable, allowing users to specify via a set of preference menus what should be displayed in the various viewers and how various objects should be drawn.

In the hierarchy and relationships viewers, the user has a great deal of control over how individual nodes are displayed. We provide a style menu that allows the user to specify icon and label colors, icon shape, and label font, face, and size. The user can define a style for all frames satisfying some predicate. Any number of these styles and predicates can be defined, and frames that satisfy more than one such predicate will show characteristics of each corresponding style (except where such characteristics conflict with each other). Currently, only a small number of predefined predicates are available, such as for identifying classes, instances, primitive classes, for testing frames for a particular user-specified slot value, or identifying all children of a particular class. Future versions of the GKB-Editor may support a greater variety of predefined predicates, or may permit arbitrary, user-defined predicates. Only two styles are defined when the GKB-Editor is first installed, for class and instance frames, respectively.

Preferences are made persistent by saving them in a profile. A user's profile is saved in the file .gkb-prefs in the user's home directory. There are two types of profiles: the User Profile, which contains preferences that should be used for all KBs opened by the user, and the KB Profile, which contains preferences that apply only to a particular KB opened by the user. One can also imagine a Global KB Profile that applies to a particular KB for all users, but this has not been implemented. A user may have only one User Profile, but many KB Profiles, one for each KB. Preferences specified in the KB Profile override those in the User Profile when that KB is open.

When saving preferences, in general you will be given a choice whether a particular changed preference should be a part of the User Profile, the KB Profile, both, or neither. However, some preferences, such as those that refer to a particular frame in a KB, can only be saved as part of a KB Profile. Upon invoking the Save Preferences command, you will be presented with a dialog that lists the various options.

Preference Commands

Application Commands

There are some additional miscellaneous commands that can be found in the Application menu. These relate either to the application as a whole (i.e. quit, print or help), or to invoking the other types of viewers. Keep in mind that when opening additional viewer windows, only the most recently created window will be active and accepting commands. For example, if you open a relationships viewer in the middle of browsing the class hierarchy, you must close the relationships viewer before you can continue browsing the class hierarchy. This is a limitation which we hope to overcome in a future release.


Links

Return to the GKB-Editor Overview page.

Return to the beginning of the GKB User Manual.

Visit the Frame Relationships Viewer page.

Visit the Frame-Editing Viewer page.


Suzanne M. Paley <paley@ai.sri.com>
Last modified: Wed May 29 16:28:49 1996