|COGENT Version 2.4 Help|
Hierarchical knowledge bases are used to contain ontologies of classes. Each class consists of a name, a (possibly empty) set of parent classes, a (possibly empty) set of attributes with values, and a (possibly empty) set of instances. Classes may be thought of as being arranged in a hierarchical fashion, by virtue of each class's parent classes. Class inclusion relations and inheritance of attributes operate over this hierarchy.
Hierarchical knowledge bases may be thought of as being a bit like buffers, in that they may be queried (by the usual buffer "match" operation) and "things" may be stored in them (by the usual buffer modification operations: "add", "delete", etc.). They differ in three main respects:
The elements of hierarchical knowledge bases are class definitions, which specify an ontology comprising classes and instances, with attribute inheritance between related classes. A simple class definition for aspirin, which is both an anitinflammatory and an analgesic is as follows:
|Class: Definition of "aspirin", a kind of antiinflammatory and an analgesic|
|Attributes:||cost = low|
When a hierarchical knowledge base is initialised, the class hierarchy is converted to a series of terms of the following forms:
specifies that the first argument represents a class, which is a subclass of the class represented by the second argument. e.g. ako(aspirin, analgesic)
specifies that the first argument represents an individual instance of the class represented by the second argument. e.g. instance(anadin, aspirin)
attribute(Object, Name, Value)
specifies the name and value of an attribute of an object (either a class or instance). e.g. attribute(aspirin, cost, low)
These terms may be "matched" by (for example) rules in a process that accesses the knolwedge base using the standard buffer match condition. The match condition is sensitive to the relations among classes, instances and attributes, and can infer additional information. Extra elements which are not actually contained in the state will be inferred, e.g. instance(tweety, bird) and attribute(tweety, flies, true). With default settings of properties governing inheritance, objects (subclasses and instances) will inherit attributes from container classes, if no value is specified explicitly for the objects, but if a value is specified explicitly for an object, it will override any inherited value. e.g. we can specify attribute(tweety, flies, false)
The precise behaviour of a hierarchical knowledge base is determined by the values of a number of properties. All hierarchical knowledge bases have the following properties:
Initialise (possible values: Each Trial/Each Block/Each Subject/Each Session;
default: Each Trial)
The timing of buffer initialisation is determined by this property. When the value is Each Trial, the buffer will automatically initialise itself at the beginning of each trial. When the value is Each Block, the buffer will initialise itself at the beginning of each block of trials (i.e., contents will be preserved across trials within a block). Similarly, when the value is Each Subject, contents will be preserved across simulated blocks and when the value is Each Session, the contents will be preserved across subjects.
Globally Readable (possible values: True/False; default: False)
This property determines whether the knowledge base can be read by any box (or subbox) of its parent compound (if set to True), or if an explicit read arrow is needed between the box doing the reading and the knowledge base.
Globally Writeable (possible values: True/False; default: False)
This property determines whether the knowledge base can be modified by any box (or subbox) of its parent compound (if set to True), or if an explicit write arrow is needed between the box doing the modifying and the knowledge base.
Access (possible values: Random/FIFO/LIFO; default: Random)
This property dictates the order of access to a buffer's elements when the buffer is ``matched''. If access is Random, then match will instantiate its argument to an element from the buffer selected at random (provided that element unifies with the argument of match). If access is FIFO (First In, First Out), then match will return the oldest element which unifies with its argument. If access is LIFO (Last In, First Out), then match will return the youngest element which unifies with its argument.
Attribute Order (possible values: Bottom Up/Top Down; default: Bottom Up)
This property governs the order in which attribute values are generated fo an object. Normally this will be set to Bottom up, to return the most specific value first, and ordinarily this will be coupled with a True setting for Attribute uniqueness, so the most specific attribute value will be the only one returned.
Attribute Uniqueness (possible values: True/False; default: True)
If enabled (default), only one value will be returned for an attribute of any object. Otherwise all inherited and explicitly specified values will be returned by resatisfaction.
Multiple Inheritance (possible values: True/False; default: False)
If disabled, multiple inheritance will be blocked. If enabled, and multiple inheritance paths exist for a target object, values derived from each inheritance path will be returned, under the constraints of the settings of the other properties.
The current knowledge viewer shows a pictorial representation of the contents of the hierarchical knowledge base during processing. Relations between classes are shown, as are attributes and their values and instances of classes.
Hierarchical knowledge base elements represent classes, and are edited using COGENT's class editor. The editor is analogous to other element editors in COGENT, and allows the specification of a class's name, description, parent classes, attributes and values, and instances. on a class. Note that if a class has multiple parent classes this may be specified by providing a list of class names in the "Parent Classes" field (i.e., a comma separated sequence of classes enclosed in square brackets).
|COGENT Version 2.4 Help|