Re: syntax question
Thomas Russ <[email protected]>
| Newsgroups | gmane.comp.ai.powerloom |
|---|---|
| Message-ID | <[email protected]> |
On Feb 13, 2006, at 6:53 PM, [email protected] wrote: > Related to this, have you found a nice idiom for capturing disjoint > subclassing? > > I see that DISJOINT, COVERING, and DISJOINT-COVERING provide the raw > materials for this. I was just wondering if you've found a > particularly convenient syntactic sugar for this, to make it easy to > develop an axiomatization. Perhaps it's not necessary, and I just > need to accustom myself to the notation as is. Following up on this a bit more. If you want to have a top-down style for this, you could always adopt something like the following approach. This specifies the subclasses during the definition of the parent concept, and then also establishes the disjointness relations: (defconcept top (?x) :<= (a ?x) :<= (b ?x) :<= (c ?x) :<= (d ?x) :<= (x ?x) :<= (y ?x) :<= (z ?x) :axioms (and (mutually-disjoint-collection (setof a b c d)) (mutually-disjoint-collection (setof x y z)))) ;; The forward references are allowed, but do eventually need ;; to be resolved before trying to reason with the values. (defconcept a) (defconcept b) (defconcept c) (defconcept d) (defconcept x) (defconcept y) (defconcept z) (retrieve all (subset-of ?x top)) There are 8 solutions: #1: ?X=TOP #2: ?X=A #3: ?X=B #4: ?X=C #5: ?X=D #6: ?X=X #7: ?X=Y #8: ?X=Z (ask (disjoint x y)) => TRUE (ask (disjoint a y)) => UNKNOWN I will note that the 3.0.2 beta version of PowerLoom doesn't have any enforcement of the disjointness, so although you can express the disjointness, there isn't yet any complaint about assertion membership in multiple disjoint classes.