4

According to the original OWL definition of OWL DL, we can't give the same name to a class and an individual (which is a clear difference between OWL DL and OWL Full). "Punning" is introduced in OWL 2 and removes this restriction. So I can give same name to a class and an individual (and a property too).

Does OWL treat them as semantically the same or different? (Both have the same name, so they're syntactically the same.) Are these entities (having the same IRI) one and the same? [As in OWL everything is related to IRI only]

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
SuhasD
  • 728
  • 2
  • 7
  • 20

1 Answers1

6

Does OWL treats them as semantically same or different ? (both are having same IRI so syntactically same). In simple, do these entities (having same IRI) one and the same ? [As in OWL everything is related to IRI only]

From the documentation that you linked to (emphasis added):

2.4.1 F12: Punning

OWL 1 DL required a strict separation between the names of, e.g., classes and individuals. OWL 2 DL relaxes this separation somewhat to allow different uses of the same term, e.g., Eagle, to be used for both a class, the class of all Eagles, and an individual, the individual representing the species Eagle belonging to the (meta)class of all plant and animal species. However, OWL 2 DL still imposes certain restrictions: it requires that a name cannot be used for both a class and a datatype and that a name can only be used for one kind of property. The OWL 2 Direct Semantics treats the different uses of the same name as completely separate, as is required in DL reasoners.

When punning, you get to use the same name to refer to more than one thing; the IRI is the same, but that's it; the things are still different. If you use the same IRI as an identifier for a class, and for an individuals, that's all you've done. There's a class that's named by that IRI, and there's an individuals that's named by that IRI; they're not the same thing, and can't be the same thing, because classes and individuals are different kinds of things.

For instance, if you have a class called x and an individual called x, then you can say things like

    (the individual) x is related to individual y by object property p

or

    the individual y is an element of (the class x)

You can't say, though,

    the individual y is an element of (the individual) x [because individuals don't have elements, classes do]

or that

    (the class) x is related to individual y by object property p [because object properties don't relate classes to individuals, they relate individuals to individuals]

IRIs are really just names in OWL, they're not entities in and of themselves. Punning in OWL lets you use the same name for multiple things when there's no confusion of mixing those things up. In the case of classes and individuals, they're different kinds of things, so you can reuse names, because the context will always make it clear which one you meant.

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
  • Is it same thing for punning not only class - individual pair but also for class/property - individual , class - objectproperty and objectproperty - dataproperty pairs too ? same name but completely differente entities.e.g https://www.w3.org/2007/OWL/wiki/Punning – SuhasD Jul 05 '16 at 18:02
  • 1
    No - punning between properties and classes, or properties of different types, is not allowed. It makes your ontology owl 2 full. – Ignazio Jul 06 '16 at 08:05
  • @ignazio I see in the docs cited above that the same iri can't be used for different types of properties, or for a class and a datatype, but I don't see that it can't be used for a class and a property.. is that mentioned somewhere else? I thought that was actually one of the use cases mentioned in the spec... – Joshua Taylor Jul 06 '16 at 11:09
  • @ignazio Use case 14 in the spec has " The same term :PersonCompany denotes both a class (2) and an ObjectProperty(3, 4). This is possible in OWL 2 thanks to punning (Class ↔ ObjectProperty)." I think an IRI can be used to name a class and a property at the same time. – Joshua Taylor Jul 06 '16 at 11:11
  • 1
    @Ignazio I can give same name to Class , Object Property , Data Property and Individual at a time in protege (5.0.0). As protege supports reasoning over it that must be OWL-DL not OWL-FULL (only in OWL-DL reasoning is possible) – SuhasD Jul 08 '16 at 13:42
  • I'm positive data property and object property iris must be distinct. Protégé itself might not enforce this, but some reasoners do. I thought the same was true of classes and properties, but there I might be wrong. – Ignazio Jul 08 '16 at 13:47
  • @SuhasD Yes, Ignazio is right on this one: object properties and datatype properties cannot be named by the same IRI. It's right there in the part that I quoted: ***"OWL 2 DL still imposes certain restrictions: it requires that a name cannot be used for both a class and a datatype and that a name can only be used for one kind of property."*** – Joshua Taylor Jul 08 '16 at 13:56
  • @JoshuaTaylor Is there any way to validate the ontology ? I mean to check whether its a OWL-DL or OWL-FULL. Actually I created ontology in protege. Gave same name to both Object Property and Data Property. Made some individuals and run the default reasoner HermiT 1.3.8.3. But no error shown. – SuhasD Jul 08 '16 at 14:15
  • @SuhasD The very first Google result for `owl validator` is an [OWL 2 Validator](http://mowl-power.cs.man.ac.uk:8080/validator/). Maybe that would work. I'm not really clear why that would have been brought up in your own search results, though. – Joshua Taylor Jul 08 '16 at 14:38