get-role-max-cardinality [Method]


The get-role-max-cardinality method finds the maximum number of fillers of a given role on a given concept or instance.


get-role-max-cardinality conceptOrInstance relation


The conceptOrInstance argument is a Loom concept or instance.

The relation argument is the relation for which an upper bound is to be found.


The get-role-max-cardinality function returns the maximum number retriction that applies to conceptOrInstance for relation.


(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-max-cardinality (fc C) (fr r)) ==> 3 
(get-role-max-cardinality (fc C) (fr s)) ==> 2 
(get-role-max-cardinality (fi Mary) (fr r)) ==> 3 
(get-role-max-cardinality (fi Mary) (fr s)) ==> 2

See Also

Last modified: Jun 1 1995