Question

Dear Semantic Web folks,

I'm questioning myself how I could define an "Excluded by" construction in OWL. For now the only solution I can think of is using disjointWith. What I mean with "Excluded by" is demonstrated in the example code. The House object is an intersection of Roof, Wall, Windows, and Floor. So if one of these classes miss, the individual will not become a House. But the inferencer will go further with reasoning because maybe the missing Classes for the particular intersection become true. On the other hand the House class has a disjointWith relationship with the Tsunami class. When my individual is a Tsunami class I know directly that my individual will never become a House class. This is behaviour I would expect when I talk about "Excluded by". But maybe somebody else has a different opinion on this?

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>

<!DOCTYPE rdf:RDF [
    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
]>

<rdf:RDF    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
            xmlns="http://www.almfluss.com/rdf/0.1/Ontology.owl#" 
            xmlns:owl="http://www.w3.org/2002/07/owl#">

<owl:Class rdf:about="#House">
    <owl:intersectionOf rdf:parseType="Collection">
        <rdf:Description rdf:about="#Roof"/>
        <rdf:Description rdf:about="#Wall"/>
        <rdf:Description rdf:about="#Windows"/>
        <rdf:Description rdf:about="#Floor"/>
    </owl:intersectionOf>
    <owl:disjointWith rdf:resource="#Tsunami"/>
</owl:Class>

<owl:NamedIndividual rdf:about="#instance_House">
    <rdf:type rdf:resource="#Roof"/>
    <rdf:type rdf:resource="#Wall"/>
    <rdf:type rdf:resource="#Windows"/>
    <rdf:type rdf:resource="#Floor"/>
    <rdf:type rdf:resource="#Tsunami"/>
</owl:NamedIndividual>


<owl:Class rdf:about="#Roof"/>
<owl:Class rdf:about="#Wall"/>
<owl:Class rdf:about="#Windows"/>
<owl:Class rdf:about="#Floor"/>
<owl:Class rdf:about="#Tsunami"/>

</rdf:RDF>

Regards, Martijn van der Plaat

Was it helpful?

Solution

To be honest, I don't quite understand what you're after. However, I get the feeling that you are trying to use OWL in quite the wrong way. So here are some tips to get a better model, which I hope give you a better understanding of how to use OWL effectively.

The most important poblem in your example ontology is that you use the class-instance relationship in a way that makes no sense. You have an individual that is of type Roof, Wall, Windows and Floor. That's conceptually just nonsense: how can something be all these four things at the same time?

The relationship between Houses and Roofs/Walls/Windows is not that one is the other (isA), but that they are part of each other. So you should not be using things like intersections and disjointness axioms to try and model your ontology, but instead use relationships and property restrictions.

For example, to model that a House must consist of at least one roof, four walls, and a window, you can do something like this (using OWL Manchester syntax):

Prefix: : <http://example.org/>

Class: Roof

Class: Window

Class: Wall

Class: House 
   SubClassOf: hasRoof min 1 and hasWall min 4 and hasWindow min 1

Class Tsunami
   DisjointWith: House

ObjectProperty: hasRoof
   Domain: House
   Range: Roof

ObjectProperty: hasWall
   Domain: House
   Range: Wall

ObjectProperty: hasWindow
   Domain: House
   Range: Window

Individual: myHouse
   Types: House 

Note how we define the class of Houses to be the subclass of all things that have at least four walls and one roof and at least one window. Note that we are using a subclass relation (not an equivalentClass relation), because we want to say that if something is a house, it must have these things. We don't want to say the inverse, because, after all, there do exist things that have four walls, a roof, and a window, but which are not houses (e.g. barns, sheds, shops).

As for Tsunamis: while it is true that the class of Houses and the class of Tsunamis are disjoint, I am not quite sure that it is a particularly useful thing to model. The more interesting relationship between tsunamis and houses is probably that one is a hazard for the other.

Also note: this is just an example of a possible way to model it. You can make alternative choices in modeling (e.g. using a generic hasPart property instead of specific hasRoof/hasWall/hasWindow properties to model relations between houses and roofs, walls, and windows) which are equally fine, depending on your needs/tastes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top