| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (18 out of 22)

Module Information

The Module Information system table lets you define a top level module for your KB.

Modules are a convenient method of saving small KBs that typically contain distinct and manageable pieces of a larger KB's knowledge. For example, in a development environment with several G2 developers, one developer could be creating the class hierarchy, while another was creating procedures and methods for those classes. Using modules, each developer could save his or her work in a module, and then, using a top-level module, combine the modules into a single, modularized KB.

A Module Information system table exists for each module you create, because every module has associated with it a unique set of system tables. You can install only one set of system tables, and therefore only a single Module Information system table, in a KB at one time.

For a complete description of using modules, and the role that system tables play within them, see Modules and System Tables.

Specifying a Module Name

The Module-file-name attribute specifies the name of the module. By default, the module name is name of the top-level module with a .kb extension, which G2 stores in the directory from which you started G2.

Use this attribute to specify a name other than the top-level module. You can specify a relative or fully-qualified path name as the name, entered as text in quotation marks (" ").

Specifying the Top Level Module

The Top-level-module attribute specifies the module KB that is at the top of the module hierarchy. G2 loads the system tables associated with the top level module. Usually, the top level module requires other modules, specified in the next attribute.

Specifying the Required Modules

The Directly-required-modules attribute specifies the modules that the top level module requires directly. A module requires another because of definitions that are contained in the required module.

Class-Specific Attributes of Module Information

The class-specific attributes of the Module Information system table are:

Attribute Description
Module-file-name
Specifies the name of the module, either as the pathname and file name where the module and its system table information are stored, or default.
Allowable values:
"file-name"
default

Default value:
default


Top-level-module
Specifies the top-level module for the KB. G2 uses the name you specify when identifying modules to load into the hierarchy.
Allowable values:
symbol
unspecified

Default value:
unspecified


Directly-required-modules
Lists the modules, if any, required by the module named as the Top-level-module in this table. The required modules are loaded in order as they are listed for this attribute.
Allowable values:
any valid module name
Default value:
none

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (18 out of 22)

Copyright © 1997 Gensym Corporation, Inc.