Why use owl:Restriction as own:EquivalenceClass's property?
Asked Answered
M

1

5

I just start to learn Semantic Web and have a question about restriction class. I dug a while but haven't found any answer yet.. Any help would be much appreciated! From text book, I see examples of define restriction class, they are all about to define a anonymous owl:Restriction class bnode and link this bnode with property owl:equivalentClass.

example:

example:restrictionClass owl:equivalentClass [
    rdf:type owl:Restriction;
    owl:onProperty example:resProp;
    owl:someValuesFrom example:resValue.
]

My question is can we define a restriction class directly? Like:

 example:restrictionClass rdf:type owl:Restriction;
                         owl:onProperty example:resProp;
                         owl:someValuesFrom example:resValue.

What's the advantage to define anonymous owl:Restriction?

Maw answered 30/11, 2015 at 9:41 Comment(3)
This is actually a pretty interesting question. The short answer is that "no, you can't, because it'd would lead to ambiguous RDF graphs."Aporia
Side note: this is not limited to equivalent classes; the same can be done with subclass axioms.Pomatum
Hi Ignazio, thanks for the complement information, what's the motivation of using subClassOf? Could you give me some example? What's the difference?Maw
A
7

No, you can't. The RDF you're seeing is the encoding of the OWL axiom like: EquivalentClasses(C ObjectSomeValuesFrom(p D)). It gets encoded as:

:C owl:equivalentClass [
   rdf:type owl:Restriction;
   owl:onProperty :p;
   owl:someValuesFrom :D .
]

Now, suppose you also had the axiom EquivalentClasses(C ObjectSomeValuesFrom(r E)). That gets encoded as:

:C owl:equivalentClass [
   rdf:type owl:Restriction;
   owl:onProperty :r;
   owl:someValuesFrom :E .
]

Now, if you could apply the abbreviation that you want, you'd get:

:C rdf:type owl:Restriction ;
   owl:onProperty :p ;
   owl:onProperty :r ;
   owl:someValuesFrom :D ;
   owl:someValuesFrom :E .

Now there's ambiguity. Which of the following would C be equal to?

  • ObjectSomeValuesFrom(p D)
  • ObjectSomeValuesFrom(p E)
  • ObjectSomeValuesFrom(r D)
  • ObjectSomeValuesFrom(r E)

From the RDF alone, you don't have a way to tell. You actually need to encode the EquivalentClasses axioms.

Addendum

To address questions from the comments: I used C, p, and D to make the text shorter. Your original RDF snippet is the RDF encoding of the axiom

EquivalentClasses(
    example:restrictionClass
    ObjectSomeValuesFrom(example:resProp example:resValue)
)

That's what

example:restrictionClass owl:equivalentClass [
    rdf:type owl:Restriction;
    owl:onProperty example:resProp;
    owl:someValuesFrom example:resValue.
]

encodes. example:restrictionClass is the same IRI in both places. The entire blank node is the class expression ObjectSomeValuesFrom(example:resProp example:resValue). Then owl:equivalentClass just relates the two. Note that expressions aren't the same; the classes that they denote are the same. The mapping from OWL ontologies to RDF is given in OWL 2 Web Ontology Language: Mapping to RDF Graphs (Second Edition). Specifically, have a look at Table 1 in 2.1 Translation of Axioms without Annotations where you'll find the rules:

EquivalentClasses( CE1 ... CEn )
------------------------------------
T(CE1) owl:equivalentClass T(CE2) .
...
T(CEn-1) owl:equivalentClass T(CEn) . 

and

ObjectSomeValuesFrom( OPE CE )
------------------------------
_:x rdf:type owl:Restriction .
_:x owl:onProperty T(OPE) .
_:x owl:someValuesFrom T(CE) . 

When you go in the reverse direction, you can read in the RDF and reconstruct your axiom. But support that the mapping let you do the abbreviation that you're talking about, and you had two equivalent class axioms. You'd end up with ambiguous RDF, since you'd have two owl:onProperty triples, and two owl:someValuesFrom triples.

Maybe an example from arithmetic would help. We know that 4, 2+2, and 1+3 are all expressions that denote the same number. So we can have the axioms:

  • 4 = 2 + 2
  • 4 = 1 + 3

Now suppose that we encode that in RDF with something like:

:four :equals [ rdf:type :sum ; :left :two ; :right :two ] .
:four :equals [ rdf:type :sum ; :left :one ; :right :three ] .

That's nice, and we can reconstruct 4 = 2+2 and 4 = 1+3 from it. Now suppose we tried to move those properties to :four, rather than a blank node related by :equals. We'd end up with:

:four rdf:type :sum .
:four :left  :two .
:four :right :two .
:four :left  :one .
:four :right :three .

But what axioms is this supposed to represent? You have have four ways of picking a left and right from :four. Which of the following is it supposed to encode?

  • 4 = 2 + 2
  • 4 = 2 + 3
  • 4 = 1 + 2
  • 4 = 1 + 3
Aporia answered 30/11, 2015 at 15:32 Comment(4)
Thank you for the answer Joshua, I can't understand the EquivalentClasses(C ObjectSomeValuesFrom(p D)) and EquivalentClasses(C ObjectSomeValuesFrom(r E)) part. In my understanding EquivalentClasses is a way to say two classes actually refer to the same class, should those two :Restriction class equivalent as well? ( p owl:SymmetricProperty r; D owl:EquivalentClasses E. )Maw
@CharlesChow I've updated my answer with some more explanation.Aporia
Nice explanation! This answered my question! Can I understand restriction class as it restricts property with value (range?)? Or more general, restriction class binds two statement in certain classes?Maw
@CharlesChow I'm not really sure what you're asking. A restriction like ObjectSomeValuesFrom(p D) is a class expression. It denotes the class of things that have some value for property p from the class D. For instance ObjectSomeValuesFrom(hasCar Ford) is the class of all people people that have a Ford car.Aporia

© 2022 - 2024 — McMap. All rights reserved.