Verifies that one frame is a direct instance of another, or returns all
direct instances of a class.
- The class.
- Either a frame 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.
(:DIRECT-INSTANCE Canines ?canine) ;; retrieves all direct instances of Canines
(:DIRECT-INSTANCE Canines ?canine :INCLUSIVE) ;; retrieves Canines and all of its direct instances
(:DIRECT-INSTANCE Physical_Objects Rover) ;; succeeds if Rover is a direct instance of Physical_Objects
(:DIRECT-INSTANCE Physical_Objects Rover ?rover) ;; succeeds if Rover is a direct instance of Physical_Objects and binds a variable to Rover.
The class 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-instance.
Fails if the class is not a class, if the direct-instance relationship is not true,
or if the parent has no direct-instances.
Algernon Documentation Central
Algernon home page