get-superrelations [Function]
Purpose
The get-superrelations function finds all superrelations, or only the direct superrelations, of a given relation. If the argument to get-superrelations is a symbol, and no matching relation can be found, then Loom looks for a matching concept and returns the concept's supers.
Syntax
get-superrelations relationOrConcept &key direct-p
Arguments
The relationOrConcept argument is the relation (or concept), or the name of the relation (or concept), whose superrelations (or superconcepts) are to be found.
If the direct-p argument is t, only the most specific superrelations (or superconcepts) are returned. Otherwise, all superrelations (or superconcepts), including relationOrConcept itself, are returned.
Value
This function returns a list of relations, or a list of concepts.
Examples
(defconcept Person)
(defconcept Child :is-primitive Person)
(defrelation relative)
(defrelation child :is-primitive relative)
(get-superrelations 'child) ==> (|R|CHILD |R|RELATIVE |R|BINARY-TUPLE)
(get-superrelations (fr child) :direct-p t) ==> (|R|RELATIVE)
(get-superrelations 'Person) ==> (|C|PERSON |C|THING)
See Also
Last modified: Jun 1 1995