Question

My task is to construct two classes in owl. The Base class describes resources that contain several properties e.g. p1, p2 and p3. The other class, the Sub, shall describe resources similar to the Base class with the restriction, that they do not contain one of its properties, e.g. p1, but only p2 and p3. For example, the class Car would describe vehicles that contains some properties and one of them is 'hasMotor'. The class Bicycle would also describe vehicles with the restriction, that they do not have motor.

I use cardinality restrictions to define such classes:

@prefix : <http://sample.org/test#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://sample.org/test> .

<http://sample.org/test> rdf:type owl:Ontology ;                         
                         owl:versionInfo "0.2"^^xsd:string .


:p1 rdf:type owl:DatatypeProperty .
:p2 rdf:type owl:DatatypeProperty .
:p3 rdf:type owl:DatatypeProperty .

:Base rdf:type owl:Class ;
      rdfs:subClassOf [ rdf:type owl:Restriction ;
                        owl:onProperty :p3 ;
                        owl:someValuesFrom xsd:string
                      ] ,
                      [ rdf:type owl:Restriction ;
                        owl:onProperty :p2 ;
                        owl:someValuesFrom xsd:string
                      ] ,
                      [ rdf:type owl:Restriction ;
                        owl:onProperty :p1 ;
                        owl:someValuesFrom xsd:string
                      ] .


:Sub rdf:type owl:Class ;

     owl:equivalentClass [ rdf:type owl:Class ;
                           owl:intersectionOf ( :Base
                                                [ rdf:type owl:Restriction ;
                                                  owl:onProperty :p1 ;
                                                  owl:qualifiedCardinality "0"^^xsd:nonNegativeInteger ;
                                                  owl:onDataRange xsd:string
                                                ]
                                              )
                         ] .

But the Sub class is concluded by Pellet reasoner to be equivalent to Nothing. How should the two mentioned classes be described in owl?

Was it helpful?

Solution

What the axioms mean…

But I cannot understand the inference results produced by Pellet reasoner. The restriction on the existence of the property seems not to work. How can I define such a class?

You haven't said what the inference results that Pellet produces are, so it's hard to explain them in particular. But, we can still take a look at what your axioms are saying. OWL classes are really like sets, and the restrictions that you're defining are making assertions about the elements of those sets. When you say, for instance, that

Base ⊑ ∃prop.String

What you're saying is that

1. If some x is a Base, then there is some String s such that prop(x,s).

Now, you have two more axioms:

Sub ⊑ Base
Sub ⊑ =0 prop.String

These say that

2. If some x is a Sub, then x is also a Base.
3. If some x is a Sub, then there are exactly zero Strings s where prop(x,s).

…and why Sub is a subclass of everything else.

Moreover could you please explain why the Sub class is inferred to be a subclass of ObjProp.

Your ontology isn't inconsistent, but you do have the typically undesirable state of affairs that one of your classes, Sub, can't have members. Why is this the case? Well, suppose some x is a Sub. Then, because x is a Sub, it has exactly zero strings. Of course, every Sub is also a Base, so x is also a Base. Since it's a Base, then it must have at least one string. It can't have zero and at least one, so we can't actually have any instances of Sub. Since Sub is the empty class (i.e., equivalent to owl:Nothing) it's a subclass of every other class.

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