get-role-types [Method]


Purpose

The get-role-types method finds the type of the fillers of a given role on a given concept or instance. The type is a list of concepts.

Syntax

get-role-types conceptOrInstance relation

Arguments

The conceptOrInstance argument is a Loom concept or instance.

The relation argument is the relation whose fillers' type is to be found.

Value

The get-role-types method returns the type (value-restriction) that applies to conceptOrInstance for relation.

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-types (fc C) (fr r)) ==> (|C|A) 
(get-role-types (fc C) (fr s)) ==> NIL  
(get-role-types (fi Mary) (fr r)) ==> (|C|A) 
(get-role-types (fi Mary) (fr s)) ==> (|C|THING)

See Also

Last modified: Jun 1 1995