Verifies that one frame is a child of another, or returns all
children of a frame. A child is a subclass or instance.
Optionally includes the class given as the first parameter.
- The parent frame.
- Either a frame to be tested or a variable to be bound.
- :INCLUSIVE (optional)
- If the :INCLUSIVE keyword is present and the child argument
is a variable, the parent will be included as one of the
bindings of the variable.
(:CHILD Physical_Objects Rover) ;; succeeds because Rover (a dog) is a physical object.
(:CHILD Physical_Objects Rover ?rover) ;; succeeds if Rover is a child of Physical_Objects and binds a variable to Rover.
(:CHILD Mammals ?child) ;; retrieves all children of Mammals
(:CHILD Mammals ?child :INCLUSIVE) ;; retrieves Mammals and all children of Mammals
The argument parent 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 child.
Fails if the parent is not a class, if the parent-child relationship is not true,
or if the parent has no children.
This can generate a lot of bindings. If you know that parent is a
class, use :DIRECT-SUBCLASS, :DIRECT-INSTANCE, :INSTANCE or :SUBCLASS instead.
Algernon Documentation Central
Algernon home page