get-role [Function]


Purpose

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

Syntax

get-role concept relation

Arguments

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

Value

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

Examples

(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