:DIRECT-CLASS
Purpose
Verifies that one frame is a direct class of another, or returns all
direct classs of an instance.
Parameters
- instance
- The instance.
- class
- Either a frame to be tested or a variable to be bound.
- If the :INCLUSIVE keyword is present and the class argument
is a variable, the instance will be included as one of the
bindings of the variable.
Examples
(:DIRECT-CLASS Rover Physical_Objects) ;; Succeeds if Rover is a direct instance of Physical_Objects
(:DIRECT-CLASS Rover ?what) ;; Retrieves the direct class(es) of Rover
(:DIRECT-CLASS Rover ?what :INCLUSIVE) ;; Retrieves Rover and its direct class(es)
Success criteria
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 class.
Failure criteria
Fails if the class is not a class, if the direct-class relationship is not true,
or if the parent has no direct classs.
Notes
None.
Related commands
Back to...
Algernon commands
Algernon Documentation Central
Algernon home page