The get-role-cardinality function returns the number of fillers of a given role on a given concept or instance, providing that the maximum and minimum number of such fillers is the same.
get-role-cardinality conceptOrInstance relation
The conceptOrInstance argument is a Loom concept or instance.
The relation argument is the relation whose upper and lower bounds are to be compared.
The get-role-min-cardinality function returns the minimum number retriction that applies to conceptOrInstance for relation, if that minimum is the same as the maximum. Otherwise, it returns nil.
:is (:and (:all r A) (:exactly 3 r) (:filled-by r Joe Fred)))
:implies (:and (:some s A) (:at-most 2 s))
:defaults (:filled-by s Sue))
(tellm (C Mary))
(get-role-cardinality (fc C) (fr r)) ==> 3
(get-role-cardinality (fc C) (fr s)) ==> NIL
(get-role-cardinality (fi Mary) (fr r)) ==> 3
(get-role-cardinality (fi Mary) (fr s)) ==> NIL
Last modified: Jun 1 1995