Verifies that one frame is a leaf class of another, or returns all leaf classes of a leaf-class.


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


  (:LEAF-CLASS Animals Canines)
  (:LEAF-CLASS Animals ?x)
  (:LEAF-CLASS animals ?x :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 retrieves at least one leaf class.

Failure criteria

Fails if class is not a class, if the class to leaf class relationship is not true, or if the class has no leaf classes.


A leaf class is a subclass that has no subclasses. Whether or not it has instances is irrelevant for this command.

Related commands

Back to...

Algernon commands
Algernon Documentation Central
Algernon home page