:DIRECT-SUBCLASS

Purpose

Verifies that one frame is a direct subclass of another, or returns all direct subclasses of a class.

Parameters

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

Examples

  (:DIRECT-SUBCLASS Physical_Objects Canines)
  (:DIRECT-SUBCLASS Mammals ?what)
  (:DIRECT-SUBCLASS Mammals ?what :INCLUSIVE)

Success criteria

The superclass argument must be a class. If the clause is ground, succeeds if the relationship is true. If the clause is not ground, succeeds if it retrieves at least one direct subclass.

Failure criteria

Fails if the superclass is not a class, if the direct-subclass relationship is not true, or if the parent has no direct subclasses.

Notes

None.

Related commands


Back to...

Algernon commands
Algernon Documentation Central
Algernon home page