RE: Inferring Properties based on Types

Hi, again!

I wrote on October 01, 2007:

>Many thanks again, Evren, for re-investigating!
>So I attach below a demo ontology, which exactly consists of 
>the five axioms
>I gave in the beginning. Additionally, it contains the 
>following assertions:
>    * :alice a owl:Thing .
>    * :bob a :Man .
>    * :alice :sibling :bob .
>Also, I attach below some working Jena/Pellet code, which builds an
>inference model from this ontology, and then checks, if this 
>inference model
>'contains()' the triple
>    :alice :brother :bob .
>The result is:
>    "Exists inferred triple [alice brother bob]? true"
>And you say that I can believe in this result? 
>Hey, Tim, good news, it seems to work! You get your rule in 
>OWL-1.1! :-)
>So, end of day now!

A few corrections/enhancements.

I now checked Evren's observation that I can remove the axiom (A2), which
was specified in my original mail by: 

  (A2) SubClassOf( ObjectMinCardinality(1 manman owl:Thing) Man )

You are wright, Evren! So the set of axioms is now:

  (R4) SubObjectPropertyOf(SubObjectPropertyChain(sibling manman) brother)
  (A1) SubClassOf( Man ObjectExistsSelf(manman) )
  (A3) ObjectPropertyDomain( manman Man )
  (A4) FunctionalObjectProperty( manman )

The "Deduction of (S1b')" in my original mail, where 

  (S1b') FORALL x: ( EXISTS y: manman(x,y) ) ==> Man(x)

has then to be changed the following way:

  * Deduction of (S1b'): Given an instance x, and an instance y, for which
manman(x,y) holds. Then x is in the domain of 'manman'. And from axiom (A3)
we can conclude Man(x). 

The original "Deduction of (A2)" gets then removed, of course. 

Btw, in my previous post, I had the axiom (A2) wrong in the demo ontology.
Because in that ontology, I had accidentally made the minCardinality
restriction a QCR restricted to class Man, instead of owl:Thing. Not a
dangerous bug, but now the complete axiom has vanished, anyway. :-)

There was also a confusing typo in the javadoc of the demo code, where the
string for the rule contained the predicate "Man" with variable "x" instead
of "y".

I attach the corrected/enhanced versions of the ontology and the demo code


===== Ontology "timsrule.owl" (no axiom (A2) anymore) =============

<?xml version="1.0"?>
  <owl:Ontology rdf:about="">
    <rdfs:comment>Encoding of the rule
[sibling(x,y)^Man(y)-&gt;brother(x,y)] in OWL-1.1</rdfs:comment>
    <owl:versionInfo rdf:datatype=""
    >Created with TopBraid Composer</owl:versionInfo>
  <owl:Class rdf:ID="Man">
    <rdfs:subClassOf rdf:resource=""/>
          <owl:ObjectProperty rdf:ID="manman"/>
  <owl:ObjectProperty rdf:about="#manman">
    <rdfs:domain rdf:resource="#Man"/>
  <owl:ObjectProperty rdf:ID="sibling"/>
  <owl:ObjectProperty rdf:ID="brother"/>
  <rdf:List rdf:ID="subRoleChain">
    <rdf:first rdf:resource="#sibling"/>
    <rdf:rest rdf:parseType="Collection">
      <owl:ObjectProperty rdf:about="#manman"/>
    <rdfs:subPropertyOf rdf:resource="#brother"/>
  <owl:Thing rdf:ID="alice">
      <Man rdf:ID="bob"/>

<!-- Created with TopBraid Composer -->

===== Democode (corrected typo in class docu) =====================

// Note: need a current version of Pellet (>= 1.5)

import org.mindswap.pellet.jena.PelletReasonerFactory;
import com.hp.hpl.jena.ontology.OntModel;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.rdf.model.ResourceFactory;


 * Rule [sibling(x,y) AND Man(y) ==> brother(x,y)] in OWL-1.1
 * @author Michael Schneider (
public class TimsRuleDemo {
    public static void main(String[] args) {
        String ONT_FILENAME = "timsrule.owl"; // put in project-toplevel
        String BASE_URI = "";
        try {
            OntModel ontModel =
   FileInputStream(ONT_FILENAME), BASE_URI);
            System.out.println("Exists inferred triple [alice brother bob]?
" +
        } catch (Throwable e) {


Dipl.-Inform. Michael Schneider
FZI Forschungszentrum Informatik Karlsruhe
Abtl. Information Process Engineering (IPE)
Tel  : +49-721-9654-726
Fax  : +49-721-9654-727
Web  :

FZI Forschungszentrum Informatik an der Universität Karlsruhe
Haid-und-Neu-Str. 10-14, D-76131 Karlsruhe
Tel.: +49-721-9654-0, Fax: +49-721-9654-959
Stiftung des bürgerlichen Rechts
Az: 14-0563.1 Regierungspräsidium Karlsruhe
Vorstand: Rüdiger Dillmann, Michael Flor, Jivka Ovtcharova, Rudi Studer
Vorsitzender des Kuratoriums: Ministerialdirigent Günther Leßnerkraus

Received on Tuesday, 2 October 2007 07:52:58 UTC