W3C home > Mailing lists > Public > public-cwm-bugs@w3.org > March 2004

reflexive bug in cwm?

From: <Eric.Neumann@aventis.com>
Date: Sun, 28 Mar 2004 08:59:01 -0500
Message-ID: <81BE96441EAC744B8F6E1E738C53F9589E137E@sccsmxsusr05.pharma.aventis.com>
To: <public-cwm-bugs@w3.org>
 
I think the use of reflexive relations may not be properly handled in CWM
(v.1.145). I was trying to represent a series of relations where some may
occasionally be reflexive:  <a> <relates> <a>. But when I tried to apply a
simple rule in catching these instances, it seems to falsely find all triples
that have objects regardless of the subject.  The example follows: 

      @prefix log: <http://www.w3.org/2000/10/swap/log#> .
     @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
     @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

      :Tom :talksTo :Kathy  .

      :Kathy :talksTo :Bob .

      :Bob :talksTo :Steve  .

      :Steve :talksTo :Anna  .

      :Anna :talksTo :Anna .

      this log:forAll :s .
     { :s :talksTo :s .} => {:s :admits "I talk to myself"} .

The rule is designed to match only reflexive cases for “talksTo”.
Accordingly, only the last relation, “Anna talks to Anna”, should be the
single instance the rule should accept. However, the output of applying this
rule using –think is:

     :Anna     :admits "I talk to myself";
        :talksTo :Anna .

    :Bob     :admits "I talk to myself";
         :talksTo :Steve .

    :Kathy     :admits "I talk to myself";
         :talksTo :Bob .

    :Steve     :admits "I talk to myself";
         :talksTo :Anna .

    :Tom     :talksTo :Kathy .

 

Clearly the first instance is the correct one, but there should be no others.
All however seem to satisfy the rule, except for Tom, and this seems to be
because Tom is never used as an object. Somehow, only relations with objects
satisfy the rule, while ignoring the subject, and this cannot be correct! 

Has this behavior been seen by others as well? It prohibits some basic logic
test to be performed—specifically, I was attempting to code the classic
“Muddy Children Problem” in N3 to see how CWM would reason. It needs to
represent knowledge of which kids have mud on the foreheads. Initially each
child is not able to see mud on their own, but has to reason it from the
response of the other children to an indirect question. It ends up being a
series of recursive quotes of quotes (reifications) of who knows he/she has
mud on their forehead…

 cheers,

Eric

Received on Sunday, 28 March 2004 08:59:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:10:58 GMT