Verifies that one frame is a direct or indirect instance of another, or returns all direct or indirect instances of an instance.


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


  (:INSTANCE Canines Rover)
  (:INSTANCE Canines ?x)
  (:INSTANCE Physical_Objects Rover ?rover)  ;; succeeds if Rover is an instance of Physical_Objects and binds a variable to Rover.

 ;; The following path is guaranteed to be true
 ((:INSTANCE Canines ?canine)
  (:CLASS    ?canine Canines))

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 instance.

Failure criteria

Fails if class is not a class, if the class-instance relationship is not true, or if the class has no instances.


Related commands

Back to...

Algernon commands
Algernon Documentation Central
Algernon home page