:ROOT-CLASS

Purpose

Verifies that one frame is the root class of another, or returns the root class of a class.

Parameters

class
The class frame.
root
Either a frame to be tested or a variable to be bound.
If the :INCLUSIVE keyword is present and the root argument is a variable, the class will be included as one of the bindings of the variable.

Examples

  (:ROOT-CLASS Canines :THING)
  (:ROOT-CLASS Canines ?root)
  (:ROOT-CLASS Canines ?root :INCLUSIVE)

Success criteria

The argument class must be a class. If the clause is ground, succeeds if the relationship is true. If the clause is not ground, succeeds if it can retrieve the root class.

Failure criteria

Fails if class is not a class, if the correct root class is not suppliced, or if the class has no instances.

Notes

The root class is the top of the class hierarchy. A KB may have more than one root class, so the root class of two classes may not be the same class.

Related commands


Back to...

Algernon commands
Algernon Documentation Central
Algernon home page