W3C home > Mailing lists > Public > public-owl-dev@w3.org > October to December 2007

RE: Inferring Properties based on Types

From: Michael Schneider <schneid@fzi.de>
Date: Mon, 1 Oct 2007 23:29:00 +0200
Message-ID: <0EF30CAA69519C4CB91D01481AEA06A040A530@judith.fzi.de>
To: "Evren Sirin" <evren@clarkparsia.com>
Cc: "Owl Dev" <public-owl-dev@w3.org>, "Swanson, Tim" <tim.swanson@semanticarts.com>, "Ian Horrocks" <horrocks@cs.man.ac.uk>

Hi again, Evren!

Evren Sirin wrote on October 01, 2007 10:00 PM:

>On 10/1/07 12:16 PM, Michael Schneider wrote:
>> Hi, Evren and Dmitry!
>> @Dmitry: Yes, what you say below was also the first thing 
>which came to my
>> mind, when I read Evren's answer. Of course, I wanted to 
>express that the
>> property 'manman' is somehow "equivalent" to a given, 
>*arbitrary* class
>> 'Man'. The axiom set should of course not only allow models 
>in which 'Man'
>> is an equivalent class of 'owl:Thing'. :)
>Ah, of course :)
>> But, Evren, many thanks for your reply! Great discussion, 
>great points! I
>> was completely unaware of this "Nonstructural Restrictions" 
>issue, and I
>> will look at it, as soon as I find time.
>When you read through that section you will actually see that those 
>nonstructural restrictions do not apply to the set of axioms 
>you had in 
>the beginning :) It is ok to use the same property in (local 
>or global) 
>reflexivity restrictions and cardinality restrictions at the 
>same time. 
>The nonstructural restrictions only limit the usage of composite 
>properties (the only composite property in your set of axioms is 
>brother) so it wasn't a problem to begin with.

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!


============ Ontology "timsrule.owl" ===================

<?xml version="1.0"?>
  <owl:Ontology rdf:about="">
    <owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
    >Created with TopBraid Composer</owl:versionInfo>
  <owl:Class rdf:ID="Man">
          <owl:FunctionalProperty rdf:ID="manman"/>
    <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
  <owl:Class rdf:ID="ExistsManman">
    <rdfs:subClassOf rdf:resource="#Man"/>
        <owl11:onClass rdf:resource="#Man"/>
          <owl:FunctionalProperty rdf:about="#manman"/>
    <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
  <owl:ObjectProperty rdf:ID="sibling"/>
  <owl:ObjectProperty rdf:ID="brother"/>
  <owl:FunctionalProperty rdf:about="#manman">
    <rdfs:domain rdf:resource="#Man"/>
    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
  <rdf:List rdf:ID="subRoleChain">
    <rdfs:subPropertyOf rdf:resource="#brother"/>
    <rdf:rest rdf:parseType="Collection">
      <owl:FunctionalProperty rdf:about="#manman"/>
    <rdf:first rdf:resource="#sibling"/>
  <owl:Thing rdf:ID="alice">
      <Man rdf:ID="bob"/>

<!-- Created with TopBraid Composer -->

============ TimsRuleDemo.java ==============

// Note: Needs 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;

import java.io.FileInputStream;

 * sibling(x,y) AND Man(x) ==> brother(x,y) in OWL-1.1
 * @author Michael Schneider (m_schnei@gmx.de)
public class TimsRuleDemo {
    public static void main(String[] args) {
        String ONT_FILENAME = "timsrule.owl"; // put in project-toplevel
        String BASE_URI = "http://example.org/timsrule.owl";
        try {
            OntModel ontModel =
            ontModel.read(new 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
Email: Michael.Schneider@fzi.de
Web  : http://www.fzi.de/ipe/eng/mitarbeiter.php?id=555

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 Monday, 1 October 2007 21:29:17 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:15 UTC