Re: Question about representing frame information and unification in PL

Hans Chalupsky <[email protected]> Fri, 31 Oct 2008 12:40:19 -0800
Newsgroups gmane.comp.ai.powerloom
Message-ID <[email protected]>
There is nothing magical about multiple inheritance in PowerLoom.  It
just means that certain results can be derived in multiple ways which
is often the case in logic-based systems.  There is no requirement for
merging or unification, all that is required is that everything that
can be derived through the various different paths is consistent (so,
if there is a clash it will be reported as an inconsistency).  For
example, suppose you defined the cardinality constraint as follows:

STELLA(41): (defconcept person (?p)
              :=>> (range-cardinality eye-of ?p 2))
|c|PERSON
STELLA(42): (defrelation eye-of ((?p person) ?eye))
|r|EYE-OF
STELLA(43): (defconcept blue-eyed-person (person))
|c|BLUE-EYED-PERSON
STELLA(44): (defconcept black-eyed-person (person))
|c|BLACK-EYED-PERSON
STELLA(45): (assert (and (blue-eyed-person fred)
                         (black-eyed-person fred)))
(|P|(BLUE-EYED-PERSON FRED) |P|(BLACK-EYED-PERSON FRED))

STELLA(46): (retrieve all (range-cardinality eye-of fred ?n))
There is 1 solution:
  #1: ?N=2
STELLA(47): 

It doesn't matter which way you go up the chain, the result will be
the same.  It would have also been the same had you defined the same
cardinality constraint separately on each of blue-eyed-person and
black-eyed-person.

Now, suppose you defined this differently:

STELLA(48): (defconcept person (?p))
|c|PERSON
STELLA(49): (defrelation eye-of ((?p person) ?eye))
|r|EYE-OF
STELLA(50): (defrelation color-of (?x ?color))
|r|COLOR-OF
STELLA(51): (defconcept blue-eyed-person (?p person)
               :=> (exists (?x ?y)
                     (and (eye-of ?p ?x)
                          (eye-of ?p ?y)
                          (not (= ?x ?y))
                          (color-of ?x blue)
                          (color-of ?y blue))))
|c|BLUE-EYED-PERSON
STELLA(52): (defconcept black-eyed-person (?p person)
               :=> (exists (?x ?y)
                     (and (eye-of ?p ?x)
                          (eye-of ?p ?y)
                          (not (= ?x ?y))
                          (color-of ?x black)
                          (color-of ?y black))))
|c|BLACK-EYED-PERSON
STELLA(53): (assert (and (blue-eyed-person fred)
                         (black-eyed-person fred)))
(|P|(BLUE-EYED-PERSON FRED) |P|(BLACK-EYED-PERSON FRED))

;;; Now you are running into the problem Tom pointed out that you are
;;; creating multiple skolem individuals, since it is nowhere stated
;;; that there are at most two:

STELLA(54): (retrieve all (eye-of fred ?e))
There are 4 solutions:
  #1: ?E=sk10
  #2: ?E=sk11
  #3: ?E=sk12
  #4: ?E=sk13

However, this also doesn't mean that he has four eyes, since some of
them could be identical.  The skolems just assert existence, not
identity.  

Btw, counting in the presence of skolems is generally hairy (and
PowerLoom doesn't yet a good job at it), so, if you care about
cardinalities, try to avoid skolems.

Hans

>>>>> Thomas Russ <[email protected]> writes:

> On Oct 30, 2008, at 7:45 AM, Srini Ram wrote:

>> However, to take another example,
>> if you have the following classification
>> Person -- has two eyes
>> Blue-eyed person
>> Black-eyed person
>> 
>> Than any object which derives from both blue and black eyed persons  
>> should have two eyes (color tbd), not four.
>> I guess this is the unification I was wondering about.
>> 
>> I think my question really was, how does Powerloom deal with  
>> multiple inheritance
>> where the same attribute is defined in two superclasses
>> -- in the case of clashing attributes(as in the case above where  it  
>> is not clear where the child object should have two blue eyes, or  
>> two brown eyes, but because Person has two eyes, we know that the  
>> child will have two eyes - we should be able to unambiguously answer  
>> questions relating to the number of eyes, but not their color)
>> -- in the case of non-clashing attributes(as in the engine example).

> The problem is that with multiple skolem values, there isn't any  
> principled way to unify them.  So PowerLoom will pretty much just not  
> do it.  There will be four skolems, but that doesn't mean there are  
> four eyes.  Although in the case where you have a logically  
> inconsistent definition.  If you were to try this in, say, OWL 2.0  
> where you can have qualified number restrictions, you should get an  
> inconsistent ontology.

> As I noted before, we haven't put much effort into trying to do a lot  
> with cardinality reasoning, so PowerLoom wouldn't really notice that.   
> There is also the issue of it not really being that convenient to  
> indicate to PowerLoom that two skolems should be distinct, although I  
> suppose that something like

>     (exists (?s1 ?s2) (and (not (= ?s1 ?s2))  ...))

> should work for that.

> PowerLoom has only the rudiments of a value cardinality reasoning  
> system, and the qualified cardinality relations are just stubs with no  
> semantics or reasoning attached.