get-role [Function]


The get-role function gets a role for a specified relation on a specified concept, or nil if no such role can exist.


get-role concept relation


The concept argument is a concept, or the name of a concept. The relation argument is a relation, or the name of a relation.


The get-role function returns a role object for the relation relation on the concept concept.


(defconcept B 
    :is (:and (:all r A) (:exactly 3 r) (:filled-by r Joe Fred))) 
(defconcept C 
    :is-primitive B 
    :implies (:and (:some s A) (:at-most 2 s)) 
    :defaults (:filled-by s Sue)) 
(get-role 'C 'r) ==> (|ROLE|(R 3 3 A)) 
(get-role (fc C) (fr s)) ==> (|ROLE|(S 1 2 NIL))

See Also

Last modified: Jun 1 1995