get-role-values [Method]


Purpose

For a given concept, the get-role-values method finds the strict fillers of a given role on that concept. For a given instance, it finds both the strict and default fillers of a given role on that instance.

Syntax

get-role-values conceptOrInstance relation

Arguments

The conceptOrInstance argument is a Loom concept or instance.

The relation argument is the relation whose fillers are to be found.

Value

If conceptOrInstance is a concept, get-role-values returns the strict fillers of the role on conceptOrInstance and relation. If conceptOrInstance is an instance, get-role-values returns both the strict and default features.

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)) 
(tellm (C Mary)) 
(get-role-values (fc C) (fr r)) ==> (|I|JOE |I|FRED) 
(get-role-values (fc C) (fr s)) ==> NIL 
(get-role-values (fi Mary) (fr r)) ==> (|I|JOE |I|FRED) 
(get-role-values (fi Mary) (fr s)) ==> (|I|SUE)

See Also

Last modified: Jun 1 1995