RE: beginer question about inferencing

BaseVISor 2.0 is an OWL 2 RL reasoner that can be extended very simply to
handle the above example.  You can download it at
http://www.vistology.com/basevisor/ and try it yourself.

First, I produced a friends ontology where the lhl relation is defined using
the property chain likes o hates-eachother o inv(likes).  Hates-eachother is
simply the symmetric version of 'hates'.

<owl:ObjectProperty rdf:about="&friends;lhl">
        <owl:propertyChainAxiom rdf:parseType="Collection">
            <rdf:Description rdf:about="&friends;likes"/>
            <rdf:Description rdf:about="&friends;hate-
eachother"/>
            <rdf:Description>
                <owl:inverseOf rdf:resource="&friends;likes"/>
            </rdf:Description>
        </owl:propertyChainAxiom>
    </owl:ObjectProperty>

I then said that NeutralPerson is a subClass of Person equivalent to:  lhl
some Self.  Ie.

 <owl:Class rdf:about="&friends;NeutralPerson">
        <owl:equivalentClass>
            <owl:Restriction>
                <owl:onProperty rdf:resource="&friends;lhl"/>
                <owl:hasSelf rdf:datatype="&xsd;boolean">true</owl:hasSelf>
            </owl:Restriction>
        </owl:equivalentClass>
        <rdfs:subClassOf rdf:resource="&friends;Person"/>
    </owl:Class>
   
In BaseVISor, I then added two rules for the semantics of the hasSelf
restriction:

This rule says that if a class has a self-restriction on property p and ?u
bears p to itself, then it is a member of that class:

 <comment> Rule: has Self
               if  T(?x, owl:hasSelf, true^^xsd:boolean) T(?x,
owl:onProperty, ?p) T(?u, ?p, ?u)
             then  T(?u, rdf:type, ?x)
   </comment>
   <rule name="hasSelf">
      <body>
         <triple>
            <subject variable="?x"/>
            <predicate resource="owl:hasSelf"/>
            <object,* datatype="xsd:boolean">true</object,>
         </triple>
         <triple>
            <subject variable="?x"/>
            <predicate resource="owl:onProperty"/>
            <object, variable="?p"/>
         </triple>
         <triple>
            <subject variable="?u"/>
            <predicate variable="?p"/>
            <object, variable="?u"/>
         </triple>
        </body>
      <head>
         <assert>
            <triple>
               <subject variable="?u"/>
               <predicate resource="rdf:type"/>
               <object, variable="?x"/>
            </triple>
         </assert>
      </head>
   </rule>
</root>

(*Note that I had to turn object into object, (object followed by a comma)
in order to post this to the mailing list for some reason via the Web
interface.  If you cut and paste, do a global replace.)

The second rule asserts that if something is a member of a class with a
self-restriction on property p, then that thing bears property p to itself.

  <comment> Rule: hasSelfInstantiation
               if  T(?x, owl:hasSelf, true^^xsd:boolean) T(?x,
owl:onProperty, ?p) T(?u, rdf:type, ?x)
 
             then T(?u, ?p, ?u)
   </comment>
  
   <rule name="hasSelfInstantiation">

      <body>
         <triple>
            <subject variable="?x"/>
            <predicate resource="owl:hasSelf"/>
            <object, datatype="xsd:boolean">true</object,>
         </triple>
         <triple>
            <subject variable="?x"/>
            <predicate resource="owl:onProperty"/>
            <object, variable="?p"/>
         </triple>
             <triple>
               <subject variable="?u"/>
               <predicate resource="rdf:type"/>
               <object, variable="?x"/>
            </triple>
         </body>
      <head>
         <assert>
          <triple>
            <subject variable="?u"/>
            <predicate variable="?p"/>
            <object, variable="?u"/>
            </triple>
         </assert>
      </head>
   </rule>

Using these two rules, from the fact that Alex likes Bob and Alex likes
Carlos and Bob hates-eachother Carlos (Bob and Carlos hat each other), it
can be inferred that Alex lhl Alex, and therefore that Alex is a
NeutralPerson.  

Further, if I assert that Frank is a NeutralPerson, the inference engine
infers that Frank lhl Frank.

Brian Ulicny, PhD
Sr. Scientist
VIStology, Inc.
Framingham, MA 01701
USA
www.vistology.com


Michael Schneider-6 wrote:
> 
> 
> However, there is at least one reasoner that is able to produce the
> expected result: It is the (extended) online OWL 2 RL/RDF rule reasoner by
> Ivan Herman at [3]. Since the original specification of the OWL 2 RL/RDF
> rules [4] does not contain rules for self-restrictions, you have to switch
> on the "OWL extras" on the reasoner homepage to include a rule for this
> OWL 2 feature. This will make the result appear. It is quite possible that
> other OWL 2 RL/RDF rule reasoners will give you the result as well, as the
> corresponding rule for self-restrictions isn't hard to be added. Note,
> however, that the OWL 2 RL/RDF rules will conversely not give you all the
> results that you would expect from an OWL 2 DL reasoner. Further, reliant
> ontology consistency and non-entailment detection is something that you
> can only expect from an OWL 2 DL reasoner. So both entailment regimes have
> their advantages and disadvantages.
> 
> 

-- 
View this message in context: http://old.nabble.com/beginer-question-about-inferencing-tp31065680p31119622.html
Sent from the w3.org - public-owl-dev mailing list archive at Nabble.com.

Received on Thursday, 10 March 2011 20:49:06 UTC