Re: failure with RANGE-MIN-CARDINALITY

Xingzhi Pan <[email protected]>
Newsgroups gmane.comp.ai.powerloom
Message-ID <[email protected]>
Thanks a lot :)

2005/12/15, Thomas Russ <[email protected]>:
>
> On Dec 13, 2005, at 5:31 PM, Xingzhi Pan wrote:
>
> > Hello,
> > My assignment to RANGE-MIN-CARDINALITY is effectless:
> > |= (defconcept Person)
> >
> > |c|PERSON
> >
> > |= (defrelation rel ((?p1 Person)(?p2 Person)))
> >
> > |r|REL
> >
> > |= (retrieve all ?x (RANGE-MIN-CARDINALITY rel Person ?x))
> >
> > Processing check-types agenda...
> > There is 1 solution:
> >   #1: ?X=0
> >
> > |= (assert (RANGE-MIN-CARDINALITY rel Person 1))
> >
> > |P|(= (RANGE-MIN-CARDINALITY REL PERSON) 1)
> >
> > |= (retrieve all ?x (RANGE-MIN-CARDINALITY rel Person ?x))
> >
> > There is 1 solution:
> >   #1: ?X=0
>
> This is a bug in the released version of PowerLoom.  It has been fixed
> in newer versions, but we haven't yet had the time to put a release
> together.
>
> In the meantime, you can achieve the effect you want by making the
> assertion to the relation
>
>    RANGE-CARDINALITY-LOWER-BOUND
>
> instead:
>
>    (assert (range-cardinality-lower-bound rel person 1))
>
> Just to amplify on the modeling a little bit.  RANGE-MIN-CARDINALITY and
> RANGE-MAX-CARDINALITY are functions and thus can only have a single
> value.
> RANGE-CARDINALITY-LOWER-BOUND and RANGE-CARDINALITY-UPPER-BOUND are
> relations
> and can have multiple assertions made about them.   Through inference
> they
> influence the value of RANGE-MIN-CARDINALITY and RANGE-MAX-CARDINALITY,
> which will take the greatest lower and least upper bound respectively.
>
> By the way, I don't think you are getting the meaning that you
> may be expecting from the assertion
>
>    (assert (RANGE-MIN-CARDINALITY rel Person 1))
>
> This says that the CONCEPT Person has at least one REL.  It does NOT
> say that instances of Person have at least one REL, and since the
> definition REL says it applies to instances of Person instead of
> Concept, I don't think this is what you want.  I suspect that you
> really want to have a rule like
>
>    (assert (=> (person ?p) (range-cardinality-lower-bound rel ?p 1)))
>
> which says all persons have at least 1 rel.  You can conveniently
> include
> this rule in the definition of Person like:
>
> (defconcept person (?p)
>     :=>  (range-cardinality-lower-bound rel ?p 1))
>
>
> >
> > But RANGE-MAX-CARDINALITY DID work as I've expected. Anyone has ideas
> > about this? Thanks a lot.
> >
> > --
> > Pan Xingzhi
> > _______________________________________________
> > powerloom-forum mailing list
> > [email protected]
> > http://mailman.isi.edu/mailman/listinfo/powerloom-forum
>
>


--
Pan Xingzhi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.