Web Ontology Language (OWL) Abstract Syntax and Semantics
Appendix B. Examples (Informative)

Editors:
Peter F. Patel-Schneider, Bell Labs Research
Ian Horrocks, Department of Computer Science, University of Manchester
Frank van Harmelen, Department of Artificial Intelligence, Vrije Universiteit Amsterdam

Contents


Appendix B. Examples (Informative)

This appendix gives examples of the concepts developed in the rest of the document.

B.1 Examples of Mapping from Abstract Syntax to N-Triples

The transformation rules in Section 4 transform

  DatatypeProperty(ex:name)
  ObjectProperty(ex:author)
  Individual(type(ex:Book) (ex:author (Individual (ex:name xsd:string"Fred"))))

to

  [ex:name] [rdf:type] [owl:DatatypeProperty] .
  [ex:name] [rdfs:domain] [owl:Thing] .
  [ex:name] [rdfs:range] [rdfs:Literal] .

  [ex:author] [rdf:type] [owl:ObjectProperty] .
  [ex:author] [rdfs:domain] [owl:Thing] .
  [ex:author] [rdfs:range] [owl:Thing] .

  [ex:book] [rdf:type] [owl:Class] .
  [ex:book] [rdfs:subClassOf] [owl:Thing] .

  _:x [rdf:type] [owl:Thing] .
  _:x [rdf:type] [ex:Book] .
  _:x [ex:author] _:x1 .
  _:x1 [rdf:type] [owl:Thing] .
  _:x1 [ex:name] xsd:string"Fred" .

and

  ObjectProperty(ex:enrolledIn)
  Class(ex:Student complete ex:Person
                   restriction(ex:enrolledIn allValuesFrom(ex:School) minCardinality(1)))

to

  [ex:enrolledIn] [rdf:type] [owl:ObjectProperty] .
  [ex:enrolledIn] [rdfs:domain] [owl:Thing] .
  [ex:enrolledIn] [rdfs:range] [owl:Thing] .

  [ex:Person] [rdf:type] [owl:Class] .
  [ex:Person] [rdf:subClassOf] [owl:Thing] .

  [ex:School] [rdf:type] [owl:Class] .
  [ex:School] [rdf:subClassOf] [owl:Thing] .

  [ex:Student] [rdf:type] [owl:Class] .
  [ex:Student] [rdf:subClassOf] [owl:Thing] .

  [ex:Student] [owl:sameClassAs] _:x .
  _:x [owl:intersectionOf] _:l1 .
  _:l1 [rdf:type] [rdf:List] .
  _:l1 [rdf:first]  [ex:Person] .
  _:l1 [rdf:rest] [rdf:nil] .
  _:l2 [rdf:type] [rdf:List] .
  _:l2 [rdf:first]  _:lr .
  _:l2 [rdf:rest] [rdf:nil] .
  _:lr [owl:intersectionOf] _:lr1 .
  _:lr1 [rdf:type] [rdf:List] .
  _:lr1 [rdf:first] _:r1 .
  _:lr1 [rdf:rest] _:lr2 .
  _:lr2 [rdf:type] [rdf:List] .
  _:lr2 [rdf:first] _:r2 .
  _:lr2 [rdf:rest] [rdf:nil] .
  _:r1 [rdf:type] [owl:Restriction] .
  _:r1 [owl:onProperty] [ex:enrolledIn] .
  _:r1 [owl:allValuesFrom] [ex:School] .
  _:r2 [rdf:type] [owl:Restriction] .
  _:r2 [owl:onProperty] [ex:enrolledIn] .
  _:r2 [owl:minCardinality] xsd:decimal"1" .

B.2 Examples of Entailments in OWL/DL and OWL/Full

OWL/DL supports the entailments that one would expect, as long as the vocabulary can be shown to belong to the appropriate piece of the domain of discourse. For example,

John friend Susan .

does not OWL/DL entail

John rdf:type owl:Thing .
Susan rdf:type owl:Thing .
friend rdf:type owl:ObjectProperty .

and so all this would need to be added explicitly as an antecedent in order to draw the conclusion

John rdf:type _:x .
_:x owl:onProperty friend .
_:x owl:minCardinality 1 .

However, once these extra conditions are added, all natural entailments follow, except for those that involve descriptions with loops. For example,

John rdf:type owl:Thing .
friend rdf:type owl:ObjectProperty .
John rdf:type _:x .
_:x owl:onProperty friend .
_:x owl:maxCardinality 0 .

does not entail

John rdf:type _:x .
_:y owl:onProperty friend .
_:y owl:allValuesFrom _:y .

because there are no comprehension principles for such looping descriptions. It is precisely the lack of such comprehension principles that prevent the formation of paradoxes in OWL/DL while still retaining natural entailments.

In OWL/DL one can repair missing localizations in any separated-syntax KB by adding a particular set of localizing assertions consisting of all triples of the form

<individual> rdf:type owl:Thing .
<class> rdf:type owl:Class .
<oproperty> rdf:type owl:ObjectProperty .
<dtproperty> rdf:type owl:DataTypeProperty .

Call the result of adding all such assertions to a OWL/DL KB the localization of the KB.

OWL/Full supports the entailments that one would expect, and there is no need to provide typing information for the vocabulary. For example,

John friend Susan .

does OWL/Full entail

John rdf:type _:x .
_:x owl:onProperty friend .
_:x owl:minCardinality 1 .