W3C


Structural Specification and Functional-Style Syntax

W3C Editor's Draft 2126 November 2008

This version:
http://www.w3.org/2007/OWL/draft/ED-owl2-syntax-20081121/http://www.w3.org/2007/OWL/draft/ED-owl2-syntax-20081126/
Latest editor's draft:
http://www.w3.org/2007/OWL/draft/owl2-syntax/
Previous version:
http://www.w3.org/2007/OWL/draft/ED-owl2-syntax-20081008/http://www.w3.org/2007/OWL/draft/ED-owl2-syntax-20081121/ (color-coded diff)
Editors:
Boris Motik, Oxford University
Peter F. Patel-Schneider, Bell Labs Research, Alcatel-Lucent
Bijan Parsia, University of Manchester
Contributors:
Ian Horrocks, Oxford University
Note: The complete list of contributors is being compiled and will be included in the next draft.


Abstract

OWL 2 extends the W3C OWL Web Ontology Language with a small but useful set of features that have been requested by users, for which effective reasoning algorithms are now available, and that OWL tool developers are willing to support. The new features include extra syntactic sugar, additional property and qualified cardinality constructors, extended datatype support, simple metamodeling, and extended annotations.
This document defines OWL 2 ontologies in terms of their structure, and it also defines a functional-style syntax in which ontologies can be written. Furthermore, this document provides an intuitiveinformal description of each of the constructs provided by the language.

Status of this Document

May Be Superseded

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This document is being published as one of a set of 11 documents:

  1. Structural Specification and Functional-Style Syntax (this document)
  2. Direct Semantics
  3. RDF-Based Semantics
  4. Conformance and Test Cases
  5. Mapping to RDF Graphs
  6. XML Serialization
  7. Profiles
  8. Quick Reference Guide
  9. New Features &and Rationale
  10. Manchester Syntax
  11. rdf:text: A Datatype for Internationalized Text

Please Comment By 2008-11-252008-11-28

The OWL Working Group seeks public feedback on these Working Drafts. Please send your comments to public-owl-comments@w3.org (public archive). If possible, please offer specific changes to the text that would address your concern. You may also wish to check the Wiki Version of this document for internal-review comments and changes being drafted which may address your concerns.

No Endorsement

Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

Patents

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.


[Show Short TOC]

Contents


1 Introduction

This document defines the OWL 2 language. The core part of this specification called the structural specification is independent of the concrete exchange syntaxes for OWL 2 ontologies. It describes the conceptual structure of OWL 2 ontologies and thus provides a normative abstract model for all (normative and nonnormative) syntaxes of OWL 2. This allows for a clear separation of the essential features of the language from issues related to any particular syntax. Furthermore, such a structural specification of OWL 2 provides the foundation for the implementation of OWL 2 tools such as APIs and reasoners.

This document also defines the functional-style syntax, which closely follows the structural specification and allows OWL 2 ontologies to be written in a compact form. This syntax is used in the definitions of the semantics of OWL 2 ontologies, the mappings from and into the RDF/XML exchange syntax, and the different profiles of OWL 2. Concrete syntaxes, such as the functional-style syntax, often provide features not found in the structural specification, such as a mechanism for abbreviating long URIs.

An OWL 2 ontology is a formal conceptualization of a domain of interest. OWL 2 ontologies consist of the following three different syntactic categories:

These three syntactic categories are used to express the logical part of OWL 2 ontologies that is, they are interpreted under a precisely defined semantics that allows useful inferences to be drawn. For example, if an individual a:Peter is an instance of the class a:Student, and a:Student is a subclass of a:Person, then from the OWL 2 semantics one can derive that a:Peter is also an instance of a:Person.

In addition, entities, axioms, and ontologies can be annotated in OWL 2. For example, a class can be given a human-readable label that provides an intuitivea more descriptive name for the class. Annotations have no effect on the logical aspects of an ontology that is, for the purposes of the OWL 2 semantics, annotations are treated as not being present. Instead, the use of annotations is left to the applications that use OWL 2. For example, a graphical user interface might choose to visualize a class using one of its labels.

Finally, OWL 2 provides basic support for ontology modularization. In particular, an OWL 2 ontology O can import another OWL 2 ontology O' and thus gain access to all entities, expressions, and axioms in O'.

1.1 Normative Status of this DocumentThis document defines the structural specification of OWL 2, the functional syntax for OWL 2, and the behavior of datatype maps. Only the parts of the document related to these three purposes are normative. The examples in this document are informative and any part of the document that is specifically identified as informative is not normative. Finally, the informal descriptions of the semantics of OWL 2 constructs in this document are informative; the semantics is precisely specified in a separate document [OWL 2 Direct Semantics].

The italicized keywords MUST, MUST NOT, SHOULD, SHOULD NOT, and MAY specify certain aspects of the normative behavior of OWL 2 tools, and are interpreted as specified in RFC 2119 [RFC 2119].

Section 2.1 states that "Duplicates SHOULD be eliminated [...] during parsing". This is to be interpreted as specifying the expected behavior of OWL 2 tools, and OWL 2 implementors are expected to make their best effort to actually eliminate duplicates during parsing. An OWL 2 tool implementor may, however, choose not to eliminate duplicates for various reasons, such as performance concerns. Provided that this design choice is clearly documented, such deviation from this specification does not preclude the tool from being comformant with the OWL 2 specification. The implementor is strongly encouraged, however, to provide a "no duplicates" mode for the case when the user is willing to pay the performance price.2 Preliminary Definitions

This section presents certain preliminary definitions that are used in the rest of this document.

2.1 UML Notation and Structural Equivalence

The structural specification of OWL 2 is defined using the Unified Modeling Language (UML) [UML], and the notation used is compatible with the Meta-Object Facility (MOF) [MOF]. This document uses only a very simple form of UML class diagrams that are expected to be intuitivelyeasily understandable toby readers who are familiar with the basic concepts of object-oriented systems, even if they are not familiar with UML. The names of abstract classes (i.e., classes that are not intended to be instantiated) are written in italic.

Elements of the structural specification are connected by associations, many of which are of the one-to-many type. Associations whose name is preceded by / are derived that is, their value is determined based on the value of other associations and attributes. Whether the elements participating in associations are ordered and whether repetitions are allowed is made clear by the following standard UML conventions:

Whether two elements of the structural specification are considered to be the same is captured by the notion of structural equivalence, defined as follows. Elements o1 and o2 are structurally equivalent if and only if the following conditions hold:

Note that structural equivalence is not a semantic notion, as it is based only on comparing structures.

The class expression UnionOf( a:Person a:Animal ) is structurally equivalent to the class expression UnionOf( a:Animal a:Person ) because the order of the elements in an unordered association is not important.

The class expression UnionOf( a:Person ComplementOf( a:Person ) ) is not structurally equivalent to owl:Thing even though the two expressions are semantically equivalent.

Although set associations are widely used in the specification, sets written in one of the linear syntaxes (e.g., XML or RDF/XML) are not necessarily expected to be duplicate free. Duplicates SHOULD be eliminated from such constructs during parsing.

An ontology written in functional-style syntax can contain a class expression of the form UnionOf( a:Person a:Animal a:Animal ). During parsing, this expression should be "flattened" to give the expression UnionOf( a:Person a:Animal ).

2.2 BNF Notation

Grammars in this document are specified using the standard BNF notation, summarized in Table 1.

Table 1. The BNF Notation
Construct Syntax Example
nonterminal symbols boldface ClassExpression
terminal symbols single quoted 'PropertyRange'
zero or more curly braces { ClassExpression }
zero or one square brackets [ ClassExpression ]
alternative vertical bar Assertion | Declaration

Terminal symbols used in the full-IRI, irelative-ref, NCName, languageTag, nodeID, nonNegativeInteger, and quotedString productions are defined by specifying their structure in English; to stress this, the English description is italicized.

Whitespace is a maximal sequence of space (U+20), horizontal tab (U+9), line feed (U+A), and carriage return (U+D) characters not occurring within a pair of " characters (U+22). A comment is a maximal sequence of characters that starts with the # (U+23) character and contains neither a line feed (U+A) nor a carriage return (U+D) character.

Whitespace and comments cannot occur within terminal symbols of the grammar. Whitespace and comments can occur between any two terminal symbols of the grammar, and all whitespace MUST be ignored. Whitespace MUST be introduced between a pair of terminal symbols if each terminal symbol in the pair consists solely of alphanumeric characters or matches the full-IRI, irelative-ref, NCName, nodeID, or quotedString production.

2.3 URIs and Namespaces

Ontologies and their elements are identified using International Resource Identifiers (IRIs) [RFC3987]. OWL 1 uses Uniform Resource Identifiers (URIs) as identifiers. To avoid introducing new terminology, this specification hereafter uses the term "URI" to mean "IRI". In the structural specification, IRIs are represented by the URI class. All IRIs in this specification are written using the grammar described below.

Thus,An IRI can be written as a full IRI. The < (U+3C) and > (U+3E) characters surrounding a full IRI are not part of the IRI, orbut are used solely for quotation purposes, identifying an IRI as a full IRI.

Alternatively, an IRI it can be abbreviated as a CURIE [CURIE]. To facilitate the latter,this end, commonly used IRIs called namespaces are associated with a prefix. An IRI U belongs to a namespace NU if, in their string representation, NU is a prefix of U; the part of U not covered by NU is called a reference of U w.r.t. NU. A URI U belonging to a namespace NU associated with a prefix pref is then commonly abbreviated as a CURIE pref:ref, where ref is the reference of U w.r.t. NU. CURIEs are not represented in the structural specification of OWL 2: if a concrete syntax of OWL 2 uses CURIEs to abbreviate long IRIs, these abbreviations MUST be expanded into full IRIs during parsing according to the rules of the respective syntax.

full-IRI := := 'IRI as defined in [RFC3987], enclosed in a pair of < (U+3C) and > (U+3E) characters'
NCName := := 'as defined in [XML Namespaces]'
irelative-ref := := 'as defined in [RFC3987]'

namespace := := full-IRI
prefix := := NCName
reference := := irelative-ref
curie := := [ [ prefix ] ':' ] reference

URI := := full-IRI | curie

Table 2 defines the standard namespaces and the respective prefixes used throughout this specification.

Table 2. Standard Namespaces and Prefixes Used in OWL 2
Namespace prefix Namespace
rdf <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
rdfs <http://www.w3.org/2000/01/rdf-schema#>
xsd <http://www.w3.org/2001/XMLSchema#>
owl <http://www.w3.org/2002/07/owl#>

IRIs belonging to the rdf, rdfs, xsd, and owl namespaces constitute the reserved vocabulary of OWL 2. As described in the following sections, the IRIs from the reserved vocabulary that are listed in Table 3 have special treatment in OWL 2. All IRIs from the reserved vocabulary not listed in Table 3 constitute the disallowed vocabulary of OWL 2 and MUST NOT be used in OWL 2 to name entities, ontologies, or ontology versions.

Table 3. Reserved Vocabulary of OWL 2 with Special Treatment
owl:backwardCompatibleWith owl:bottomDataProperty owl:bottomObjectProperty owl:dateTime owl:deprecated
owl:incompatibleWith owl:Nothing owl:priorVersion owl:rational owl:real
owl:realPlus owl:Thing owl:topDataProperty owl:topObjectProperty rdf:langPattern
rdf:text rdf:XMLLiteral rdfs:comment rdfs:isDefinedBy rdfs:label
rdfs:Literal rdfs:seeAlso xsd:anyURI xsd:base64Binary xsd:boolean
xsd:byte xsd:decimal xsd:double xsd:float xsd:hexBinary
xsd:int xsd:integer xsd:language xsd:length xsd:long
xsd:maxExclusive xsd:maxInclusive xsd:maxLength xsd:minExclusive xsd:minInclusive
xsd:minLength xsd:Name xsd:NCName xsd:negativeInteger xsd:NMTOKEN
xsd:nonNegativeInteger xsd:nonPositiveInteger xsd:normalizedString xsd:pattern xsd:positiveInteger
xsd:short xsd:string xsd:token xsd:unsignedByte xsd:unsignedInt
xsd:unsignedLong xsd:unsignedShort

2.4 Integers, Strings, Language Tags, and Node IDs

Several types of syntactic elements are commonly used in this document. Nonnegative integers are defined as usual.

nonNegativeInteger := := 'a nonempty finite sequence of digits between 0 and 9'

Characters and strings are defined in the same way as in [RDF:TEXT]. A character is an atomic unit of communication. The structure of characters is not further specified in OWL 2, other than to note that each character has a Universal Character Set (UCS) code point [ISO/IEC 10646]. The set of available characters is assumed to be infinite, and is thus independent from the currently actual version of UCS. A string is a finite sequence of characters, and the length of a string is the number of characters in it. In this document, strings are written as specified in [RDF:TEXT]: they are enclosed in double quotes,quotes (U+22), and a subset of the escaping mechanism of the N-triples specification [RDF Test Cases] is used to encode strings containing quotes.

quotedString := := 'a finite sequence of characters in which " (U+22) and \ (U+5C) occur only in pairs of the form \" (U+22, U+5C) and \\ (U+22, U+22), enclosed in a pair of " (U+22) characters'

Language tags are nonempty strings as defined in BCP 47 [BCP 47]. In this document, language tags are not enclosed in double quotes; however, this does not lead to parsing problems since, according to BCP 47, language tags contain neither whitespace nor the parenthesis characters ( (U+28) and ) (U+29).

languageTag := := 'a nonempty (not quoted) string defined as specified in BCP 47 [BCP 47]'

Node IDs are borrowed from the N-Triples specification [RDF Test Cases].

nodeID := := 'a node ID of the form _:name as specified in the N-Triples specification [RDF Test Cases]'

3 Ontologies

An OWL 2 ontology is the main partan instance O of the Ontology class from the structural specification, and its structure isspecification of OWL 2 shown in Figure 1.1 that satisfies certain conditions given below. The main component of an OWL 2 ontology is its set of axioms, the structure of which is described in more detail in Section 9. Because the association between an ontology and its axioms is a set, an ontology cannot contain two axioms that are structurally equivalent. Apart from the axioms, ontologies can also contain ontology annotations (as described in more detail in Section 3.5), and they can also import other ontologies (as described in Section 3.4).

The Structure of OWL 2 Ontologies
Figure 1. The Structure of OWL 2 Ontologies

3.1 Ontology URI and Version URI Each ontology MAY have an ontology URI , whichThe following list summarizes all the conditions that O is usedrequired to identifysatisfy to be an OWL 2 ontology.

An instance O of the Ontology class MAY have consistent declarations as specified in Section 5.8.2; however, this is not strictly necessary to make O an OWL 2 ontology.

3.1 Ontology URI and Version URI

Each ontology MAY have an ontology URI, which is used to identify an ontology. If an ontology has an ontology URI, the ontology MAY additionally have a version URI, which is used to identify the version of the ontology. The version URI MAY, but need not be equal to the ontology URI. An ontology without an ontology URI MUST NOT contain a version URI.

To prevent problems with identifying ontologies,The following nonnormative guidance is provided: If an ontology has anlist provides conventions for choosing ontology URI but noand version URI, then a different ontology with the same ontologyURI in OWL 2 ontologies. This specification provides no mechanism for enforcing these constraints across the entire Web; however, OWL 2 tools SHOULD use them to detect problems in ontologies they process.

This specification provides no mechanism for enforcing these constraints in the entire Web. Rather, the presented rules are to be taken as guidelines when naming new ontologies, and they MAY be used by OWL 2 tools to detect problems.The ontology URI and the version URI together identify a particular version from an ontology series the set of all the versions of a particular ontology identified using a common ontology URI. In each ontology series, exactly one ontology version is regarded as the current one. Structurally, a version of a particular ontology is an instance of the Ontology class from the structural specification. Ontology series are not represented explicitly in the structural specification of OWL 2; therefore, they exists2—they exist only as a side-effect of the naming conventions described in this and the following sections.

3.2 Ontology Documents

An OWL 2 ontology is an abstract notion defined in terms of the structural specification. Each ontology is associated with an ontology document, which physically contains the ontology stored in a particular way. The name "ontology document" reflects the expectation that a large number of ontologies will be stored in physical text documents written in one of the syntaxes of OWL 2. OWL 2 tools, however, are free to devise other types of ontology documents that is, to introduce other ways of physically storing ontologies.

Ontology documents are not represented in the structural specification of OWL 2, and the specification of OWL 2 makes only the following two assumptions about their nature:

The name "ontology document" reflects the expectation thatAn OWL 2 tool might publish an ontology as a large number of ontologies will be stored in physicaltext documentsdocument written in one ofthe syntaxes of OWL 2. OWL 2 tools, however, are free to devise other types of ontology documents that is, to introduce other ways of physically storing ontologies. For example,functional-style syntax (see Section 3.2.1) and accessible from the URI <http://www.example.com/ontology>. An OWL 2 tool cancould also devise a scheme for storing a set ofOWL 2 ontologies in a relational database. In such a case, each subset of the database representing the information about one ontology corresponds to one ontology document. To provide a mechanism for accessing these ontology documents, the OWL 2 tool should identify different database subsets with distinct URIs.

3.2.1 Functional-Style Syntax Ontology Documents A functional-style syntaxThe ontology document is a sequenceof Unicode characters [ UNICODE ]an ontology O SHOULD be accessible from some URIthe URIs determined by means ofthe standard protocols. A functional-style syntax ontology document SHOULD use the UTF-8 encoding [ RFC3629 ]; its text MUST must match the ontologyDocument production of the grammar defined in this specification document; andfollowing rules:

This ontology importsThus, the document containing the current version of an ontology whoseseries with some URI OU SHOULD be accessible from OU. To access a particular version of OU, one needs to know that version's version URI VU; then, the ontology document SHOULD be accessedaccessible from <http://www.example.com/ontology2> , and itVU.

An ontology document of an ontology that contains an ontology annotation providing a label forURI <http://www.example.com/my> but no version URI should be accessible from the URI <http://www.example.com/my>. In contrast, an ontology and a single subclass axiom. Ontology( <http://www.example.com/ontology1> Import( <http://www.example.com/ontology2> ) Annotation( rdfs:label "The example") SubClassOf( a:Child a:Person ) ) Each partdocument of an ontology that contains an ontology URI <http://www.example.com/my> and a version URI <http://www.example.com/my/2.0> should be accessible from the URI <http://www.example.com/my/2.0>. In both cases, the ontology document matchingshould be accessible from the prefixDefinition production associates a prefix with a namespace. Anrespective URIs using the HTTP protocol.

OWL 2 tools will often need to implement functionality such as caching or off-line processing, where ontology document MUST containdocuments may be stored at most one such definition per prefix,addresses different from the ones dictated by their ontology URIs and it MUST NOT containversion URIs. OWL 2 tools MAY implement a definition forredirection mechanism: when a prefix listed in Table 2. Prefix definitions aretool is used during parsingto expand CURIEs inaccess an ontology document at URI U, the tool MAY redirect U to a different URI DU and access the ontology document that is, partsfrom there instead. The result of accessing the ontology document matchingfrom DU MUST be the curie production into full URIssame as follows.if the prefix ofontology were accessed from U. Furthermore, once the CURIEontology document is not present, thenconverted into an ontology, the resulting full URI is equal toontology SHOULD satisfy the CURIE's reference. Ifthree conditions from the prefixbeginning of this section in the CURIE is present, then either Table 2 or the prefix definitions ofsame way as if it the ontology document being parsed MUST contain a definition associating the prefix with a namespace. The resulting full URI is obtained by concatenating the namespace name with the CURIE's reference. The full URI obtained bywere accessed from U. No particular redirection mechanism is specified this expansion MUSTis assumed to be a valid URI. Ifimplementation dependent.

To enable off-line processing, an ontology document does not satisfy all ofthat according to the specified conditions, it is syntactically invalid. 3.2.2 Accessingabove rules should be accessible from <http://www.example.com/my> might be stored in a file accessible from <file:///usr/local/ontologies/example.owl>. To access this ontology document, an OWL 2 Ontology Documentstool might redirect the URI <http://www.example.com/my> and actually access the ontology document of an ontology O SHOULD be accessiblefrom <file:///usr/local/ontologies/example.owl>. The URIs determined byontology obtained after accessing ontology document should satisfy the following rules:usual accessibility constraints: if O does not contain anthe ontology URI (and, consequently, it does not contain a version URI either),contains only the ontology URI, then the ontology document of O MAYURI should be accessible from any URI.equal to <http://www.example.com/my>, and if Othe ontology contains anboth the ontology URI OU but noand the version URI, then the ontology documentone of Othem should be accessible from the URI OUequal to <http://www.example.com/my>.

If D contains an3.2.1 Functional-Style Syntax Ontology URI OU andDocuments

A version URI VU , then thefunctional-style syntax ontology document is a sequence of O SHOULD beUnicode characters [UNICODE] accessible from thesome URI VU ; furthermore, if O is the current versionby means of the ontology series withstandard protocols such that its text matches the URI OU , thenontologyDocument production of the grammar defined in this specification document, and it can be converted into an ontology documentby means of O SHOULD also be accessible fromthe URI OU . Thus, the document containing the current versioncanonical parsing process described in Section 3.6 and other parts of an ontology series with some URI OU SHOULD be accessible from OU . To accessthis specification document. A particular version of OU , one needs to know that version's version URI VU ; then, thefunctional-style syntax ontology document SHOULD be accessible from VU . An ontology document of anuse the UTF-8 encoding [RFC3629].

ontologyDocument := { prefixDefinition } Ontology
that contains anprefixDefinition := 'Namespace' '(' [ prefix ] '=' namespace ')'
Ontology :=
    'Ontology' '(' [ ontologyURI [ versionURI ] ]
       directlyImportsDocuments
       ontologyAnnotations
       axioms
    ')'
ontologyURI := URI
<http://www.example.com/my> but no versionversionURI := URI
should be accessible from thedirectlyImportsDocuments := { 'Import' '(' URI <http://www.example.com/my> . In contrast, an')' }
axioms := { Axiom }

The following is a functional-style syntax ontology document of an ontology that containscontaining an ontology URI <http://www.example.com/my> and a version URI <http://www.example.com/my/2.0> should be accessible fromwith the ontology URI <http://www.example.com/my/2.0><http://www.example.com/ontology1>. In both cases, theThis ontology imports an ontology whose ontology document should be accessibleaccessed from the respective URIs using the HTTP protocol. OWL 2 tools will often need to implement functionality such as caching or off-line processing, where<http://www.example.com/ontology2>, and it contains an ontology documents may be stored at addresses different fromannotation providing a label for the ones as dictated by theirontology URIsand version URIs. OWL 2 tools MAY implement a redirection mechanism: whena tool is used to access ansingle subclass axiom.

Ontology(<http://www.example.com/ontology1>
    Import(<http://www.example.com/ontology2>)
    Annotation( rdfs:label "The example")

    SubClassOf( a:Child a:Person )
)

Each part of the ontology document at URI U ,matching the tool MAY redirect U toprefixDefinition production associates a different URI DUprefix with a namespace. An ontology document MUST contain at most one such definition per prefix and accessat most one such definition without a prefix, and it MUST NOT contain a definition for a prefix listed in Table 2. Prefix definitions are used during parsing to expand CURIEs in the ontology document from there instead. The result that is, parts of accessingthe ontology document from DU MUST bematching the samecurie production into full URIs as follows. The full URI obtained by this expansion MUST be a valid URI.

3.3 Versioning of OWL 2 Ontologies

The conventions from Section 3.2.23.2 provide a simple mechanism for versioning OWL 2 ontologies. An ontology series is identified using an ontology URI, and each version in the series is assigned a different version URI. The ontology document of the ontology representing the current version of the series SHOULD be accessible from the ontology URI and, if present, at its version URI as well; the ontology documents of the previous versions SHOULD be accessible solely from their respective version URIs. When a new version O in the ontology series is created, the ontology document of O SHOULD replace the one acessible from the ontology URI (and it SHOULD also be accessible from its version URI).

The ontology document containing the current version of an ontology series might be accessible from the URI <http://www.example.com/my>, as well as from the version-specific URI <http://www.example.com/my/2.0>. When a new version is created, the ontology document of the previous version should remain accessible from <http://www.example.com/my/2.0>; the ontology document of the new version, called, say, <http://www.example.com/my/3.0>, should be made accessible from both <http://www.example.com/my> and <http://www.example.com/my/3.0>.

3.4 Imports

An OWL 2 ontology can import other ontologies in order to gain access to their entities, expressions, and axioms, thus providing the basic facility for ontology modularization.

Assume that one wants to describe research projects about diseases. Managing information about the projects and the diseases in the same ontology might be cumbersome. Therefore, one might create a separate ontology O about diseases and a separate ontology O' about projects. The ontology O' would import O in order to gain access to the classes representing diseases; intuitively,this allows one to use the diseases from O when writing the axioms of O'.

From a physical point of view, an ontology contains a set of URIs, shown in Figure 1 as the directlyImportsDocuments association, that identify the ontology documents of the directly imported ontologies. These URIs SHOULD be interpreted as specified in Section 3.2.23.2 to access the ontology documents and convert them into ontologies; the result of this process determines the logical directly imports relation between ontologies, shown in Figure 1 as the directlyImports association. The logical imports relation between ontologies, shown in Figure 1 as the imports association, is the transitive closure of directly imports. In Figure 1, associations directlyImports and imports are shown as derived associations, since their values are derived from the value of the directlyImportsDocuments association; furthermore, ontology documents usually provide means to store the directlyImportsDocuments association, but not the directlyImports and imports associations.

The following functional-style syntax ontology document contains an ontology that directly imports an ontology contained in the ontology document accessible from URI <http://www.example.com/my/2.0>.

Ontology(<http://www.example.com/importing-ontology>
    Import(<http://www.example.com/my/2.0>)

...
)

The URIs identifying the ontology documents of the directly imported ontologies can be redirected as described in Section 3.2.23.2. For example, in order to access the ontology document from a local cache, the ontology document <http://www.example.com/my/2.0> might be redirected to <file:///usr/local/ontologies/imported.v20.owl>. Note that this can be done without changing the ontology document of the importing ontology.

The import closure of an ontology O is a set containing O and all allthe ontologies that O imports. The import closure of O SHOULD NOT contain ontologies O1 and O2 such that

The axiom closure of an ontology O is the smallest set that contains all the axioms from each ontology O' in the import closure of O with all anonymous individuals renamed apart that is, the anonymous individuals from different ontologies in the import closure of O are treated as being different; see Section 5.6.2 for further details.

In OWL 1, owl:imports was a special ontology property that was used to identify the ontology documents of the imported ontologies. In OWL 2, imports are not ontology properties, but are a separate primitive; thus, the owl:imports ontology property has no built-in meaning in OWL 2.3.5 Ontology Annotations

An OWL 2 ontology contains a set of annotations. These can be used to associate information with an ontology such as for example the ontology creator's name. As discussed in more detail in Section 10 in more detail,, each annotation consists of an annotation property and an annotation value, and the latter can be a literal, a URI, or an anonymous individual. Ontology annotations do not affect the logical meaning of the ontology.

ontologyAnnotations := := { Annotation }

OWL 2 provides several built-in annotation properties for ontology annotations. The usage of these annotation properties on entities other than ontologies is discouraged.

4 Datatype Maps3.6 Canonical Parsing

Many OWL 2 ontologies can contain values with built-in semantics, such as strings or integers. Such values are often called concrete , in ordertools need to distinguish them from the abstract values which are modeled using classes and individuals. Each kind of such values is called a datatype , andsupport ontology parsing the setprocess of all supported datatypes is called a datatype map . A datatype map is notconverting an ontology document written in a syntactic construct that is includedparticular syntax into an OWL 2 ontologies; therefore, it is not includedontology. In order to be able to instantiate the appropriate classes from the structural specification of OWL 2. Each datatype in a datatype map is identified by a URI, and it can bespecification, the ontology parser sometimes needs to know which URIs are used in an OWL 2the ontology as described in Section 5.2 . More precisely, a datatype map is a 6-tuple D = ( N DT , N LS , N FS , DT , LS , FS ) with the following components. N DT is a set of datatypes, eachentities of which type. This typing information is identified by a URI, not containing the datatype rdfs:Literal . N LS is a functionextracted from declarations axioms that assignsassociate URIs with entity types. Please refer to each datatype DT N DT a set N LS (DT) of strings called lexical values .Section 5.8 for more information about declarations.

An ontology parser for the set N LS (DT) is calledontology documents written in functional-style syntax might encounter the lexical space of DT . N FSfollowing axiom:

SubClassOf ( a:Father SomeValuesFrom( a:parentOf a:Child ) )

From this axiom alone, it is a function that assigns to each datatype DT N DT a set N FS (DT) of pairs of the form F V , where Fnot clear whether a:parentOf is an object or a constraining facetdata property, and whether a:Child is identified bya URI, and V is an arbitrary object calledclass or a value . The set N FS (DT) is calleddatatype. In order to disambiguate the facet spacetypes of DT . For each datatype DT N DT ,these URIs, the interpretation function DT assignsparser needs to DT a set (DT) DT calledlook at the value space of DT . For each datatype DT N DT and each lexical value LV N LS (DT) ,declarations in the interpretation function LS assigns toontology document being parsed, as well as those in the pair LV DT a data value ( LV DT ) LS (DT) DT .directly or indirectly imported ontology documents.

In OWL 2 there is no requirement for each datatype DT N DT and each pair F V N FS (DT) , the interpretation function FS assigns to F V a facet value ( F V ) FS (DT) DT . To include a datatype DT intoa datatype map, one thus needsdeclaration of an entity to provide the lexical space N LS (DT) , the facet space N FS (DT) , the value space (DT) DT ,physically precede the data value ( LV DT ) LS for each LV N LS (DT) , and a facet value ( F V ) FSentity's usage in ontology documents; furthermore, declarations for each F V N FS (DT) . Such a specification is often identified with DTentities can be placed in imported ontology documents and is usually also called a datatype; the intended meaning of the term "datatype" is expectedimports are allowed to be clear from the context. The OWL 2 datatype map consists of datatypes describedcyclic. In order to precisely define the restresult of ontology parsing, this section, most of which are based on XML Schema Datatypes, version 1.1 [ XML Schema Datatypes ].specification defines the definitionsnotion of these datatypes incanonical parsing. An OWL 2 are largely the same as in XML Schema; however, there are minor differences, all of which are clearly identifiedparser MAY implement parsing in any way it chooses, as long as it produces a result that is structurally equivalent to the following sections. These differences were introduced mainly to align the semanticsresult of canonical parsing.

An OWL 2 datatypes with practical use cases. As shown in the OWL 2 Direct Semantics [ OWL 2 Direct Semantics ], the semantic consequences ofontology ODGU corresponding to an ontology depend exclusively ondocument DGU accessible at a given URI GU can be obtained using the setfollowing canonical parsing process. All steps of actually used datatypes. Implementations are therefore free to extendthis process MUST be successfully completed.

It is a nonnegative integer xsd:integerimportant to understand that canonical parsing merely defines the setresult of all integers xsd:nonNegativeIntegerthe setparsing process, and that a "smart" implementation of OWL 2 MAY optimize this process in numerous ways. In order to enable efficient parsing, OWL 2 implementations are encouraged to write ontologies into documents by placing all nonnegative integers xsd:nonPositiveIntegerURI declarations before the set of all negative integers plus (positive) zero xsd:positiveIntegeraxioms that use these URIs; however, this is not required for conformance.

A "smart" parser for the setfunctional-style syntax of all positive integers xsd:negativeIntegerOWL 2 can parse the set of all negative integers xsd:longontology in a single pass when the set of all integers between -9223372036854775808 and 9223372036854775807, inclusive xsd:intdeclarations for the set of all integers between -2147483648 and 2147483647, inclusive xsd:shortURIs are placed in the settext of all integers between -32768 and 32767, inclusive xsd:byteO physically before the set of all integers between -128 and 127, inclusive xsd:unsignedLongURIs are used. Similarly, a "smart" parser can optimize the sethandling of all integers between 0 and 18446744073709551615, inclusive xsd:unsignedIntimported ontologies in cases when the set of all integersimport relation between 0 and 4294967295, inclusive xsd:unsignedShortthe setontologies is acyclic.

4 Datatype Maps

OWL 2 ontologies can contain values with built-in semantics, such as strings or integers. Such values are often called concrete, in order to distinguish them from the abstract values which are modeled using classes and individuals. Each kind of all integers between 0such values is called a datatype, and 65535, inclusive xsd:unsignedBytethe set of all integers between 0 and 255, inclusive Feature At Risk #1: owl:rational support Note: This featuresupported datatypes is "at risk" and may be removed from this specification based on feedback. Please send feedback to public-owl-comments@w3.orgcalled a datatype map. The owl:rationalA datatype might be removed frommap is not a syntactic construct that is included in OWL 2 if implementation experience reveals problems with supporting this datatype. Lexical Sapce. Datatypes owl:realPlus and owl:real do not directly provide any lexical values. The owl:rational datatype supports lexical values defined by the following grammar (whitespace within the grammar MUST be ignored and MUSTontologies; therefore, it is not beincluded in the lexical valuesstructural specification of owl:dateTimte ,OWL 2. Each datatype in a datatype map is identified by a URI, and single quotes areit can be used to introduce terminal symbols): numerator '/' denominator where numerator isin an integer with the syntaxOWL 2 ontology as specified for the xsd:integer datatype, and denominatordescribed in Section 5.2.

More precisely, a datatype map is a positive, nonzero integer6-tuple D = ( NDT , NLS , NFS , ⋅ DT , ⋅ LS , ⋅ FS ) with the syntax as specified for the xsd:integer datatype, not containing the plus sign.following components.

To include a coredatatype DT into a datatype map, one thus needs to provide the lexical space NLS(DT), the facet space NFS(DT), the value if itsspace (DT)DT, the data value is in the( LV DT )LS for each LV NLS(DT), and a facet value space of xsd:long( F V )FS for each F V NFS(DT). Feature At Risk #2: xsd:decimal precision Note: This featureSuch a specification is "at risk"often identified with DT and mayis usually also called a datatype; the intended meaning of the term "datatype" is expected to be removedclear from the context.

The OWL 2 datatype map consists of datatypes described in the rest of this specificationsection, most of which are based on feedback. Please send feedback to public-owl-comments@w3.org . The newXML Schema spec contains an acknowledged editorial error inDatatypes, version 1.1 [XML Schema Datatypes]. The definitiondefinitions of core lexical values for xsd:decimal . This document will be updated to state that core decimal lexical valuesthese datatypes in OWL 2 are those that can be expressed with sixteen decimal digits, as is stated here. This document will be updated to uselargely the wordingsame as in theXML Schema spec if the changeSchema; however, there is madeare minor differences, all of which are clearly identified in time. Equality and Ordering.the facet space offollowing sections. These differences were introduced mainly to align the numericsemantics of OWL 2 datatypes are basedwith practical use cases.

As shown in the OWL 2 Direct Semantics [OWL 2 Direct Semantics], the semantic consequences of an ontology depend exclusively on the following definitionsset of equality and ordering.actually used datatypes. Implementations are therefore free to extend the equality = isdatatype map described in this section with extra datatypes without affecting the smallest symmetric relation onconsequences of OWL 2 ontologies that do not use these datatypes.

4.1 Numbers

OWL 2 provides a rich set of datatypes, listed in Table 4, for representing various kinds of numbers.

Value Spaces. The value spaces of all numeric datatypes are shown in Table 4. The value space of owl:realPlus such that allcontains the value spaces of all other numeric datatypes. The following conditions hold: x = x if x is a real number,special values -0, +INF, -INF, or +INF ;and -0 = +0 . Note thatNaN isare not equalidentical to itself; furthermore, even thoughany number. In particular, -0 is equal to +0 ,not a real number and it is not identical to it.real number zero; to understand the distinction between identity and equality, consider the following example ontology: PropertyAssertion( a:Meg a:numberOfChildren "+0"^^xsd:float )stress this distinction, the value of a:numberOfChildren for a:Megreal number zero is often called a positive zero, written +0.

PropertyAssertion( a:Meg a:numberOfChildren "-0"^^xsd:float ) TheTable 4. Numeric Datatypes and Their Value of a:numberOfChildren for a:Meg is -0 . FunctionalProperty( a:numberOfChildren ) An individual can have at most oneSpaces
Datatype Value for a:numberOfChildren .Space
owl:realPlus the last axiom states that no individual should have more than one distinct value for a:numberOfChildren . Even thoughset of all real numbers extended with four special values -0 (negative zero), +INF (positive andinfinity), -INF (negative zeros are equal, they are distinct values ; hence, the first two axioms violateinfinity), and NaN (not-a-number)
owl:real the restrictionset of all real numbers
owl:rational the last axiom, which leads to inconsistency. The ordering < is the smallest relation on the value spaceset of owl:realPlus such thatall ofrational numbers
xsd:double the following conditions hold: x < y if xfour special values -0, +INF, -INF, and y areNaN, plus the set of all real numbers and xof the form m × 2e where m is smalleran integer whose absolute value is less than y ; -INF < x < +INF for each real number x ; -INF <253 and e is an integer between -1075 and 970, inclusive
xsd:float the four special values -0 <, +INF ; -0 < x for each positive real number x ; and x < -0 for each negative real number x . Note that +0 is a real number, -INF, and is thus covered by the first two cases. According to the above definition,NaN, plus the subsetset of all real numbers of the form m × 2e where m is an integer whose absolute value space of owl:realPlus between -1is less than 224 and 1 contains both +0e is an integer between -149 and -0 . Facet Space.104, inclusive
xsd:decimal the facet spaceset of each numeric datatype DT is shown in Table 5. Table 5. The Facet Spaceall real numbers of a Numeric Datatype DT Pair Facet Value xsd:minInclusive Vthe form i × 10-n where Vi is froman integer and n is a nonnegative integer
xsd:integer the value spaceset of owl:realPlusall integers
xsd:nonNegativeInteger the set of all numbers x (DT) DT such that x = V or x > V xsd:maxInclusive V where V is fromnonnegative integers
xsd:nonPositiveInteger the value spaceset of owl:realPlusall negative integers plus (positive) zero
xsd:positiveInteger the set of all numbers x (DT) DT such that x = V or x < V xsd:minExclusive V where V is frompositive integers
xsd:negativeInteger the value spaceset of owl:realPlusall negative integers
xsd:long the set of all numbers x (DT) DT such that x > V xsd:maxExclusive V where V is fromintegers between -9223372036854775808 and 9223372036854775807, inclusive
xsd:int the value spaceset of owl:realPlusall integers between -2147483648 and 2147483647, inclusive
xsd:short the set of all numbers x (DT) DT such that x < V Relationship with XML Schema. Numeric datatypes in OWL 2 differ fromintegers between -32768 and 32767, inclusive
xsd:byte the numeric datatypesset of XML Schema [ XML Schema Datatypes ] in the following aspects: OWL 2 provides the owl:realall integers between -128 and owl:realPlus datatypes.127, inclusive
xsd:unsignedLong the value spacesset of all datatypes are subsets ofintegers between 0 and 18446744073709551615, inclusive
xsd:unsignedInt the value spaceset of owl:realPlus ; thus, unlike in XML Schema,all integers between 0 and 4294967295, inclusive
xsd:unsignedShort the value spacesset of xsd:floatall integers between 0 and xsd:double are in OWL 2 not disjoint with65535, inclusive
xsd:unsignedByte the value spaceset of xsd:decimalall integers between 0 and 255, inclusive

Feature At Risk #1: owl:rational support

Note: This feature is "at risk" and may be removed from this specification based on feedback. Please send feedback to public-owl-comments@w3.org.

Only a subset of the XML Schema constraining facets are supported. In other respects,The numeric datatypes ofowl:rational datatype might be removed from OWL 2 agreeif implementation experience reveals problems with the definitions of XML Schema Datatypes [ XML Schemasupporting this datatype.

Lexical Spaces. Datatypes ]. 4.2 Strings OWL 2 usesowl:realPlus and owl:real do not directly provide any lexical values.

The rdf:textowl:rational datatype forsupports lexical values defined by the representation of stringsfollowing grammar (whitespace within the grammar MUST be ignored and MUST NOT be included in a particular language.the definitionslexical values of owl:dateTime, and single quotes are used to introduce terminal symbols):

numerator '/' denominator

where numerator is an integer with the value space, the lexical space,syntax as specified for the facet space,xsd:integer datatype, and denominator is a positive, nonzero integer with the necessary mappingssyntax as specified for the xsd:integer datatype, not containing the plus sign. Each such lexical value of owl:rational is mapped to the rational number obtained by dividing numerator by denominator.

For DT a datatype from XML schema, lexical values of DT are given in [ RDF:TEXT ].defined as specified in addition, OWL 2 supports the followingXML Schema Datatypes [XML Schema Datatypes ]: xsd:string xsd:normalizedString xsd:token xsd:language xsd:Name xsd:NCName xsd:NMTOKEN]. Furthermore, each pair "abc" DT is assigned a data value by interpreting "abc" as recommendedspecified in XML Schema Datatypes [ RDF:TEXT ],XML Schema Datatypes] for DT.

The value spaceslexical values of theseowl:rational, xsd:decimal, and the datatypes derived from xsd:integer are subsets of the value space of rdf:text ; please refermapped to [ RDF:TEXT ] for aarbitrarily large and arbitrarily precise definition. 4.3 Boolean Valuesnumbers. An OWL 2 implementation MAY support all such lexical values; however, it MUST support at least the xsd:boolean datatype allows forfollowing core lexical values, which can easily be mapped to the representation of Booleanprimitive values commonly found in modern implementation platforms:

Feature At Risk #2: xsd:decimal precision

Note: This feature is the set of finite sequences of octets integers between 0 and 255, inclusive. Lexical Spaces. The lexical values of the xsd:hexBinary"at risk" and xsd:base64Binary datatypes are strings ofmay be removed from this specification based on feedback. Please send feedback to public-owl-comments@w3.org.

The form "abc" , whose structure is specified in Sections 3.3.16 and 3.3.17 of XML Schema Datatypes [new XML Schema Datatypes ], respectively.spec contains an acknowledged editorial error in the definition of core lexical values are mappedfor xsd:decimal. This document will be updated to datastate that core decimal lexical values are those that can be expressed with sixteen decimal digits, as specifiedis stated here. This document will be updated to use the wording in the XML Schema Datatypes [ XML Schema Datatypes ]. Facet Space. The facet space ofspec if the xsd:hexBinary and xsd:base64Binary datatypeschange there is shownmade in Table 6. Table 6.time.

Equality and Ordering. The facet space of the xsd:hexBinary and xsd:base64Binarynumeric datatypes Pair Facet Value xsd:minLength V where V is a nonnegative integerare based on the set of finite sequencesfollowing definitions of octets of length at least V xsd:maxLength V where Vequality and ordering.

The equality = is a nonnegative integerthe set of finite sequencessmallest symmetric relation on the value space of octetsowl:realPlus such that all of length at most V xsd:length V where Vthe following conditions hold:

Note that NaN is not equal to itself; furthermore, even though -0 is equal to +0, it is not identical to it.

To understand the xsd:anyURI datatype allows fordistinction between identity and equality, consider the representation of Uniform Resource Identifiers. Value Space.following example ontology:

PropertyAssertion( a:Meg a:numberOfChildren "+0"^^xsd:float ) The value spaceof xsd:anyURIa:numberOfChildren for a:Meg is the set URIs as defined in XML Schema Datatypes [ XML Schema Datatypes ]. Although each URI has a string representation,+0.
PropertyAssertion( a:Meg a:numberOfChildren "-0"^^xsd:float ) The value spaceof xsd:anyURIa:numberOfChildren for a:Meg is disjoint with-0.
FunctionalProperty( a:numberOfChildren ) An individual can have at most one value for a:numberOfChildren.

The last axiom states that no individual should have more than one distinct value space of xsd:stringfor a:numberOfChildren. Even though positive and negative zeros are equal, they are distinct values; hence, the string representation of URIs, however, can be described by a regular expression, sofirst two axioms violate the value spacerestriction of xsd:anyURI is isomorphicthe last axiom, which leads to inconsistency.

The ordering < is the smallest relation on the value space of xsd:string restricted with a suitable regular expression. Lexical Space. The lexical valuesowl:realPlus such that all of the xsd:anyURI datatypefollowing conditions hold:

Note that +0 is a real number and is thus covered by the lexical values of xsd:anyURI include relative URIs. If an OWL 2 syntax employs rules forfirst two cases.

According to the resolution of relative URIs (e.g.,above definition, the OWL 2 XML Syntax [ OWL 2 XML Syntax ] uses xml:base for that purpose), such rules do not apply to xsd:anyURI lexical values that represent relative URIs; that is,subset of the lexical values representing relative URIs MUST be parsed as they are.value space of owl:realPlus between -1 and 1 contains both +0 and -0.

Facet Space. The facet space of the xsd:anyURIeach numeric datatype DT is shown in Table 7.5.

Table 7.5. The Facet Space of the xsd:anyURIa Numeric Datatype DT
Pair Facet Value
xsd:minLength xsd:minInclusive V
where V is a nonnegative integerfrom the value space of owl:realPlus
the set of URIs U (xsd:anyURI)all numbers x (DT)DT such that the length of the string representation of U is at leastx = V xsd:maxLengthor x > V
xsd:maxInclusive V
where V is a nonnegative integerfrom the value space of owl:realPlus
the set of URIs U (xsd:anyURI)all numbers x (DT)DT such that the length of the string representation of U is at mostx = V xsd:lengthor x < V
xsd:minExclusive V
where V is a nonnegative integerfrom the value space of owl:realPlus
the set of URIs U (xsd:anyURI)all numbers x (DT)DT such that the length of the string representation of U is exactlyx > V
xsd:pattern xsd:maxExclusive V
where V is a string regular expression withfrom the syntax as in Section Fvalue space of XML Schema Datatypes [ XML Schema Datatypes ]owl:realPlus
the set of URIs U (xsd:anyURI)all numbers x (DT)DT whose string representation matches the regular expressionsuch that x < V

4.6 Time InstantsRelationship with XML Schema. Numeric datatypes in OWL 2 provides the owl:dateTime datatype for the representation of time instants. This datatype is equivalent todiffer from the xsd:dateTime datatypenumeric datatypes of XML Schema Datatypes[XML Schema Datatypes] with a required timezone. Feature At Risk #3: owl:dateTime name Note: This feature is "at risk" and may be removed from this specification based on feedback. Please send feedback to public-owl-comments@w3.org .in the name owl:dateTime is currently a placeholder. XML Schema 1.1 Working Group will introduce a datatype for date-time with required timezone. Once this is done, owl:dateTime will be changed to whatever name XML Schema chooses. Iffollowing aspects:

In other respects, the first time instantnumeric datatypes of OWL 2 are aligned with the 1stdefinitions of January 1 ADXML Schema Datatypes [XML Schema Datatypes].

4.2 Strings

OWL 2 uses the rdf:text datatype for the representation of strings in a particular language. The proleptic Gregorian calendardefinitions of the value space, the lexical space, the facet space, and the necessary mappings are given in [ ISO 8601:2004 ] (i.e.,RDF:TEXT].

In addition, OWL 2 supports the calendarfollowing XML Schema Datatypes [XML Schema Datatypes]:

As recommended in which[RDF:TEXT], the Gregorian datesvalue spaces of these datatypes are retroactively appliedsubsets of the value space of rdf:text; please refer to [RDF:TEXT] for a precise definition.

4.3 Boolean Values

The dates precedingxsd:boolean datatype allows for the introductionrepresentation of Boolean values.

Value Space. The Gregorian calendar). This set can be seen as a "copy"value space of xsd:boolean is the set of real numbers that is, it is disjoint with but isomorphic tocontaining exactly the two values true and false. These values are not contained in the value space of owl:real . For simplicity, the elements from this sets can be identified with real numbers.any other datatype.

Lexical Space. The owl:dateTimexsd:boolean datatype supports lexical values defined bythe following grammar (whitespace within the grammar MUST be ignoredlexical values:

Facet Space. The xsd:boolean datatype does not support any constraining facets.

4.4 Binary Data

Datatypes xsd:hexBinary and xsd:base64Binary allow for the representation of binary data. The this stringtwo datatypes are as follows: Characters - (U+2D), T (U+54),the same apart from fact that they support a different syntactic representation for lexical values.

Value Spaces. The value space of both xsd:hexBinary and : (U+3A) separatexsd:base64Binary is the various partsset of finite sequences of octets integers between 0 and 255, inclusive.

Lexical Spaces. The string. year is an integer consistinglexical values of at least four decimal digits optionally preceded by a minus sign; leading zero digits are prohibited except to bringthe digit count up to four. month , day , hour ,xsd:hexBinary and minutexsd:base64Binary datatypes are integers consistingstrings of exactly two decimal digits. secondthe form "abc", whose structure is an integer consisting of exactly two decimal digits, or two decimal digits, a decimal point,specified in Sections 3.3.16 and one or more trailing digits. timezone specifies a count3.3.17 of minutes that has to be added to or subtracted from UTC in order to get local time. The grammar for timezone is given byXML Schema Datatypes [XML Schema Datatypes], respectively. The following three alternatives, each of which islexical values are mapped to an integerdata values as specified next: a time pointin XML Schema Datatypes [XML Schema Datatypes].

Facet Space. The facet space of the form '+' tzHours ':' tzMinutes between +00:00 (inclusive)xsd:hexBinary and +14:00 (exclusive)xsd:base64Binary datatypes is mapped to the value + tzHours 60 + tzMinutes ; a time pointshown in Table 6.

Table 6. The Facet Space of the form '-' tzHours ':' tzMinutes between -00:00 (inclusive)xsd:hexBinary and -14:00 (exclusive) is mapped to thexsd:base64Binary Datatypes
Pair Facet Value
- tzHours 60 + tzMinutes ; 'Z' xsd:minLength V
where V is mapped toa nonnegative integer
the value 0 . month is between 1 and 12 (inclusive). day is no more than 30 if month is oneset of 4, 6, 9, or 11; no more than 28 if month is 2 and year is not divisible 4, or is divisible by 100 but not by 400; and no more than 29 if month is 2 and year is divisible by 400, or by 4 but not by 100. hour , minute , and second represent a time point between 00:00:00 (inclusive) and 24:00:00 (exclusive). Each such lexical valuefinite sequences of octets of length at least V
xsd:maxLength V
where V is assigneda data value as specified bynonnegative integer
the following function,set of finite sequences of octets of length at most V
xsd:length V
where div represents integer division and modV is a nonnegative integer
the remainderset of integer division. This mapping does not take into account leap seconds: leap seconds will be introduced in UTC as deemed necessary in future; sincefinite sequences of octets of length exactly V

4.5 URIs

The precise date when this will be donexsd:anyURI datatype allows for the representation of Uniform Resource Identifiers.

Value Space. The value space of xsd:anyURI is not known,the OWL 2 specification ignores leaps seconds. dataValue(year, month, day, hour, minutes, seconds, timezone) = 31536000 (year-1) + # convert all previous years to seconds 86400 ( (year-1) div 400 - (year-1) div 100 + (year-1) div 4) + # adjust for leap years 86400 Sum m < month daysInMonth(year, m) + # add the duration ofset URIs as defined in XML Schema Datatypes [XML Schema Datatypes]. Although each month 86400 (day-1) + # addURI has a string representation, the durationvalue space of xsd:anyURI is disjoint with the previous days 3600 hour + 60 (minutes - timezone) + seconds # addvalue space of xsd:string. The current time daysInMonth(y, m) = 28 if m = 2 and [ (y mod 4 0) or (y mod 100 = 0 and y mod 400 0) ] 29 if m = 2 and [ (y mod 400 = 0) or (y mod 4 = 0 and y mod 100 0) ] 30 if m { 4, 6, 9, 11 } 31 if m { 1, 3, 5, 7, 8, 10, 12 } Lexical valuesstring representation of owl:dateTime can represent an arbitrary date. An OWL 2 implementation MAY support all such lexical values;URIs, however, it MUST support at least all lexical values in whichcan be described by a regular expression, so the absolutevalue space of the year componentxsd:anyURI is less than 10000 (i.e., whose representation requires at most four digits), and in whichisomorphic to the second component is a numbervalue space of xsd:string restricted with at most three decimal digits. Faceta suitable regular expression.

Lexical Space. The facet spacelexical values of the owl:dateTimexsd:anyURI datatype and their mapping to data values are defined in Section 3.3.18 of XML Schema Datatypes [XML Schema Datatypes].

Note that the lexical values of xsd:anyURI include relative URIs. If an OWL 2 syntax employs rules for the resolution of relative URIs (e.g., the OWL 2 XML Syntax [OWL 2 XML Syntax] uses xml:base for that purpose), such rules do not apply to xsd:anyURI lexical values that represent relative URIs; that is, the lexical values representing relative URIs MUST be parsed as they are.

Facet Space. The facet space of the xsd:anyURI datatype is shown in Table 8.7.

Table 8.7. The Facet Space of the owl:dateTimexsd:anyURI Datatype
Pair Facet Value
xsd:minInclusive xsd:minLength V
where V is from the value space of owl:dateTimea nonnegative integer
the set of all time instants x (owl:dateTime)URIs U (xsd:anyURI)DT such that x = V or x >the length of the string representation of U is at least V
xsd:maxInclusive xsd:maxLength V
where V is from the value space of owl:dateTimea nonnegative integer
the set of all time instants x (owl:dateTime)URIs U (xsd:anyURI)DT such that x = V or x <the length of the string representation of U is at most V
xsd:minExclusive xsd:length V
where V is from the value space of owl:dateTimea nonnegative integer
the set of all time instants x (owl:dateTime)URIs U (xsd:anyURI)DT such that x >the length of the string representation of U is exactly V
xsd:maxExclusive xsd:pattern V
where V is froma string regular expression
with the value spacesyntax as in Section F of owl:dateTimeXML Schema Datatypes [XML Schema Datatypes]
the set of all time instants x (owl:dateTime)URIs U (xsd:anyURI)DT such that x < V 4.7 XML Literals OWL 2 useswhose string representation matches the rdf:XMLLiteralregular expression V

4.6 Time Instants

OWL 2 provides the owl:dateTime datatype for the representation of XML content in OWL 2 ontologies. The definitions of the value space, the lexical space, and the mapping from the lexicaltime instants. This datatype is equivalent to the value space are given in Section 5.1xsd:dateTime datatype of the RDF specificationXML Schema Datatypes [ RDF ]. The rdf:XMLLiteral datatype supports no constraining facets.XML Schema Datatypes] with a required timezone.

Feature At Risk #4: rdf:XMLLiteral support#3: owl:dateTime name

Note: This feature is "at risk" and may be removed from this specification based on feedback. Please send feedback to public-owl-comments@w3.org.

ThisThe name owl:dateTime is currently a placeholder. XML Schema 1.1 Working Group will introduce a datatype mightfor date-time with required timezone. Once this is done, owl:dateTime will be removed from OWL 2changed to whatever name XML Schema chooses. If the users and implementorsschedule of the XML Schema 1.1 Working Group slips the OWL 2 do not express support toWorking Group will consider possible alternatives.

Value Space. The datatype. 5 Entities and Literals Entities arevalue space of owl:dateTime is the fundamental building blocksset of OWL 2 ontologies, and they definenumbers, where each number x represents the vocabularytime instant occurring x seconds after the named termsfirst time instant of an ontology.the 1st of January 1 AD in logic,the proleptic Gregorian calendar [ISO 8601:2004] (i.e., the calendar in which the Gregorian dates are retroactively applied to the dates preceding the introduction of the Gregorian calendar). This set can be seen as a "copy" of entitiesthe set of real numbers that is, it is usually saiddisjoint with but isomorphic to constitutethe signaturevalue space of an ontology. Apartowl:real. For simplicity, the elements from entities, OWL 2 ontologies typically also contain literals, such as strings or integers.this set can be identified with real numbers.

Lexical Space. The structure of entitiesowl:dateTime datatype supports lexical values defined by the following grammar (whitespace within the grammar MUST be ignored and literals in OWL 2 is shownMUST NOT be included in Figure 2. Classes, datatypes, object properties, data properties, annotation properties, and named individuals are entities,the lexical values of owl:dateTime, and theysingle quotes are all uniquely identified by a URI. Classes can beused to model setsintroduce terminal symbols):

year '-' month '-' date 'T' hour ':' minute ':' second timezone

The components of individuals; datatypesthe this string are sets of literals suchas strings or integers; objectfollows:

Each such lexical value spaces of all datatypes in the datatype map. Datatype := URIis assigned a data value as specified by the datatype xsd:integer denotesfollowing function, where div represents integer division and mod is the setremainder of all integers. It caninteger division. This mapping does not take into account leap seconds: leap seconds will be usedintroduced in axioms suchUTC as deemed necessary in future; since the following one: PropertyRange( a:hasAge xsd:integer ) The range of the a:hasAge propertyprecise date when this will be done is xsd:integer . 5.3 Object Properties Object properties connect pairs of individuals. ObjectProperty := URI URIs used to identify object properties MUSTnot be inknown, the reserved vocabulary, apart from owl:topObjectProperty and owl:bottomObjectProperty , which are available inOWL 2 as built-in object properties with a predefined semantics. The object property with URI owl:topObjectProperty connectsspecification ignores leaps seconds.

dataValue(year, month, day, hour, minutes, seconds, timezone) =
    31536000 × (year-1) +        # convert all possible pairs of individuals. (In DL literature this is often calledprevious years to seconds
    86400 × ( (year-1) div 400 - (year-1) div 100 + (year-1) div 4) +        # adjust for leap years
    86400 × Summ < month daysInMonth(year, m) +        # add the top role.)duration of each month
    86400 × (day-1) +        # add the object property with URI owl:bottomObjectProperty does not connect any pairduration of individuals. (In DL literature this is often calledthe bottom role.)previous days
    3600 × hour + 60 × (minutes - timezone) + seconds        # add the object property a:parentOfcurrent time


daysInMonth(y, m) =
    28     if m = 2 and [ (y mod 4 0) or (y mod 100 = 0 and y mod 400 0) ]
    29     if m = 2 and [ (y mod 400 = 0) or (y mod 4 = 0 and y mod 100 0) ]
    30     if m { 4, 6, 9, 11 }
    31     if m { 1, 3, 5, 7, 8, 10, 12 }

Lexical values of owl:dateTime can be used torepresent the parenthood relationship between individuals.an arbitrary date. An OWL 2 implementation MAY support all such lexical values; however, it can be usedMUST support at least all lexical values in axioms such aswhich the following one: PropertyAssertion( a:parentOf a:Peter a:Chris ) Peter is a parent of Chris. 5.4 Data Properties Data properties connect individuals with literals. In some knowledge representation systems, functional data properties are called attributes . DataProperty := URI URIs used to identify data properties MUST NOT be in the reserved vocabulary, apart from owl:topDataProperty and owl:bottomDataProperty , which are are available in OWL 2 as built-in data properties with a predefined semantics. The data property with URI owl:topDataProperty connects all possible individuals with all literals. (In DL literature this is often called the top role.) The data property with URI owl:bottomDataProperty does not connect any individual with a literal. (In DL literature this is often called the bottom role.) The data property a:hasName can be used to associate a name with each person. It can be used in axioms such as the following one: PropertyAssertion( a:hasName a:Peter "Peter Griffin" ) Peter's name is "Peter Griffin" . 5.5 Annotation Properties Annotation properties can be used to provide an annotation for an ontology, axiom, or a URI. The structure of annotations is further described in Section 10 . AnnotationProperty := URI URIs used to identify annotation properties MUST NOT be in the reserved vocabulary, apart from the following URIs from the reserved vocabulary, which are are available in OWL 2 as built-in annotation properties. The rdfs:label annotation property can be used to provide a URI with a human-readable label. The rdfs:comment annotation property can be used to provide a URI with a human-readable comment. The rdfs:seeAlso annotation property can be used to provide a URI with another URI such that the latter provides additional information about the former. The rdfs:isDefinedBy annotation property can be used to provide a URI with another URI such that the latter provides information about the definition of the former; the way in which this information is provided is not described by this specification. An annotation with the owl:deprecated annotation property and the value equal to "true"^^ xsd:boolean can be used to specify that a URI is deprecated. The owl:priorVersion annotation property is described in more detail in Section 3.5 . The owl:backwardCompatibleWith annotation property is described in more detail in Section 3.5 . The owl:incompatibleWith annotation property is described in more detail in Section 3.5 . The comment provided by the following annotation assertion axiom can, for example, be used by an OWL 2 tool to display additional information about the URI a:Peter . AnnotationAssertion( rdfs:comment a:Peter "The father of the Griffin family from Quahog." ) This axiom provides a comment for the URI a:Peter . 5.6 Individuals Individuals represent the actual objects from the domain being modeled. There are two types of individuals in OWL 2. Named individuals are given an explicit name that can be used in any ontology in the import closure to refer to the same individual. Anonymous individuals are local to the ontology they are contained in. Individual := NamedIndividual | AnonymousIndividual 5.6.1 Named Individuals Named individuals are identified using a URI. Since they are given a URI, named individuals are entities. URIs used to identify named individuals MUST NOT be in the reserved vocabulary. NamedIndividual := URI The individual a:Peter can be used to represent a particular person. It can be used in axioms such as the following one: ClassAssertion( a:Person a:Peter ) Peter is a person. 5.6.2 Anonymous Individuals If an individual is not expected to be used outside an ontology, one can model it as an anonymous individual , which is identified by a local node ID. Anonymous individuals are analogous to blank nodes in RDF [ RDF Syntax ]. AnonymousIndividual := nodeID Anonymous individuals can be used, for example, to represent objects whose identity is of no relevance, such as the address of a person. PropertyAssertion( a:livesAt a:Peter _:1 ) Peter lives at some (unknown) address. PropertyAssertion( a:city _:1 a:Quahog ) This unknown address is in the city of Quahog and... PropertyAssertion( a:state _:1 a:RI ) ...in the state of Rhode Island. Special treatment is required in case anonymous individuals with the same node ID occur in two different ontologies. In particular, these two individuals are structurally equivalent (because they have the same node ID); however, they are treated as different individuals in the semantics of OWL 2 (because anonymous individuals are local to an ontology they are used in). The latter is achieved by renaming anonymous individuals apart in the axiom closure of an ontology O : when constructing the axiom closure of O , if anonymous individuals with the same node ID occur in two different ontologies in the import closure of O , then one of these individuals MUST be replaced in the respective ontology with a fresh anonymous individual (i.e., with an anonymous individual having a globally unique node ID). Assume that ontologies O 1 and O 2 both use _:a5 , and that O 1 imports O 2 . Intuitively, within O 1 and O 2 , each occurrence of _:a5 refers to the same individual; however, the individual _:a5 in O 1 may be different from the individual _:a5 in O 2 . At the level of the structural specification, individual _:a5 in O 1 is structurally equivalent to individual _:a5 in O 2 . This might be important, for example, for tools that use structural equivalence to define semantics of axiom retraction. That these individuals are treated differently by the semantics is achieved by renaming them apart when computing the axiom closure of O 1 either _:a5 in O 1 is replaced with a fresh anonymous individual, or this is done for _:a5 in O 2 . 5.7 Literals Literals represent values such as particular strings or integers. They are analogous to literals in RDF [ RDF Syntax ] and can also be understood as individuals denoting well-known data values. Each literal consists of a lexical value, which is a string, and a datatype. The datatype map determines which lexical value can be used with which datatype; an ontology containing a literal whose lexical value is not allowed by the datatype map is syntactically invalid. The datatype map also determines how the literal is mapped to the actual data value. The datatypes and literals supported in OWL 2 are described in more detail in Section 4 . Literals are generally written in the functional-style syntax as "abc"^^datatypeURI . The functional-style also supports the abbreviations for common types of text literals [ RDF:TEXT ], and OWL 2 implementations SHOULD use these abbreviated forms whenever possible. These abbreviations are purely syntactic shortcuts and are thus not reflected in the structural specification of OWL 2. Literals of the form "abc"^^ xsd:string SHOULD be abbreviated to "abc" . Literals of the form "abc@languageTag"^^ rdf:text SHOULD be abbreviated to "abc"@ language . Literal := typedLiteral | abbreviatedXSDStringLiteral | abbreviatedRDFTextLiteral typedLiteral := lexicalValue '^^' Datatype lexicalValue := quotedString abbreviatedXSDStringLiteral := quotedString abbreviatedRDFTextLiteral := quotedString '@' languageTag "1"^^ xsd:integer is a literal that represents the integer 1. "Family Guy" is an abbreviation for "Family Guy"^^ xsd:string a literal with the lexical value "Family Guy" and the datatype xsd:string . "Padre de familia"@es is an abbreviation for the literal "Padre de familia@es"^^ rdf:text a literal denoting a pair consisting of the string "Padre de familia" and the language tag es denoting the Spanish language. Two literals are structurally equivalent if and only if both the lexical value and the datatype are structurally equivalent; that is, literals denoting the same data value are structurally different if either their lexical value or the datatype is different. Even through literals "1"^^ xsd:integer and "+1"^^ xsd:integer are interpreted as the integer 1, these two literals are not structurally equivalent because their lexical values are not the same. Similarly, "1"^^ xsd:integer and "1"^^xsd:positiveInteger are not structurally equivalent because their datatypes are not the same. 5.8 Entity Declarations and Typing Each URI U used in an OWL 2 ontology O can, and sometimes even must, be declared in O ; roughly speaking, this means that the axiom closure of O must contain an appropriate declaration for U . A declaration for U in O serves two purposes: A declaration says that U exists that is, it says that U is part of the vocabulary of O . A declaration associates with U an entity type that is, it says whether U is used in O as a class, datatype, object property, data property, annotation property, an individual, or a combination thereof. An ontology might contain a declaration for the URI a:Person and state that this URI is a class. Such a declaration states that a:Person exists in the ontology and it states that the URI is used as a class. An ontology editor might use declarations to implement functions such as "Add New Class". In OWL 2, declarations are a type of axiom; thus, to declare an entity in an ontology, one can simply include the appropriate axiom into the ontology. These axioms are nonlogical in the sense that they do not affect the direct semantics of an OWL 2 ontology [ OWL 2 Direct Semantics ]. The structure of entity declarations is shown in Figure 3. Figure 3. Entity Declarations in OWL 2 Declaration := 'Declaration' '(' axiomAnnotations Entity ')' Entity := 'Class' '(' Class ')' | 'Datatype' '(' Datatype ')' | 'ObjectProperty' '(' ObjectProperty ')' | 'DataProperty' '(' DataProperty ')' | 'AnnotationProperty' '(' AnnotationProperty ')' | 'NamedIndividual' '(' NamedIndividual ')' The following axioms state that the URI a:Person is used as a class and that the URI a:Peter is used as an individual. Declaration( Class( a:Person ) ) Declaration( NamedIndividual( a:Peter ) ) Declarations for the built-in entities of OWL 2, listed in Table 9, are implicitly present in every OWL 2 ontology. Table 9. Declarations of Built-In Entities Declaration( Class( owl:Thing ) ) Declaration( Class( owl:Nothing ) ) Declaration( ObjectProperty( owl:topObjectProperty ) ) Declaration( ObjectProperty( owl:bottomObjectProperty ) ) Declaration( DataProperty( owl:topDataProperty ) ) Declaration( DataProperty( owl:bottomDataProperty ) ) Declaration( Datatype( rdfs:Literal ) ) Declaration( Datatype( U ) ) for each URI U of a datatype in the datatype map (see Section 4 ) Declaration( AnnotationProperty( U ) ) for each URI U of a built-in annotation property listed in Section 5.5 5.8.1 Typing Constraints A URI U is declared to be of type T in an OWL 2 ontology O if a declaration axiom of type T for U is contained in the axiom closure of O or in the set of built-in declarations listed in Table 9. An ontology O can declare a URI U to be of more than one type, and it must declare U in certain cases; the rules governing declarations are called typing constraints and are listed below. If O does not satisfy these typing constraints, it is syntactically invalid. Property typing constraints: If an object property with a URI U occurs in some axiom in O , then O MUST declare U to be an object property. If a data property with a URI U occurs in some axiom in O , then O MUST declare U to be a data property. If an annotation property with a URI U occurs in some axiom in O , then O MUST declare U to be an annotation property. A URI U MUST NOT be declared in O as being of more than one type of property; that is, U MUST NOT be declared in O to be both object and data, object and annotation, or data and annotation property. Class/datatype typing constraints: If a class with a URI U occurs in some axiom in O , then O MUST declare U to be a class. If a datatype with a URI U occurs in some axiom in O , then O MUST declare U to be a datatype. A URI U MUST NOT be declared in the axiom closure of O to be both a class and a datatype. A declaration for a URI U MUST NOT violate the constraints on the usage of reserved vocabulary listed in the previous sections. The typing constraints thus ensure that the sets of URIs used as object, data, and annotation properties in O are disjoint and that, similarly, the setsabsolute value of URIs used as classes and datatypes in O are disjoint as well. These constraints are used for disambiguatingthe types of URIs when reading ontologies from external transfer syntaxes. All other declarations are optional. A URI U can be used as an individual in O even if Uyear component is not declared as an individual in O . Declarations are often omitted in the examples in this document in cases where types of entities are intuitively clear. 5.8.2 Declaration Consistency Although declarations are optional for theless than 10000 (i.e., whose representation requires at most part, they can be used to catch obvious errors in ontologies. The following ontology erroneously refers to the individual a:Petre instead of the individual a:Peter . Ontology( <http://www.my.domain.com/example> ClassAssertion( a:Person a:Petre ) ) There is no way of telling whether a:Petre was used by mistake. If, in contrast, all individuals in an ontology were by convention required to be declared, this error could be caught by a simple tool. An ontology O is said to have consistent declarations if each URI U occurringfour digits), and in which the axiom closure of O in position of an entity withsecond component is a type Tnumber with at most three decimal digits.

Facet Space. The facet space of the owl:dateTime datatype is declaredshown in O as having type T . OWL 2 ontologies are not required to have consistent declarations: an ontology MAY be used even if its declarations are not consistent.Table 8.

Table 8. The ontology fromFacet Space of the previous example fails this check: a:Petreowl:dateTime Datatype
Pair Facet Value
xsd:minInclusive V
where V is used as an individual butfrom the ontology does not declare a:Petre to be an individual, and similarly for a:Person . In contrast,value space of owl:dateTime
the following ontology satisfies this condition. Ontology( <http://www.my.domain.com/example> Declaration( Class( a:Person ) ) Declaration( NamedIndividual( a:Peter ) ) ClassAssertion( a:Person a:Peter ) ) 5.8.3 Canonical Parsing Many OWL 2 tools need to support ontology parsingset of all time instants x (owl:dateTime)DT such that x = V or x > V
xsd:maxInclusive V
where V is from the processvalue space of converting an ontology document written in a particular syntax into appropriate instancesowl:dateTime
the set of all time instants x (owl:dateTime)DT such that x = V or x < V
xsd:minExclusive V
where V is from the value space of owl:dateTime
the classesset of all time instants x (owl:dateTime)DT such that x > V
xsd:maxExclusive V
where V is from the structural specificationvalue space of owl:dateTime
the set of all time instants x (owl:dateTime)DT such that x < V

4.7 XML Literals

OWL 2. In order to be able to instantiate the appropriate classes from2 uses the structural specification,rdf:XMLLiteral datatype for the ontology parser sometimes needs to know which URIs are usedrepresentation of XML content in OWL 2 ontologies. The ontology as entitiesdefinitions of which type. This typing information is extracted from declarations. An ontology parser forthe ontology documents written in functional-style syntax might encountervalue space, the following axiom: SubClassOf ( a:Father SomeValuesFrom( a:parentOf a:Child ) ) From this axiom alone, it is not clear whether a:parentOf is an object or a data property,lexical space, and whether a:Child is a class or a datatype. In order to disambiguatethe types of these URIs,mapping from the parser needslexical to look at the declarations the ontology document being parsed, as well as intothe directly or indirectly imported ontology documents.value space are given in OWL 2 there is no requirement for a declarationSection 5.1 of an entity to physically precedethe entity's usage in ontology documents; furthermore, declarations for entities can be placed into imported ontology documentsRDF specification [RDF]. The rdf:XMLLiteral datatype supports no constraining facets.

Feature At Risk #4: rdf:XMLLiteral support

Note: This feature is "at risk" and imports are allowed tomay be cyclic. In order to precisely define the result of ontology parsing,removed from this specification defines the notion of canonical parsingbased on feedback. Please send feedback to public-owl-comments@w3.org.

AnThe rdf:XMLLiteral datatype might be removed from OWL 2 parser MAY implement parsing in any way it chooses, as long as it produces a result that is structurally equivalent toif implementation experience reveals problems with supporting this datatype.

5 Entities and Literals

Entities are the resultfundamental building blocks of canonical parsing.OWL 2 ontologies, and they define the result of canonical parsingvocabulary the named terms of an ontology document D isontology. In logic, the ontology O obtained byset of entities is usually said to constitute the following process. If anysignature of these steps cannot be completed for some reason, then D MUST be rejectedan ontology. Apart from entities, OWL 2 ontologies typically also contain literals, such as syntactically invalid.strings or integers.

The document Dstructure of entities and literals in OWL 2 is analyzedshown in orderFigure 2. Classes, datatypes, object properties, data properties, annotation properties, and named individuals are entities, and they are all uniquely identified by a URI. Classes can be used to extract the setmodel sets of URIs Imp(D)individuals; datatypes are sets of literals such as strings or integers; object and data properties can be used to represent relationships in the directly ontologiesmodeled domain; annotation properties can be used to associate nonlogical information with ontologies, axioms, and entities; and named individuals can be used to represent actual objects from the set of declarations Decl(D) explicitly present in D .domain being modeled. Apart from named individuals, OWL 2 also provides for each URI Uanonymous individuals that is, individuals that are analogous to blank nodes in RDF [RDF Syntax] and that are accessible only from within the set Imp(D) ,ontology they are used in. Finally, OWL 2 provides for literals, which consist of a lexical value and a datatype specifying how to interpret this value.

The Hierarchy of Entities in OWL 2
Figure 2. The documentHierarchy of the ontology pointed at by U is accessed as specifiedEntities in Section 3.4 , and the previous step is repeated recursively. Let AllDecl(D)OWL 2

5.1 Classes

Classes can be the set of all declarationsunderstood as sets of Dindividuals.

Class := URI

URIs used to identify classes MUST NOT be in the reserved vocabulary, apart from owl:Thing and owl:Nothing, definedwhich are available in OWL 2 as built-in classes with a predefined semantics.

Classes from the structural specification accordinga:Child and a:Person can be used to model the rulesset of the respective syntax. Declarationsall children and persons, respectively, in AllDecl(D) arethe application domain, and they can be used to correctly disambiguate URI references. If Din an axiom such as the following one:

SubClassOf( a:Child a:Person ) Each child is a functional-style syntax ontology document, these declarationsperson.

5.2 Datatypes

Datatypes are usedentities that refer to disambiguate the productions for Class ,sets of values described by a datatype , ObjectProperty , DataProperty , AnnotationProperty , and NamedIndividual . The previous step is appliedmap (see Section 4). Thus, datatypes are analogous to all ontology documents directly imported into D andclasses, the resulting ontologies are identified asmain difference being directly imported into O . It is important to understandthat canonical parsing merely definesthe result of the parsing process,former contain values such as strings and thatnumbers, rather than individuals. Datatypes are a "smart" implementationkind of OWL 2 MAY optimize this process in numerous ways. In order to enable efficient parsing, OWL 2 implementations are encourageddata ranges, which allows them to write ontologies into documents by placingbe used in restrictions. All URI declarations beforedatatypes have arity one. The axiomsbuilt-in datatype rdfs:Literal denotes any set that use these URIs; however, this is not required for conformance. A "smart" parser forcontains the functional-style syntaxunion of OWL 2 can parsethe ontologyvalue spaces of all datatypes in a single pass when the declarations forthe URIs are placed indatatype map. Each datatype other than rdfs:Literal MUST belong to the text of O physically beforedatatype map.

Datatype := URI

The URIs are used. Similarly, a "smart" parser can optimizedatatype xsd:integer denotes the handlingset of imported ontologiesall integers. It can be used in cases whenaxioms such as the import relation betweenfollowing one:

PropertyRange( a:hasAge xsd:integer ) The ontologies is acyclic. In some cases, itrange of the a:hasAge property is possiblexsd:integer.

5.3 Object Properties

Object properties connect pairs of individuals.

ObjectProperty := URI

URIs used to inferidentify object properties MUST NOT be in the reserved vocabulary, apart from owl:topObjectProperty and owl:bottomObjectProperty, which are available in OWL 2 as built-in object properties with a predefined semantics.

The missing declarations MUST actuallyobject property a:parentOf can be addedused to represent the ontology. Consider an ontology containingparenthood relationship between individuals. It can be used in axioms such as the following axioms: Declaration( Class( a:Child ) ) SubClassOf ( a:Father SomeValuesFrom(one:

PropertyAssertion( a:parentOf a:Child )a:Peter a:Chris ) The only way for the ontology to make sensePeter is if a:parentOf were declareda parent of Chris.

5.4 Data Properties

Data properties connect individuals with literals. In some knowledge representation systems, functional data properties are called attributes.

DataProperty := URI

URIs used to identify data properties MUST NOT be an object property. Hence,in the ontology can be repaired by addingreserved vocabulary, apart from owl:topDataProperty and owl:bottomDataProperty, which are are available in OWL 2 as built-in data properties with a predefined semantics.

The data property a:hasName can be used in an OWL 2 ontology to referto more than one type of entity. Such usage of U is often called metamodeling , becauseassociate a name with each person. It can be used to state facts about classes and properties themselves.in axioms such cases, the entities that share the same URI U should be understoodas different "views" of the same underlying notion identified by the URI U . Considerthe following ontology. ClassAssertion( a:Dog a:Brianone:

PropertyAssertion( a:hasName a:Peter "Peter Griffin" ) BrianPeter's name is "Peter Griffin".

5.5 Annotation Properties

Annotation properties can be used to provide an annotation for an ontology, axiom, or a dog. ClassAssertion( a:Species a:Dog ) DogURI. The structure of annotations is a species.further described in the first axiom, theSection 10.

AnnotationProperty := URI

a:Dog isURIs used as a class, whileto identify annotation properties MUST NOT be in the second axiom, it is used as an individual; thus, the class a:Species acts as a metaclass for the class a:Dog . The individual a:Dog and the class a:Dog should be understood as two "views" of one andreserved vocabulary, apart from the same URI a:Dog . Underfollowing URIs from the reserved vocabulary, which are are available in OWL 2 Direct Semantics [ OWL 2 Direct Semantics ], these two views are interpreted independently: the class view of a:Species is interpreted as a unary predicate, while the individual view of a:Species is interpretedas a constant. Both metamodeling and annotations provide means to associate additional information with classes andbuilt-in annotation properties.

The comment provided by the following annotation assertion axiom might, for example, be used by an OWL 2 tool to display additional information about who addedthe URI a:Dog toa:Peter.

AnnotationAssertion( rdfs:comment a:Peter "The father of the ontology does not describeGriffin family from Quahog." ) This axiom provides a comment for the URI a:Peter.

5.6 Individuals

Individuals represent actual objects from the domain being modeled, but might be interesting from a management pointmodeled. There are two types of view. Therefore, this information is represented using an annotation. 6 Property Expressions Properties can be usedindividuals in OWL 2 to form property expressions. 6.1 Object Property Expressions Object properties2. Named individuals are given an explicit name that can bybe used in OWL 2 to form object property expressions. They are representedany ontology in the structural specification of OWL 2 by ObjectPropertyExpression , and their structure is shown in Figure 4. Figure 4. Object Property Expressions As one can see fromimport closure to refer to the figure, OWL 2 supports only two kinds of object property expressions. Object propertiessame individual. Anonymous individuals are local to the simplest form of object property expressions, and inverse object properties allow for bidirectional navigation in class expressions and axioms. ObjectPropertyExpression := ObjectProperty | InverseObjectProperty 6.1.1 Inverse Object Properties An inverse object property expression InverseOf( P ) connects anontology they are contained in.

Individual I 1 with I 2 if and only if := NamedIndividual | AnonymousIndividual

5.6.1 Named Individuals

Named individuals are identified using a URI. Since they are given a URI, named individuals are entities. URIs used to identify named individuals MUST NOT be in the object property P connects I 2 with I 1 . InverseObjectProperty := 'InverseOf' '(' ObjectProperty ')' Considerreserved vocabulary.

NamedIndividual := URI

The ontology consisting ofindividual a:Peter can be used to represent a particular person. It can be used in axioms such as the following assertion. PropertyAssertion( a:fatherOfone:

ClassAssertion( a:Person a:Peter a:Stewie) Peter is a person.

5.6.2 Anonymous Individuals

If an individual is not expected to be used outside an ontology, one can model it as an anonymous individual, which is identified by a local node ID. Anonymous individuals are analogous to blank nodes in RDF [RDF Syntax].

AnonymousIndividual := nodeID

Anonymous individuals can be used, for example, to represent objects whose identity is of no relevance, such as the fatheraddress of Stewie.a person.

PropertyAssertion( a:livesAt a:Peter _:1 ) Peter lives at some (unknown) address.
PropertyAssertion( a:city _:1 a:Quahog ) This ontology entails that a:Stewieunknown address is connected via InverseOf( a:fatherOf ) to a:Peter . 6.2 Data Property Expressions For symmetry with object property expressions,in the structural specificationcity of OWL 2 also introducesQuahog and...
PropertyAssertion( a:state _:1 a:RI ) ...in the notionstate of data property expressions, as shownRhode Island.

Special treatment is required in Figure 5.case anonymous individuals with the only allowed data property expression is a data property; thus, DataPropertyExpressionsame node ID occur in two different ontologies. In particular, these two individuals are structurally equivalent (because they have the structural specification of OWL 2 can be seen as a place-holder for possible future extensions. Figure 5. Data Property Expressions DataPropertyExpression := DataProperty 7 Data Ranges Datatypes, suchsame node ID); however, they are treated as strings or integers, can be used to express data ranges sets of tuplesdifferent individuals in the semantics of literals. Each data rangeOWL 2 (because anonymous individuals are local to an ontology they are used in). The latter is associated with a positive arity, which determinesachieved by renaming anonymous individuals apart in the sizeaxiom closure of an ontology O: when constructing the tuplesaxiom closure of O, if anonymous individuals with the same node ID occur in two different ontologies in the data range. All datatypes have arity one. This specification currently does not define data rangesimport closure of arity more than one; however, by allowing for n -ary data ranges, the syntaxO, then one of OWL 2 providesthese individuals MUST be replaced in the respective ontology with a "hook" allowing implementations to introduce extensions such as comparisonsfresh anonymous individual (i.e., with an anonymous individual having a globally unique node ID).

Assume that ontologies O1 and arithmetic. Data ranges can be usedO2 both use _:a5, and that O1 imports O2. Although they both use the same local node ID, the individual _:a5 in restrictions on data properties, as discussedO1 may be different from the individual _:a5 in Sections 8.4 and 8.5O2.

At the structurelevel of data rangesthe structural specification, individual _:a5 in OWL 2O1 is shownstructurally equivalent to individual _:a5 in Figure 6. The simplest data ranges are datatypes. The DataIntersectionOf , DataUnionOf , and DataComplementOf data ranges provideO2. This might be important, for example, for tools that use structural equivalence to define the standard set-theoretic operations on data ranges;semantics of axiom retraction.

In logical languagesorder to ensure that these individuals are usually called conjunction, disjunction, and negation, respectively. The nominal DataOneOf data range consists exactly the specified set of literals. Finally,treated differently by the DatatypeRestriction data rangessemantics they are obtained by restrictingrenamed apart when computing the value spaceaxiom closure of O1 either _:a5 in O1 is replaced with a datatype by a constraining facet. Figure 6. Data Rangesfresh anonymous individual, or this is done for _:a5 in OWLO2 DataRange := Datatype | DataIntersectionOf | DataUnionOf | DataComplementOf | DataOneOf | DatatypeRestriction 7.1 Intersection of Data Ranges An intersection data range IntersectionOf( DR 1 ... DR n ) contains all data.

5.7 Literals

Literals represent values thatsuch as particular strings or integers. They are containedanalogous to literals in the value space of all data ranges DR i for 1 i n. All data ranges DR i mustRDF [RDF Syntax] and can also be of the same arity. DataIntersectionOf := 'IntersectionOf' '(' DataRange DataRange { DataRange } ')' Theunderstood as individuals denoting known data range IntersectionOf( xsd:nonNegativeInteger xsd:nonPositiveInteger ) contains exactly the integer 0. 7.2 Unionvalues. Each literal consists of Data Rangesa union data range UnionOf( DR 1 ... DR n ) contains all data values that are contained inlexical value, which is a string, and a datatype. The lexical value space of at least one all data range DR i for 1 i n. All data ranges DR iMUST be ofconform to restrictions as specified by the same arity. DataUnionOf := 'UnionOf' '(' DataRange DataRange { DataRange } ')'datatype in the datatype map. The datatype map also determines how the literal is mapped to the actual data range UnionOf( xsd:string xsd:integer ) contains all stringsvalue. The datatypes and all integers. 7.3 Complement of Data Ranges A complement data range ComplementOf( DR ) contains allliterals thatsupported in OWL 2 are not containeddescribed in more detail in Section 4.

Literals are generally written in the data range DRfunctional-style syntax as "abc"^^datatypeURI. DataComplementOf := 'ComplementOf' '(' DataRange ')'The complement data range ComplementOf( xsd:positiveInteger ) consistsfunctional-style also supports the abbreviations for common types of text literals that[RDF:TEXT], and OWL 2 implementations SHOULD use these abbreviated forms whenever possible. These abbreviations are not positive integers. In particular, this data range contains the integer zeropurely syntactic shortcuts and all negative integers; however, it also contains all strings (since stringsare thus not positive integers). 7.4 Enumerated Data Ranges An enumerated data range OneOf( lt 1 ... lt n ) contains exactlyreflected in the explicitly specifiedstructural specification of OWL 2.

Literal := typedLiteral | abbreviatedXSDStringLiteral | abbreviatedRDFTextLiteral
typedLiteral := lexicalValue '^^' Datatype
lexicalValue := quotedString
abbreviatedXSDStringLiteral := quotedString
abbreviatedRDFTextLiteral := quotedString '@' languageTag

"1"^^xsd:integer ) contains exactly two literals: the string "Peter" andis a literal that represents the integer one. 7.5 Datatype Restrictions A datatype restriction DatatypeRestriction( DT F 1 lt 1 ... F n lt n ) consists of1.

"Family Guy" is an abbreviation for "Family Guy"^^xsd:string a unary datatype DTliteral with the lexical value "Family Guy" and n pairs F i lt ithe datatype xsd:string.

Let v i be"Padre de familia"@es is an abbreviation for the data valuesliteral "Padre de familia@es"^^rdf:text a literal denoting a pair consisting of the correspondingstring "Padre de familia" and the language tag es denoting the Spanish language.

Two literals lt i . This datatype restriction is syntactically validare structurally equivalent if F i v i is inand only if both the facet space of DT inlexical value and the datatype map (see Section 4 ).are structurally equivalent; that is, literals denoting the resulting unarysame data range is obtained by restricting thevalue space of DT according to the semantics of all F i v i (multiple pairsare interpreted conjunctively). DatatypeRestriction := 'DatatypeRestriction' '(' Datatype constrainingFacet restrictionValue { constrainingFacet restrictionValue } ')' constrainingFacet := URI restrictionValue := Literalstructurally different if either their lexical value or the data range DatatypeRestriction( xsd:integer xsd:minInclusive "5"^^datatype is different.

Even through literals "1"^^xsd:integer xsd:maxExclusive "10"^^and "+1"^^xsd:integer ) contains exactlyare interpreted as the integers 5, 6, 7, 8, and 9. 8 Class Expressions In OWL 2, classesinteger 1, these two literals are not structurally equivalent because their lexical values are not the same. Similarly, "1"^^xsd:integer and property expressions"1"^^xsd:positiveInteger are used to construct class expressions , sometimes also called descriptions , and, innot structurally equivalent because their datatypes are not the description logic literature, complex concepts . Class expressions represent sets of individuals by formally specifying conditions [same.

5.8 Entity Declarations and Typing

Each URI U used in an OWL 2 Direct Semantics ] on the individuals' properties; individuals satsifying these conditions are said toontology O can, and sometimes even must, be instances of the respective class expressions.declared in O; roughly speaking, this means that the structural specificationaxiom closure of OWL 2, class expressions are represented by ClassExpressionO must contain an appropriate declaration for U. A class expression can be used to representdeclaration for U in O serves two purposes:

An ontology additionally contains statementsmight contain a declaration for the URI a:Person and state that "Peterthis URI is a person" andclass. Such a declaration states that "Peter has child Chris", then Peter can be classified as an instance ofa:Person exists in the mentioned class expression. OWL 2 provides a rich set of primitivesontology and it states that can bethe URI is used as a class. An ontology editor might use declarations to construct class expressions.implement functions such as "Add New Class".

In particular, it provides the well known Boolean connectives and , or , and not ;OWL 2, declarations are a restricted formtype of universal and existential quantification; number restrictions; nominals; and a special self -restriction. As shownaxiom; thus, to declare an entity in Figure 2, classes arean ontology, one can simply include the simplest form of class expressions.appropriate axiom in the other, complex, class expressions,ontology. These axioms are describednonlogical in the following sections. ClassExpression :=sense that they do not affect the direct semantics of an OWL 2 ontology [OWL 2 Direct Semantics]. The structure of entity declarations is shown in Figure 3.

Entity Declarations in OWL 2
Figure 3. Entity Declarations in OWL 2

Declaration := 'Declaration' '(' axiomAnnotations Entity ')'
Entity :=
    'Class' '(' Class ')' |
ObjectIntersectionOf | ObjectUnionOf | ObjectComplementOf | ObjectOneOf | ObjectSomeValuesFrom | ObjectAllValuesFrom | ObjectHasValue | ObjectHasSelf | ObjectMinCardinality | ObjectMaxCardinality | ObjectExactCardinality | DataSomeValuesFrom | DataAllValuesFrom    'Datatype' '(' Datatype ')' |
DataHasValue    'ObjectProperty' '(' ObjectProperty ')' |
DataMinCardinality    'DataProperty' '(' DataProperty ')' |
DataMaxCardinality    'AnnotationProperty' '(' AnnotationProperty ')' |
DataExactCardinality 8.1 Propositional Connectives    'NamedIndividual' '(' NamedIndividual ')'

The following axioms state that the URI a:Person is used as a class and Nominalsthat the URI a:Peter is used as an individual.

Declaration( Class( a:Person ) )
Declaration( NamedIndividual( a:Peter ) )

Declarations for the built-in entities of OWL 2, listed in Table 9, are implicitly present in every OWL 2 providesontology.

Table 9. Declarations of Built-In Entities
Declaration( Class( owl:Thing ) )
Declaration( Class( owl:Nothing ) )
Declaration( ObjectProperty( owl:topObjectProperty ) )
Declaration( ObjectProperty( owl:bottomObjectProperty ) )
Declaration( DataProperty( owl:topDataProperty ) )
Declaration( DataProperty( owl:bottomDataProperty ) )
Declaration( Datatype( rdfs:Literal ) )
Declaration( Datatype( U ) ) for nominals and all standard Boolean connectives, as showneach URI U of a datatype in the datatype map (see Section 4)
Declaration( AnnotationProperty( U ) ) for each URI U of a built-in annotation property listed in Figure 7. The ObjectIntersectionOf , ObjectUnionOf , and ObjectComplementOf class expressions provideSection 5.5

5.8.1 Typing Constraints

Let Ax be a set of axioms. A URI U is declared to be of type T in Ax if a declaration axiom of type T for U is contained in Ax or in the standard set-theoretic operations on class expressions;set of built-in declarations listed in logical languages these are usually called conjunction, disjunction, and negation, respectively.Table 9. The nominal ObjectOneOf contains exactlyset Ax satisfies the specified individuals. Figure 7. Propositional Connectives and Nominals 8.1.1 Intersection of Class Expressions An intersection class expression IntersectionOf( CE 1 ... CE n ) contains all individuals that are instancestyping constraints of OWL 2 if all class expressions CE i for 1 i n. ObjectIntersectionOf := 'IntersectionOf' '(' ClassExpression ClassExpression { ClassExpression } ')' Consider the ontology consistingof the following axioms. ClassAssertion( a:Dog a:Brian ) Brianconditions are satisfied:

The axiom closure Ax of Class Expressions A complement class expression ComplementOf( CE ) contains all individuals that are not instanceseach OWL 2 ontology O MUST satisfy the typing constraints of OWL 2.

The class expression CE . ObjectComplementOf := 'ComplementOf' '(' ClassExpression ')' Considertyping constraints thus ensure that the sets of URIs used as object, data, and annotation properties in O are disjoint and that, similarly, the ontology consistingsets of the following axioms. DisjointClasses( a:Man a:Woman ) Nothing can be both a manURIs used as classes and a woman. ClassAssertion( a:Woman a:Lois ) Lois is a woman.datatypes in O are disjoint as well. These constraints are used for disambiguating the class expression ComplementOf( a:Man ) describestypes of URIs when reading ontologies from external transfer syntaxes. All things thatother declarations are not instances of either a:Man . Since a:Lois is known to beoptional.

A woman and nothingURI U can be both a man and a woman, then a:Loisused as an individual in O even if U is necessarilynot a a:Man ; therefore, a:Lois is classifieddeclared as an instance of this complement class expression. OWL 2 has open-world semantics, so negationindividual in O.

Declarations are often omitted in OWL 2 isthe same asexamples in classical (first-order) logic.this document in cases where the types of entities are clear.

5.8.2 Declaration Consistency

Although declarations are optional for the most part, they can be used to understand open-world semantics, considercatch obvious errors in ontologies.

The following ontology consistingerroneously refers to the individual a:Petre instead of the following assertion.individual a:Peter.

Ontology(<http://www.my.domain.com/example>
    ClassAssertion( a:Dog a:Briana:Person a:Petre )
Brian)

There is a dog. One might intuitively expect a:Brianno way of telling whether a:Petre was used by mistake. If, in contrast, all individuals in an ontology were by convention required to be classified asdeclared, this error could be caught by a simple tool.

An instance of ComplementOf( a:Bird ) : theontology does not explicitly state that a:BrianO is an instance of a:Bird , so this statement seemssaid to be false.have consistent declarations if each URI U occurring in OWL 2, however, this is notthe case: itaxiom closure of O in position of an entity with a type T is true that the ontology doesdeclared in O as having type T. OWL 2 ontologies are not state that a:Brian isrequired to have consistent declarations: an instance of a:Bird ; however, theontology doesMAY be used even if its declarations are not stateconsistent.

The opposite either. In other words, thisontology simply does not contain enough information to answerfrom the question whether a:Brianprevious example fails this check: a:Petre is used as an instance of a:Bird or not: it is perfectly possible that the information to that effect is actually trueindividual but it has not been included into the ontology.the ontology fromdoes not declare a:Petre to be an individual, and similarly for a:Person. In contrast, the previous example (in which a:Lois has been classified as a:Man ), however, contains sufficient informationfollowing ontology satisfies this condition.

Ontology(<http://www.my.domain.com/example>
    Declaration( Class( a:Person ) )
    Declaration( NamedIndividual( a:Peter ) )
    ClassAssertion( a:Person a:Peter )
)

5.9 Metamodeling

According to drawthe expected conclusion.typing constraints from Section 5.8.1, a URI U can be used in particular, we know for sure that a:Lois isan instance of a:Woman and that a:Man and a:Woman do not share instances. Therefore, any additional information that does not leadOWL 2 ontology to inconsistency cannot leadrefer to a conclusion that a:Loismore than one type of entity. Such usage of U is a:Man ; furthermore, if one wereoften called metamodeling, because it can be used to explicitlystate facts about classes and properties themselves. In such cases, the entities that a:Lois is an instance of a:Man ,share the ontology wouldsame URI U should be inconsistent and,understood as different "views" of the same underlying notion identified by definition, it then entails all possible conclusions. 8.1.4 Nominals A nominal class expression OneOf( a 1 ... a n ) contains exactlythe individuals a i with 1 i n. ObjectOneOf := 'OneOf' '(' Individual { Individual }')'URI U.

Consider the ontology consisting of thefollowing axioms. EquivalentClasses( a:GriffinFamilyMember OneOf( a:Peter a:Lois a:Stewie a:Meg a:Chrisontology.

ClassAssertion( a:Dog a:Brian ) Brian is a dog.
ClassAssertion( a:Species a:Dog ) Dog is a species.

In the Griffin family consists exactly of Peter, Lois, Stewie, Meg,first axiom, the URI a:Dog is used as a class, while in the second axiom, it is used as an individual; thus, the class a:Species acts as a metaclass for the class a:Dog. The individual a:Dog and Brian. DifferentIndividuals( a:Quagmire a:Peter a:Lois a:Stewie a:Meg a:Chris a:Brian ) Quagmire, Peter, Lois, Stewie, Meg, Chris,the class a:Dog should be understood as two "views" of one and Brianthe same URI a:Dog. Under the OWL 2 Direct Semantics [OWL 2 Direct Semantics], these two views are all different from each other.interpreted independently: the class a:GriffinFamilyMember now contains exactly the six explicitly listed individuals. Since we also know that a:Quagmireview of a:Species is different from these six individuals, thisinterpreted as a unary predicate, while the individual view of a:Species is classifiedinterpreted as an instance of the class expression ComplementOf( a:GriffinFamilyMember ) .a constant.

Both metamodeling and annotations provide means to associate additional information with classes and properties. The last axiom is necessaryfollowing rule-of-the-thumb can be used to derive this conclusion; without it,determine when to use which construct:

Consider the following axioms.ontology.

ClassAssertion( a:GriffinFamilyMember a:Petera:Dog a:Brian ) PeterBrian is a member of the Griffin Family.dog.
ClassAssertion( a:GriffinFamilyMember a:Loisa:PetAnimals a:Dog ) Lois is a member of the Griffin Family. ClassAssertion( a:GriffinFamilyMember a:StewieDogs are pet animals.
AnnotationAssertion( a:addedBy a:Dog "Seth MacFarlane" ) Stewie is a member ofThe Griffin Family. ClassAssertion( a:GriffinFamilyMember a:Meg ) Meg is a member ofURI a:Dog has been added to the Griffin Family. ClassAssertion( a:GriffinFamilyMember a:Chris ) Chris is a member ofontology by Seth MacFarlane.

The Griffin Family. ClassAssertion( a:GriffinFamilyMember a:Brian )facts that Brian is a member of the Griffin Family.dog and that dogs are pet animals are statements about the class a:GriffinFamilyMember now also containsdomain being modeled. Therefore, these facts are represented in the mentioned six individuals, just asabove ontology via metamodeling. In contrast, the previous example.information about who added the main differenceURI a:Dog to the previous example, however, is thatontology does not describe the extensionactual domain being modeled, but might be interesting from a management point of a:GriffinFamilyMemberview. Therefore, this information is not closed:represented using an annotation.

6 Property Expressions

Properties can be used in OWL 2 to form property expressions.

6.1 Object Property Expressions

Object properties can by used in OWL 2 to form object property expressions. They are represented in the semanticsstructural specification of OWL 2 assumes that information about a potential instance of a:GriffinFamilyMember may be missing. Therefore, a:Quagmireby ObjectPropertyExpression, and their structure is now not classifiedshown in Figure 4.

Object Property Expressions in OWL 2
Figure 4. Object Property Expressions in OWL 2

As an instanceone can see from the figure, OWL 2 supports only two kinds of object property expressions. Object properties are the simplest form of object property expressions, and inverse object properties allow for bidirectional navigation in class expressions and axioms.

ObjectPropertyExpression := ObjectProperty | InverseObjectProperty

6.1.1 Inverse Object Properties

An inverse object property expression ComplementOf( a:GriffinFamilyMemberInverseOf( P ) ,connects an individual I1 with I2 if and this does not change evenonly if we addthe axiom stating that all of these six individuals are different from each other. 8.2object property Restrictions ClassP connects I2 with I1.

InverseObjectProperty := 'InverseOf' '(' ObjectProperty ')'

Consider the ontology consisting of the following assertion.

PropertyAssertion( a:fatherOf a:Peter a:Stewie ) Peter is the father of Stewie.

This ontology entails that a:Stewie is connected via InverseOf( a:fatherOf ) to a:Peter.

6.2 Data Property Expressions

inFor symmetry with object property expressions, the structural specification of OWL 2 can be formed by placing restrictions on objectalso introduces the notion of data property expressions, as shown in Figure 8.5. The ObjectSomeValuesFrom class expression allows for existential quantification over an object property expression, and it contains those individuals that are connected through an objectonly allowed data property expression to an instance ofis a given class expression.data property; thus, DataPropertyExpression in the ObjectAllValuesFrom class expression allows for universal quantification over an object property expression, and it contains those individuals that are connected through an object property expression only to instancesstructural specification of OWL 2 can be seen as a given class expression. The ObjectHasValue class expression contains those individuals that are connected by an object property expression to a particular individual. Finally, the ObjectHasSelf class expression contains those individuals that are connected by an object property expression to themselves.place-holder for possible future extensions.

Data Property Expressions in OWL 2
Figure 8. Restricting Object5. Data Property Expressions 8.2.1 Existential Quantification An existential class expression SomeValuesFrom( OPE CE ) consistsin OWL 2

DataPropertyExpression := DataProperty

7 Data Ranges

Datatypes, such as strings or integers, can be used to express data ranges sets of an object property expression OPE andtuples of literals. Each data range is associated with a class expression CE , and it containspositive arity, which determines the size of the tuples in the data range. All those individuals that are connected by OPE to an individual that is an instancedatatypes have arity one. This specification currently does not define data ranges of CE . Provided that OPE is simple according toarity more than one; however, by allowing for n-ary data ranges, the definition in Section 11 , suchsyntax of OWL 2 provides a class expression"hook" allowing implementations to introduce extensions such as comparisons and arithmetic.

Data ranges can be seenused in restrictions on data properties, as a syntactic shortcut for the class expression MinCardinality( 1 OPE CE )discussed in Sections 8.4 and 8.5. ObjectSomeValuesFrom := 'SomeValuesFrom' '(' ObjectPropertyExpression ClassExpression ')' Consider the ontology consisting of the following axioms. PropertyAssertion( a:fatherOf a:Peter a:Stewie ) Peter isThe fatherstructure of Stewie. ClassAssertion( a:Man a:Stewie ) Stewiedata ranges in OWL 2 is a man.shown in Figure 6. The existential expression SomeValuesFrom( a:fatherOf a:Man ) contains those individuals thatsimplest data ranges are connected bydatatypes. The a:fatherOf property to individuals thatDataIntersectionOf, DataUnionOf, and DataComplementOf data ranges provide for the standard set-theoretic operations on data ranges; in logical languages these are instancesusually called conjunction, disjunction, and negation, respectively. The DataOneOf data range consists of a:Man and, consequently, a:Peter is classified as an instanceexactly the specified set of literals. Finally, the DatatypeRestriction data range restricts the value space of this class expression. 8.2.2 Universal Quantificationa universal class expression AllValuesFrom( OPE CE ) consistsdatatype by a constraining facet.

Data Ranges in OWL 2
Figure 6. Data Ranges in OWL 2

DataRange :=
    Datatype |
    DataIntersectionOf |
    DataUnionOf |
    DataComplementOf |
    DataOneOf |
    DatatypeRestriction

7.1 Intersection of Data Ranges

An object property expression OPE and a class expression CE , and itintersection data range IntersectionOf( DR1 ... DRn ) contains all those individuals that are connected by OPE only to individuals that are instances of CE . Provideddata values that OPE is simple according to the definitionare contained in Section 11 , such a class expression can be seen as a syntactic shortcutthe value space of every data range DRi for 1 i n. All data ranges DRi must be of the class expression MaxCardinality( 0 OPE ComplementOf( CE ) ) . ObjectAllValuesFrom := 'AllValuesFrom'same arity.

DataIntersectionOf := 'IntersectionOf' '(' ObjectPropertyExpression ClassExpressionDataRange DataRange { DataRange } ')'

Consider the ontology consisting ofThe following axioms. PropertyAssertion( a:hasPet a:Peter a:Briandata range IntersectionOf( xsd:nonNegativeInteger xsd:nonPositiveInteger ) Brian is a petcontains exactly the integer 0.

7.2 Union of Peter. ClassAssertion( a:Dog a:Brian ) Brian isData Ranges

A dog. ClassAssertion( MaxCardinality(union data range UnionOf( DR1 a:hasPet ) a:Peter ) Peter has at most one pet. The universal expression AllValuesFrom( a:hasPet a:Dog... DRn ) contains those individuals that are connected through the a:hasPet property only with individualsall data values that are instances of a:Dog ;contained in other words, it contains individuals that have only dogs as pets.the ontology axioms clearly state that a:Peter is connected by a:hasPet only to instancesvalue space of at least one data range DRi for 1 i n. All data ranges DRi must be of a:Dog : it is impossible to connect a:Peter by a:hasPet to an individual different from a:Brian without makingthe ontology inconsistent. Therefore, a:Peter is classified as an instancesame arity.

DataUnionOf := 'UnionOf' '(' DataRange DataRange { DataRange } ')'

The data range UnionOf( xsd:string xsd:integer ) contains all strings and all integers.

7.3 Complement of AllValuesFrom( a:hasPet a:DogData Ranges

A complement data range ComplementOf( DR ) . The last axiom that is, the axiom statingcontains all literals that a:Peter has at most one pet is critical for the inference fromare not contained in the previous paragraph due todata range DR.

DataComplementOf := 'ComplementOf' '(' DataRange ')'

The open-world semanticscomplement data range ComplementOf( xsd:positiveInteger ) consists of OWL 2. Withoutliterals that are not positive integers. In particular, this axiom,data range contains the ontology might not have listedinteger zero and all the individuals to which a:Peter is connected by a:hasPet . In such a case a:Peter wouldnegative integers; however, it also contains all strings (since strings are not be classified aspositive integers).

7.4 Enumeration of Literals

An instanceenumeration of AllValuesFrom( a:hasPet a:Dogliterals OneOf( lt1 ... ltn ) . 8.2.3 Individual Value Restriction A has-value class expression HasValue( OPEcontains exactly the explicitly specified literals lti with 1 i n.

DataOneOf := 'OneOf' '(' Literal { Literal } ')'

The enumeration of literals OneOf( "Peter" "1"^^xsd:integer ) contains exactly two literals: the string "Peter" and the integer one.

7.5 Datatype Restrictions

A datatype restriction DatatypeRestriction( DT F1 lt1 ... Fn ltn ) consists of an object property expression OPE and an individuala ,unary datatype DT and it contains all those individuals that are connectedn pairs Fi lti . Let vi be the data values of the corresponding literals lti. Each pair Fi vi MUST be contained in the facet space of DT in the datatype map (see Section 4). The resulting unary data range is obtained by OPErestricting the value space of DT according to a . Each such class expression can be seen as a syntactic shortcut forthe class expression SomeValuesFrom( OPE OneOf( a ) ) . ObjectHasValue := 'HasValue'semantics of all Fi vi (multiple pairs are interpreted conjunctively).

DatatypeRestriction := 'DatatypeRestriction' '(' ObjectPropertyExpression IndividualDatatype constrainingFacet restrictionValue { constrainingFacet restrictionValue } ')'
Consider the ontology consisting ofconstrainingFacet := URI
restrictionValue := Literal

The following axiom. PropertyAssertion( a:fatherOf a:Peter a:Stewiedata range DatatypeRestriction( xsd:integer xsd:minInclusive "5"^^xsd:integer xsd:maxExclusive "10"^^xsd:integer ) Peter iscontains exactly the father of Stewie.integers 5, 6, 7, 8, and 9.

8 Class Expressions

In OWL 2, classes and property expressions are used to construct class expressions, sometimes also called descriptions, and, in the has-valuedescription logic literature, complex concepts. Class expression HasValue( a:fatherOf a:Stewie ) contains thoseexpressions represent sets of individuals thatby formally specifying conditions [OWL 2 Direct Semantics] on the individuals' properties; individuals satsifying these conditions are connected throughsaid to be instances of the a:fatherOf property withrespective class expressions. In the individual a:Stewie so, consequently, a:Peter is classified as an instancestructural specification of thisOWL 2, class expression. 8.2.4 Self-Restriction A self-restriction HasSelf( OPE ) consists of an object property expression OPE , and it contains all those individuals thatexpressions are connectedrepresented by OPEClassExpression.

A class expression can be used to themselves. ObjectHasSelf := 'HasSelf' '(' ObjectPropertyExpression ')' Considerrepresent the ontology consistingset of the following axiom. PropertyAssertion( a:likes a:Peter a:Peter ) Peter likes himself. The self-restriction HasSelf( a:likes )"people that have at least one child". If an ontology additionally contains those individualsstatements that like themselves so, consequently, a:Peter"Peter is a person" and that "Peter has child Chris", then Peter can be classified as an instance of thisthe mentioned class expression.

8.3 Object Property Cardinality Restrictions Class expressions inOWL 2 provides a rich set of primitives that can be formed by placing restrictions onused to construct class expressions. In particular, it provides the cardinalitywell known Boolean connectives and, or, and not; a restricted form of object property expressions,universal and existential quantification; number restrictions; enumeration of individuals; and a special self-restriction.

As shown in Figure 9. All cardinality restrictions can be qualified or unqualified:2, classes are the former ones requiresimplest form of class expressions. The other, complex, class expressions, are described in the following sections.

ClassExpression :=
    Class |
    ObjectIntersectionOf | ObjectUnionOf | ObjectComplementOf | ObjectOneOf |
    ObjectSomeValuesFrom | ObjectAllValuesFrom | ObjectHasValue | ObjectHasSelf |
    ObjectMinCardinality | ObjectMaxCardinality | ObjectExactCardinality |
    DataSomeValuesFrom | DataAllValuesFrom | DataHasValue |
    DataMinCardinality | DataMaxCardinality | DataExactCardinality

8.1 Propositional Connectives and Enumeration of Individuals

connected by an object property expression to be instancesOWL 2 provides for enumeration of a qualifying class expression,individuals and all standard Boolean connectives, as shown in Figure 7. The latter onesObjectIntersectionOf, ObjectUnionOf, and ObjectComplementOf class expressions provide for the standard set-theoretic operations on class expressions; in logical languages these are equivalent to qualified ones withusually called conjunction, disjunction, and negation, respectively. The qualifyingObjectOneOf class expression equal to owl:Thing .contains exactly the specified individuals.

Propositional Connectives and Enumeration of Individuals in OWL 2
Figure 7. Propositional Connectives and Enumeration of Individuals in OWL 2

8.1.1 Intersection of Class Expressions

ObjectMinCardinality , ObjectMaxCardinality , and ObjectExactCardinality contain thoseAn intersection class expression IntersectionOf( CE1 ... CEn ) contains all individuals that are connected by an object property expression to at least, at most, and exactly a given number ofinstances of a specifiedall class expression, respectively. Figure 9. Restrictingexpressions CEi for 1 i n.

ObjectIntersectionOf := 'IntersectionOf' '(' ClassExpression ClassExpression { ClassExpression } ')'

Consider the Cardinalityontology consisting of Object Property Expressions 8.3.1 Minimum Cardinalitythe following axioms.

ClassAssertion( a:Dog a:Brian ) Brian is a minimum cardinalitydog.
ClassAssertion( a:CanTalk a:Brian ) Brian can talk.

The class expression MinCardinality( n OPE CEIntersectionOf( a:Dog a:CanTalk ) consists of a nonnegative integer n ,describes all dogs that can talk and, consequently, a:Brian is classified as an object property expression OPE , andinstance of this expression.

8.1.2 Union of Class Expressions

A union class expression UnionOf( CE , and it1 ... CEn ) contains all those individuals that are connected by OPE to at least n differentindividuals that are instances of at least one class expression CE . If CE is missing, it is taken to be owl:Thing . ObjectMinCardinality := 'MinCardinality'i for 1 i n.

ObjectUnionOf := 'UnionOf' '(' nonNegativeInteger ObjectPropertyExpression [ClassExpression ]ClassExpression { ClassExpression } ')'

Consider the ontology consisting of the following axioms.

PropertyAssertion( a:fatherOf a:Peter a:Stewie ) Peter is the father of Stewie.ClassAssertion( a:Man a:Stewie ) Stewie is a man. PropertyAssertion( a:fatherOfa:Peter a:Chris) Peter is the father of Chris.a man.
ClassAssertion( a:Man a:Chrisa:Woman a:Lois ) ChrisLois is a man. DifferentIndividuals( a:Chris a:Stewie ) Chris and Stewie are different from each other.woman.

The minimum cardinalityclass expression MinCardinality( 2 a:fatherOfUnionOf( a:Man a:Woman ) contains thosedescribes all individuals that are connected by a:fatherOf to at least two different instances of a:Man . Since a:Stewie and a:Chris are bothinstances of either a:Man or a:Woman; consequently, both a:Peter and a:Lois are different from each other, a:Peter isclassified as an instanceinstances of MinCardinality( 2 a:fatherOf a:Man ) . Due to the open-world semantics, the last axiom stating that a:Chris and a:Stewie are different from each other is necessary for this inference: withoutthis axiom, it is possible that a:Chris and a:Stewie are actually the same individual. 8.3.2 Maximum Cardinality A maximum cardinality expression MaxCardinality( n OPE CE ) consistsexpression.

8.1.3 Complement of Class Expressions

A nonnegative integer n , an object property expression OPE , and acomplement class expression ComplementOf( CE , and it) contains all those individuals that are connected by OPE to at most n differentindividuals that are not instances of the class expression CE.

If CE is missing, it is taken to be owl:Thing . ObjectMaxCardinality := 'MaxCardinality'ObjectComplementOf := 'ComplementOf' '(' nonNegativeInteger ObjectPropertyExpression [ClassExpression ]')'

Consider the ontology consisting of the following axioms.

PropertyAssertion( a:hasPet a:Peter a:BrianDisjointClasses( a:Man a:Woman ) Brian isNothing can be both a pet of Peter.man and a woman.
ClassAssertion( MaxCardinality( 1 a:hasPet ) a:Petera:Woman a:Lois ) Peter has at most one pet.Lois is a woman.

The maximum cardinalityclass expression MaxCardinality( 2 a:hasPetComplementOf( a:Man ) contains those individualsdescribes all things that are connected by a:hasPet to at most two individuals.not instances of a:Man. Since a:Petera:Lois is known to be connected by a:hasPet to at most one individual, ita woman and nothing can be both a man and a woman, then a:Lois is certainly also connected by a:hasPet to at most two individuals so, consequently, a:Peternecessarily not a a:Man; therefore, a:Lois is classified as an instance of this complement class expression.

OWL 2 has open-world semantics, so negation in OWL 2 is classifiedthe same as an instance of MaxCardinality( 2 a:hasPet ) .in classical (first-order) logic. To understand open-world semantics, consider the exampleontology explicitly names onlyconsisting of the following assertion.

ClassAssertion( a:Dog a:Brian as being connected by a:hasPet from a:Peter , so) Brian is a dog.

One might expect a:Petera:Brian to be classified as an instance of MaxCardinality( 2 a:hasPetComplementOf( a:Bird ) even without: the second axiom. This,ontology does not explicitly state that a:Brian is an instance of a:Bird, so this statement seems to be false. In OWL 2, however, this is not the case due to the open-world semantics. Without the last axiom,case: it is possibletrue that a:Peter is connected by a:hasPet to other individuals. The second axiom closesthe set of individualsontology does not state that a:Petera:Brian is connected to by a:hasPet . Consideran instance of a:Bird; however, the ontology consisting ofdoes not state the following axioms. PropertyAssertion( a:hasDaughter a:Peter a:Meg ) Meg is a daughter of Peter. PropertyAssertion( a:hasDaughter a:Peter a:Megan ) Megan is a daughter of Peter. ClassAssertion( MaxCardinality( 1 a:hasDaughter ) a:Peter ) Peter has at most one daughter. One might intuitively expectopposite either. In other words, this ontology simply does not contain enough information to be inconsistent: onanswer the one hand,question whether a:Brian is an instance of a:Bird or not: it saysis perfectly possible that a:Meg and a:Megan are connected to a:Peter by a:hasDaughter , but, onthe other hand, it saysinformation to that a:Petereffect is connected by a:hasDaughter to at most one individual. This ontology,actually true but it has not been included in the ontology.

The ontology from the previous example (in which a:Lois has been classified as a:Man), however, is not inconsistent becausecontains sufficient information to draw the semanticsexpected conclusion. In particular, we know for sure that a:Lois is an instance of OWL 2 doesa:Woman and that a:Man and a:Woman do not have unique name assumptionshare instances. Therefore, any additional information that is, itdoes not assume distinct individualslead to be necessarily different. For example, the ontology does not explicitly say that a:Meg and a:Megan are different individuals; therefore, since a:Peter can be connected by a:hasDaughterinconsistency cannot lead to at mosta conclusion that a:Lois is an instance of a:Man; furthermore, if one distinct individual, a:Meg and a:Megan must bewere to explicitly state that a:Lois is an instance of a:Man, the same. This exampleontology thus entails the assertion SameIndividual( a:Meg a:Megan ) . One can axiomatize the unique name assumption in OWL 2would be inconsistent and, by explicitly stating thatdefinition, it then entails all possible conclusions.

8.1.4 Enumeration of Individuals

are different from each other. This can be done by addingAn enumeration of individuals OneOf( a1 ... an ) contains exactly the following axiom, which makesindividuals ai with 1 i n.

ObjectOneOf := 'OneOf' '(' Individual { Individual }')'

Consider the exampleontology inconsistent. DifferentIndividuals(consisting of the following axioms.

EquivalentClasses( a:GriffinFamilyMember
    OneOf( a:Peter a:Lois a:Stewie a:Meg a:Megana:Chris a:Brian )
Peter, Meg, and Megan are all different from each other. 8.3.3 Exact Cardinality An exact cardinality expression ExactCardinality( n OPE CE)
The Griffin family consists exactly of a nonnegative integer n , an object property expression OPE ,Peter, Lois, Stewie, Meg, and Brian.
DifferentIndividuals( a:Quagmire a:Peter a:Lois a:Stewie a:Meg a:Chris a:Brian ) Quagmire, Peter, Lois, Stewie, Meg, Chris, and aBrian are all different from each other.

The class expression CE , and ita:GriffinFamilyMember now contains all those individuals that are connected by OPE toexactly n different individualsthe six explicitly listed individuals. Since we also know that are instances of CE . If CEa:Quagmire is missing, itdifferent from these six individuals, this individual is taken to be owl:Thing . Suchclassified as an instance of the class expression ComplementOf( a:GriffinFamilyMember ). The last axiom is actually equivalentnecessary to derive this conclusion; without it, the expression IntersectionOf( MinCardinality( n OPE CE ) MaxCardinality( n OPE CE ) )open-world semantics of OWL 2 would allow for situations where a:Quagmire is the same as a:Peter, a:Lois, a:Stewie, a:Meg, a:Chris, or a:Brian.

ObjectExactCardinality := 'ExactCardinality' '(' nonNegativeInteger ObjectPropertyExpression [ ClassExpression ] ')'To understand how the open-world semantics affects enumerations of individuals, consider the ontology consisting of the following axioms.

PropertyAssertion( a:hasPetClassAssertion( a:GriffinFamilyMember a:Peter a:Brian) BrianPeter is a petmember of Peter.the Griffin Family.
ClassAssertion( a:Dog a:Briana:GriffinFamilyMember a:Lois ) BrianLois is a dog.member of the Griffin Family.
ClassAssertion( AllValuesFrom( a:hasPet UnionOf( OneOf( a:Brian ) ComplementOf( a:Dog ) )a:GriffinFamilyMember a:Stewie ) a:PeterStewie is a member of the Griffin Family.
ClassAssertion( a:GriffinFamilyMember a:Meg ) Each petMeg is a member of Peterthe Griffin Family.
ClassAssertion( a:GriffinFamilyMember a:Chris ) Chris is eithera member of the Griffin Family.
ClassAssertion( a:GriffinFamilyMember a:Brian ) Brian or itis nota dog.member of the exact cardinality expression ExactCardinality( 1 a:hasPet a:Dog )Griffin Family.

The class a:GriffinFamilyMember now also contains those individuals that are connected by a:hasPetthe mentioned six individuals, just as in the previous example. The main difference to exactly one instance of a:Dog .the example ontology says that a:Peterprevious example, however, is connected to a:Brian by a:hasPet andthat a:Brianthe extension of a:GriffinFamilyMember is annot closed: the semantics of OWL 2 assumes that information about a potential instance of a:Dog ;a:GriffinFamilyMember may be missing. Therefore, a:Petera:Quagmire is now not classified as an instance of MinCardinality( 1 a:hasPet a:Dogthe class expression ComplementOf( a:GriffinFamilyMember ) . Furthermore,, and this does not change even if we add the lastaxiom saysstating that any individualall of these six individuals are different from a:Brian that is connected to a:Peter by a:hasPet is not an instance if a:Dog ; therefore, a:Peter is an instance of MaxCardinality( 1 a:hasPet a:Dog ) . Consequently, a:Peter is classified as an instance of ExactCardinality( 1 a:hasPet a:Dog ) . 8.4 Dataeach other.

8.2 Object Property Restrictions

Class expressions in OWL 2 can be formed by placing restrictions on dataobject property expressions, as shown in Figure 10. These are similar to the restrictions on object property expressions, the main difference being that the expressions for existential and universal quantification allow for n -ary data ranges. All data ranges explicitly supported by this specification are unary; however, the provision of n -ary data ranges in existential and universal quantification allows OWL 2 tools to support extensions such as value comparisons and, consequently, class expressions such as "individuals whose width is greater than their height". Thus,8. The DataSomeValuesFromObjectSomeValuesFrom class expression allows for a restrictedexistential quantification over a list of dataan object property expressions,expression, and it contains those individuals that are connected through the dataan object property expressionsexpression to literals in theat least one instance of a given data range.class expression. The DataAllValuesFromObjectAllValuesFrom class expression allows for a restricteduniversal quantification over a list of dataan object property expression, and it contains those individuals that are connected through the dataan object property expressionsexpression only to literals in theinstances of a given data range. Finally,class expression. The DataHasValueObjectHasValue class expression contains those individuals that are connected by a dataan object property expression to a particular literal.individual. Finally, the ObjectHasSelf class expression contains those individuals that are connected by an object property expression to themselves.

Restricting Object Property Expressions in OWL 2
Figure 10.8. Restricting DataObject Property Expressions 8.4.1in OWL 2

8.2.1 Existential Quantification

An existential class expression SomeValuesFrom( DPE 1 ... DPE n DROPE CE ) consists of n dataan object property expressions DPE i , 1 i n,expression OPE and an n-ary data range DRa class expression CE, and it contains all those individuals that are connected by DPE iOPE to literals lt ian individual that is an instance of CE. Provided that OPE is simple according to the definition in Section 11, 1 i n,such thata class expression can be seen as a syntactic shortcut for the tuple ltclass expression MinCardinality( 1 OPE CE ).

ObjectSomeValuesFrom := 'SomeValuesFrom' '(' ObjectPropertyExpression ClassExpression ')'

Consider the ontology consisting of the following axioms.

PropertyAssertion( a:fatherOf a:Peter a:Stewie ) Peter is the father of Stewie.
ClassAssertion( a:Man a:Stewie ) Stewie is a man.

The existential expression SomeValuesFrom( a:fatherOf a:Man ) contains those individuals that are connected by the a:fatherOf property to individuals that are instances of a:Man and, consequently, a:Peter is classified as an instance of this class expression.

8.2.2 Universal Quantification

A universal class expression AllValuesFrom( OPE CE ) consists of an object property expression OPE and a class expression CE, ..., lt nand it contains all those individuals that are connected by OPE only to individuals that are instances of CE. Provided that OPE is simple according to the definition in DR .Section 11, such a class expression of the form SomeValuesFrom( DPE DR )can be seen as a syntactic shortcut for the class expression MinCardinality( 1 DPE DRMaxCardinality( 0 OPE ComplementOf( CE ) ).

DataSomeValuesFrom := 'SomeValuesFrom'ObjectAllValuesFrom := 'AllValuesFrom' '(' DataPropertyExpression { DataPropertyExpression } DataRangeObjectPropertyExpression ClassExpression ')'

Consider the ontology consisting of the following axiom.axioms.

PropertyAssertion( a:hasAge a:Meg "17"^^ xsd:integera:hasPet a:Peter a:Brian ) MegBrian is seventeen years old.a pet of Peter.
ClassAssertion( a:Dog a:Brian ) Brian is a dog.
ClassAssertion( MaxCardinality( 1 a:hasPet ) a:Peter ) Peter has at most one pet.

The existential classuniversal expression SomeValuesFrom( a:hasAge DatatypeRestriction( xsd:integer xsd:maxExclusive "20"^^ xsd:integer )AllValuesFrom( a:hasPet a:Dog ) contains allthose individuals that are connected through the a:hasPet property only with individuals that are instances of a:Dog; in other words, it contains individuals that have only dogs as pets. The ontology axioms clearly state that a:Peter is connected by a:hasAgea:hasPet only to instances of a:Dog: it is impossible to connect a:Peter by a:hasPet to an integer strictly less than 20 so, consequently, a:Megindividual different from a:Brian without making the ontology inconsistent. Therefore, a:Peter is classified as an instance of AllValuesFrom( a:hasPet a:Dog ).

The last axiom that is, the axiom stating that a:Peter has at most one pet is critical for the inference from the previous paragraph due to the open-world semantics of OWL 2. Without this expression. 8.4.2 Universal Quantificationaxiom, the ontology might not have listed all the individuals to which a:Peter is connected by a:hasPet. In such a universal class expressioncase a:Peter would not be classified as an instance of AllValuesFrom( DPE 1 ... DPE n DRa:hasPet a:Dog ).

8.2.3 Individual Value Restriction

A has-value class expression HasValue( OPE a ) consists of n dataan object property expressions DPE i , 1 i n,expression OPE and an n-ary data range DRindividual a, and it contains all those individuals that are connected by DPE i onlyOPE to literals lt i , 1 i n, such that each tuple lt 1 , ..., lt n is in DR .a. Each such class expression of the form AllValuesFrom( DPE DR )can be seen as a syntactic shortcut for the class expression MaxCardinality( 0 DPE ComplementOf( DRSomeValuesFrom( OPE OneOf( a ) ).

DataAllValuesFrom := 'AllValuesFrom'ObjectHasValue := 'HasValue' '(' DataPropertyExpression { DataPropertyExpression } DataRangeObjectPropertyExpression Individual ')'

Consider the ontology consisting of the following axioms.axiom.

PropertyAssertion( a:zipCode _:a1 "02903"^^ xsd:integera:fatherOf a:Peter a:Stewie ) The ZIP code of _:a1Peter is the integer 02903. FunctionalProperty( a:hasZIP ) Each object can have at most one ZIP code. In United Kingdom and Canada, ZIP codes are strings (i.e., they can contain characters and not just numbers). Hence, one might usefather of Stewie.

The universalhas-value class expression AllValuesFrom( a:hasZIP xsd:integerHasValue( a:fatherOf a:Stewie ) to identifycontains those individuals that have only integer ZIP codes (and therefore have non-UK and non-Canadian addresses).are connected through the a:fatherOf property with the anonymousindividual _:a1a:Stewie so, consequently, a:Peter is by the first axiom connected by a:zipCode toclassified as an integer,instance of this class expression.

8.2.4 Self-Restriction

A self-restriction HasSelf( OPE ) consists of an object property expression OPE, and the second axiom ensuresit contains all those individuals that _:a1 is notare connected by a:zipCodeOPE to other literals; therefore, _:a1themselves.

ObjectHasSelf := 'HasSelf' '(' ObjectPropertyExpression ')'

Consider the ontology consisting of the following axiom.

PropertyAssertion( a:likes a:Peter a:Peter ) Peter likes himself.

The self-restriction HasSelf( a:likes ) contains those individuals that like themselves so, consequently, a:Peter is classified as an instance of AllValuesFrom( a:hasZIP xsd:integer ) .this class expression.

8.3 Object Property Cardinality Restrictions

Class expressions in OWL 2 can be formed by placing restrictions on the last axiom stating that a:hasZIP is functional is critical forcardinality of object property expressions, as shown in Figure 9. All cardinality restrictions can be qualified or unqualified: in the inference fromformer case, the previous paragraph duecardinality restriction only applies to individuals that are connected by the open-world semanticsobject property expression and are instances of OWL 2. Without this axiom,the ontology is incompletequalifying class expression; in the sense that it may not listlatter case the restriction applies to all literalsindividuals that _:a1 isare connected by the object property expression (this is equivalent to the qualified case with the qualifying class expression equal to owl:Thing). The class expressions ObjectMinCardinality, ObjectMaxCardinality, and ObjectExactCardinality contain those individuals that are connected by a:hasZIP ; hence, without this axiom _:a1 would not be classified asan instanceobject property expression to at least, at most, and exactly a given number of instances of AllValuesFrom( a:hasZIP xsd:integer ) . 8.4.3 Literal Value Restrictiona has-valuespecified class expression, respectively.

Restricting the Cardinality of Object Property Expressions in OWL 2
Figure 9. Restricting the Cardinality of Object Property Expressions in OWL 2

8.3.1 Minimum Cardinality

A minimum cardinality expression HasValue( DPE ltMinCardinality( n OPE CE ) consists of a datanonnegative integer n, an object property expression DPEOPE, and a literal ltclass expression CE, and it contains all those individuals that are connected by DPEOPE to lt . Each such class expression can be seen as a syntactic shortcut for the class expression SomeValuesFrom( DPE OneOf( lt ) )at least n different individuals that are instances of CE. DataHasValue := 'HasValue'If CE is missing, it is taken to be owl:Thing.

ObjectMinCardinality := 'MinCardinality' '(' DataPropertyExpression LiteralnonNegativeInteger ObjectPropertyExpression [ ClassExpression ] ')'

Consider the ontology consisting of the following axiom.axioms.

PropertyAssertion( a:hasAge a:Meg "17"^^ xsd:integera:fatherOf a:Peter a:Stewie ) MegPeter is seventeen years old.the has-valuefather of Stewie.
ClassAssertion( a:Man a:Stewie ) Stewie is a man.
PropertyAssertion( a:fatherOf a:Peter a:Chris ) Peter is the father of Chris.
ClassAssertion( a:Man a:Chris ) Chris is a man.
DifferentIndividuals( a:Chris a:Stewie ) Chris and Stewie are different from each other.

The minimum cardinality expression hasValue( a:hasAge "17"^^ xsd:integerMinCardinality( 2 a:fatherOf a:Man ) contains allthose individuals that are connected by a:hasAgea:fatherOf to the integer 17 so, consequently, a:Megat least two different instances of a:Man. Since a:Stewie and a:Chris are both instances of a:Man and are different from each other, a:Peter is classified as an instance of this expression. 8.5 Data Property Cardinality Restrictions Class expressions in OWLMinCardinality( 2 can be formed by placing restrictions on the cardinality of data property expressions, as shown in Figure 11. These are similar to the restrictions on the cardinality of object property expressions. All cardinality restrictions can be qualified or unqualified: the former ones require literals connected by a data property expression to be in the qualifying data range, and the latter ones are equivalenta:fatherOf a:Man ).

Due to qualified ones withthe qualifying data range equal to rdfs:Literal .open-world semantics, the class expressions DataMinCardinality , DataMaxCardinality , and DataExactCardinality contain those individualslast axiom stating that a:Chris and a:Stewie are connected by a data property expression to at least, at most,different from each other is necessary for this inference: without this axiom, it is possible that a:Chris and exactly a given number of literals in the specified data range, respectively. Figure 11. Restrictinga:Stewie are actually the Cardinality of Data Property Expressions 8.5.1 Minimumsame individual.

8.3.2 Maximum Cardinality

A minimummaximum cardinality expression MinCardinality(MaxCardinality( n DPE DROPE CE ) consists of a nonnegative integer n, a dataan object property expression DPEOPE, and a unary data range DRclass expression CE, and it contains all those individuals that are connected by DPEOPE to at leastmost n different literals in DRindividuals that are instances of CE. If DRCE is not present,missing, it is taken to be rdfs:Literalowl:Thing.

DataMinCardinality := 'MinCardinality'ObjectMaxCardinality := 'MaxCardinality' '(' nonNegativeInteger DataPropertyExpressionObjectPropertyExpression [ DataRangeClassExpression ] ')'

Consider the ontology consisting of the following axioms.

PropertyAssertion( a:hasName a:Meg "Meg Griffin"a:hasPet a:Peter a:Brian ) Meg's nameBrian is "Meg Griffin" . PropertyAssertion( a:hasName a:Meg "Megan Griffin"a pet of Peter.
ClassAssertion( MaxCardinality( 1 a:hasPet ) Meg's name is "Megan Griffin" .a:Peter ) Peter has at most one pet.

The minimummaximum cardinality expression MinCardinality(MaxCardinality( 2 a:hasNamea:hasPet ) contains those individuals that are connected by a:hasNamea:hasPet to at leastmost two different literals.individuals. Since a:Peter is known to be connected by a:hasPet to at most one individual, it is certainly also connected by a:hasPet to at most two individuals so, consequently, a:Peter is classified as an instance of MaxCardinality( 2 a:hasPet ).

The example ontology explicitly names only a:Brian as being connected by a:hasPet from a:Peter, so one might expect a:Peter to be classified as an instance of MaxCardinality( 2 a:hasPet ) even without the second axiom. This, however, is not the case due to the open-world semantics. Without the last axiom, it is possible that a:Peter is connected by a:hasPet to other individuals. The second axiom closes the set of individuals that a:Peter is connected to by a:hasPet.

Consider the xsd:string datatypes interprets different string literals as being distinct, so "Meg Griffin" and "Megan Griffin" are different; thus,ontology consisting of the individualfollowing axioms.

PropertyAssertion( a:hasDaughter a:Peter a:Meg ) Meg is classified as an instancea daughter of the class expression MinCardinality( 2 a:hasNamePeter.
PropertyAssertion( a:hasDaughter a:Peter a:Megan ) . 8.5.2 Maximum CardinalityMegan is a maximum cardinality expressiondaughter of Peter.
ClassAssertion( MaxCardinality( n DPE DR1 a:hasDaughter ) consists of a nonnegative integer n , a data property expression DPE ,a:Peter ) Peter has at most one daughter.

One might expect this ontology to be inconsistent: on the one hand, it says that a:Meg and a unary data range DRa:Megan are connected to a:Peter by a:hasDaughter, andbut, on the other hand, it contains all those individualssays that area:Peter is connected by DPEa:hasDaughter to at most n different literals in DR . If DRone individual. This ontology, however, is not present,inconsistent because the semantics of OWL 2 does not make the unique name assumption that is, it is takendoes not assume distinct individuals to be rdfs:Literal . DataMaxCardinality := 'MaxCardinality' '(' nonNegativeInteger DataPropertyExpression [ DataRange ] ')' Considernecessarily different. For example, the ontology consisting of the following axiom. FunctionalProperty( a:hasName ) Each objectdoes not explicitly say that a:Meg and a:Megan are different individuals; therefore, since a:Peter can havebe connected by a:hasDaughter to at most one name.distinct individual, a:Meg and a:Megan must be the maximum cardinality expression MaxCardinality( 2 a:hasNamesame. This example ontology thus entails the assertion SameIndividual( a:Meg a:Megan ) contains those individuals.

One can axiomatize the unique name assumption in OWL 2 by explicitly stating that all individuals are connected by a:hasName to at most twodifferent literals. Since the ontology axiom restricts a:hasName tofrom each other. This can be functional, all individuals indone by adding the following axiom, which makes the example ontology inconsistent.

DifferentIndividuals( a:Peter a:Meg a:Megan ) Peter, Meg, and Megan are instances of this class expression. 8.5.3all different from each other.

8.3.3 Exact Cardinality

An exact cardinality expression ExactCardinality( n DPE DROPE CE ) consists of a nonnegative integer n, a dataan object property expression DPEOPE, and a unary data range DRclass expression CE, and it contains all those individuals that are connected by DPEOPE to exactly n different literals in DRindividuals that are instances of CE. If DRCE is not present,missing, it is taken to be rdfs:Literalowl:Thing. DataExactCardinality :=Such an expression is actually equivalent to the expression

IntersectionOf( MinCardinality( n OPE CE ) MaxCardinality( n OPE CE ) ).

ObjectExactCardinality := 'ExactCardinality' '(' nonNegativeInteger DataPropertyExpressionObjectPropertyExpression [ DataRangeClassExpression ] ')'

Consider the ontology consisting of the following axioms.

PropertyAssertion( a:hasNamea:hasPet a:Peter a:Brian "Brian Griffin") Brian's nameBrian is "Brian Griffin" . FunctionalProperty( a:hasNamea pet of Peter.
ClassAssertion( a:Dog a:Brian ) Brian is a dog.
ClassAssertion(
    AllValuesFrom( a:hasPet
       UnionOf(
          OneOf( a:Brian )
          ComplementOf( a:Dog )
        )
    )
    a:Peter
)
Each object can have at most one name.pet of Peter is either Brian or it is not a dog.

The exact cardinality expression ExactCardinality( 1 a:hasNamea:hasPet a:Dog ) contains those individuals that are connected by a:hasNamea:hasPet to exactly one literal. Sinceinstance of a:Dog. The example ontology axiom restricts a:hasNamesays that a:Peter is connected to be functionala:Brian by a:hasPet and that a:Brian is an instance of a:Dog; therefore, a:Peter is an instance of MinCardinality( 1 a:hasPet a:Dog ). Furthermore, the last axiom says that any individual different from a:Brian that is connected by a:hasNameto "Brian Griffin" , ita:Peter by a:hasPet is not an instance if a:Dog; therefore, a:Peter is an instance of MaxCardinality( 1 a:hasPet a:Dog ). Consequently, a:Peter is classified as an instance of this class expression. 9 Axioms OWL 2 ontologies consist of axioms statements that say what is true in the domain being modeled. OWL 2 provides an extensive set of axioms, all of which extend the AxiomExactCardinality( 1 a:hasPet a:Dog ).

8.4 Data Property Restrictions

Class in the structural specification. As shown in Figure 12, axiomsexpressions in OWL 2 can be declarations, axioms about classes, axioms about object orformed by placing restrictions on data properties, keys, assertions (sometimes also called facts ), and axioms about annotations. Figure 12. The Axioms of OWL 2 Axiom := Declaration | ClassAxiom | ObjectPropertyAxiom | DataPropertyAxiom | HasKey | Assertion | AnnotationAxiom axiomAnnotations := { Annotation }property expressions, as shown in Figure 1, OWL 2 axioms can contain axiom annotations, the structure of which is defined in Section 10 . Annotations on axioms affect their structural equivalence: for two axioms10. These are similar to be structurally equivalent,the annotations on them MUST be structurally equivalent as well. In contrast, axiom annotations have no effectrestrictions on object property expressions, the semantics of axioms that is, they do not affect the meaning of OWL 2 ontologies [ OWL 2 Direct Semantics ]. The following axiom contains a commentmain difference being that explains the purpose of the axiom. SubClassOf( Annotation( rdfs:comment "Male people are people.") a:Man a:Person ) Since annotations affect structural equivalence between axioms, the previous axiom is not structurally equivalent withthe following axiom, even though these two axiomsexpressions for existential and universal quantification allow for n-ary data ranges. All data ranges explicitly supported by this specification are equivalent according tounary; however, the provision of n-ary data ranges in existential and universal quantification allows OWL 2 Direct Semantics [ OWL 2 Direct Semantics ]. SubClassOf( a:Man a:Person ) 9.1 Class Expressions Axioms OWL 2 provides axioms that allow onetools to relatesupport extensions such as value comparisons and, consequently, class expressions,expressions such as shown in Figure 13."individuals whose width is greater than their height". Thus, the SubClassOf axiom allows one to state that each instance of oneDataSomeValuesFrom class expression is also an instance of another class expression, and thus to constructallows for a hierarchyrestricted existential quantification over a list of classes. The EquivalentClasses axiom allows one to statedata property expressions, and it contains those individuals that several class expressionsare equivalent to each other.connected through the DisjointClasses axiom allows one to state that several classdata property expressions are disjoint with each other that is, that they have no instancesto at least one literal in common. Finally,the DisjointUniongiven data range. The DataAllValuesFrom class expression allows one to definefor a class asrestricted universal quantification over a disjoint unionlist of several class expressionsdata property expressions, and thusit contains those individuals that are connected through the data property expressions only to express covering constraints. Figure 13.literals in the given data range. Finally, the DataHasValue class Axioms of OWL 2 ClassAxiom := SubClassOf | EquivalentClasses | DisjointClasses | DisjointUnion 9.1.1 Subclass Axiomsexpression contains those individuals that are connected by a subclass axiom SubClassOf( CE 1 CEdata property expression to a particular literal.

Restricting Data Property Expressions in OWL 2
Figure 10. Restricting Data Property Expressions in OWL 2

) states that the8.4.1 Existential Quantification

An existential class expression CESomeValuesFrom( DPE1 is a subclass... DPEn DR ) consists of then data property expressions DPEi, 1 i n, and a data range DR whose arity MUST be n. Such a class expression CE 2 . Roughly speaking, this statescontains all those individuals that CEare connected by DPEi to literals lti, 1 i n, such that the tuple lt1, ..., ltn is more specific than CE 2in DR. Subclass axioms areA fundamental typeclass expression of axioms in OWL 2 andthe form SomeValuesFrom( DPE DR ) can be used to constructseen as a syntactic shortcut for the class hierarchy. SubClassOf := 'SubClassOf'expression MinCardinality( 1 DPE DR ).

DataSomeValuesFrom := 'SomeValuesFrom' '(' axiomAnnotations subClassExpression superClassExpressionDataPropertyExpression { DataPropertyExpression } DataRange ')'

subClassExpression := classExpression superClassExpression := classExpressionConsider the ontology consisting of the following axioms. SubClassOf( a:Baby a:Childaxiom.

PropertyAssertion( a:hasAge a:Meg "17"^^xsd:integer ) Each babyMeg is a child. SubClassOf( a:Child a:Personseventeen years old.

The existential class expression SomeValuesFrom( a:hasAge DatatypeRestriction( xsd:integer xsd:maxExclusive "20"^^xsd:integer ) Each child is a person. ClassAssertion( a:Baby a:Stewie) Stewie is a baby. Since a:Stewie is an instance of a:Baby ,contains all individuals that are connected by the first subclass axiom a:Stewiea:hasAge to an integer strictly less than 20 so, consequently, a:Meg is classified as an instance of a:Child as well. Similarly,this expression.

8.4.2 Universal Quantification

A universal class expression AllValuesFrom( DPE1 ... DPEn DR ) consists of n data property expressions DPEi, 1 i n, and a data range DR whose arity MUST be n. Such a class expression contains all those individuals that are connected by the second subclass axiom a:StewieDPEi only to literals lti, 1 i n, such that each tuple lt1, ..., ltn is classified as an instance of a:Personin DR. This styleA class expression of reasoningthe form AllValuesFrom( DPE DR ) can be applied to any instance of a:Baby and not just a:Stewie ; therefore, one can conclude that a:Baby isseen as a subclass of a:Person . In other words, this ontology entailssyntactic shortcut for the axiom SubClassOf( a:Baby a:Personclass expression MaxCardinality( 0 DPE ComplementOf( DR ) ).

DataAllValuesFrom := 'AllValuesFrom' '(' DataPropertyExpression { DataPropertyExpression } DataRange ')'

Consider the ontology consisting of the following axioms.

SubClassOf( a:PersonWithChild SomeValuesFrom( a:hasChild UnionOf( a:Boy a:Girl ) ) ) A person that has a child has either at least one boy or a girl. SubClassOf( a:Boy a:Child ) Each boy is a child. SubClassOf( a:Girl a:Child ) Each girl is a child. SubClassOf( SomeValuesFrom( a:hasChild a:Child ) a:ParentPropertyAssertion( a:zipCode _:a1 "02903"^^xsd:integer ) If some object has a child, then this object is a parent.The first axiom states that each instanceZIP code of a:PersonWithChild is connected to an individual that_:a1 is an instance of either a:Boy or a:Girl . (Because ofthe open-world semantics of OWL 2, this doesinteger 02903.
FunctionalProperty( a:hasZIP ) Each object can have at most one ZIP code.

In United Kingdom and Canada, ZIP codes are strings (i.e., they can contain characters and not mean that there must be onlyjust numbers). Hence, one such individual or that all suchmight use the universal expression AllValuesFrom( a:hasZIP xsd:integer ) to identify those individuals must be instances of either a:Boy or of a:Girl .) Furthermore, each instance of a:Boy or a:Girlthat have only integer ZIP codes (and therefore have non-UK and non-Canadian addresses). The anonymous individual _:a1 is by the first axiom connected by a:zipCode to an instance of a:Child . Finally,integer, and the lastsecond axiom says that all individualsensures that are_:a1 is not connected by a:hasChilda:zipCode to an instance of a:Child are instances of a:Parent . Since this reasoning holds for each instance of a:PersonWithChild , each such instanceother literals; therefore, _:a1 is alsoclassified as an instance of a:Parent . In other words, this ontology entails the axiom SubClassOf( a:PersonWithChild a:ParentAllValuesFrom( a:hasZIP xsd:integer ).

9.1.2 Equivalent Classes An equivalent classes axiom EquivalentClasses( CE 1 ... CE n ) states that all ofThe class expressions CE i , 1 i n, are semantically equivalent to each other. Thislast axiom allows one to use each CE i as a synonym for each CE j stating that is, in any expression in the ontology containing such an axiom, CE i can be replaced with CE j without affectinga:hasZIP is functional is critical for the meaning ofinference from the ontology. An axiom EquivalentClasses( CE 1 CE 2 ) is equivalentprevious paragraph due to the following two axioms: SubClassOf( CE 1 CE 2 ) SubClassOf( CE 2 CE 1 ) Axiomsopen-world semantics of OWL 2. Without this axiom, the form EquivalentClasses( C CEontology is not guaranteed to list all literals that _:a1 is connected to by a:hasZIP; hence, without this axiom _:a1 would not be classified as an instance of AllValuesFrom( a:hasZIP xsd:integer ) , where C is.

8.4.3 Literal Value Restriction

A has-value class expression HasValue( DPE lt ) consists of a data property expression DPE and CE isa class expression, are often used in ontologies as definitionsliteral lt, because they define theand it contains all those individuals that are connected by DPE to lt. Each such class C in terms ofexpression can be seen as a syntactic shortcut for the class expression CESomeValuesFrom( DPE OneOf( lt ) ).

EquivalentClasses := 'EquivalentClasses'DataHasValue := 'HasValue' '(' axiomAnnotations ClassExpression ClassExpression { ClassExpression }DataPropertyExpression Literal ')'

Consider the ontology consisting of the following axioms. EquivalentClasses( a:Boy IntersectionOf( a:Child a:Man ) ) A boy is a male child. ClassAssertion( a:Child a:Chrisaxiom.

PropertyAssertion( a:hasAge a:Meg "17"^^xsd:integer ) ChrisMeg is a child. ClassAssertion( a:Man a:Chrisseventeen years old.

The has-value expression hasValue( a:hasAge "17"^^xsd:integer ) Chriscontains all individuals that are connected by a:hasAge to the integer 17 so, consequently, a:Meg is a man. ClassAssertion( a:Boy a:Stewie ) Stewieclassified as an instance of this expression.

8.5 Data Property Cardinality Restrictions

Class expressions in OWL 2 can be formed by placing restrictions on the cardinality of data property expressions, as shown in Figure 11. These are similar to the restrictions on the cardinality of object property expressions. All cardinality restrictions can be qualified or unqualified: in the former case, the cardinality restriction only applies to literals that are connected by the data property expression and are in the qualifying data range; in the latter case it applies to all literals that are connected by the data property expression (this is a boy.equivalent to the first axiom definesqualified case with the class a:Boy as an intersection ofqualifying data range equal to rdfs:Literal). The classes a:Childclass expressions DataMinCardinality, DataMaxCardinality, and a:Man ; thus, the instances of a:Boy are exactlyDataExactCardinality contain those instancesindividuals that are both an instance of a:Child and an instance of a:Man . Suchconnected by a definition consists of two directions. The first direction implies that each instance of a:Childdata property expression to at least, at most, and a:Man is an instance of a:Boy ; since a:Chris satisfies these two conditions, it is classified as an instanceexactly a given number of a:Boy .literals in the second direction implies that each a:Boy is an instance of a:Child and of a:Man ; thus, a:Stewie is classified as an instance of a:Man and of a:Boy . Considerspecified data range, respectively.

Restricting the Cardinality of Data Property Expressions in OWL 2
Figure 11. Restricting the ontology consistingCardinality of the following axioms. EquivalentClasses( a:MongrelOwner SomeValuesFrom( a:hasPet a:Mongrel ) ) A mongrel owner has a pet that isData Property Expressions in OWL 2

8.5.1 Minimum Cardinality

A mongrel. EquivalentClasses( a:DogOwner SomeValuesFrom( a:hasPet a:Dog )minimum cardinality expression MinCardinality( n DPE DR ) consists of a dog owner has a pet that is a dog. SubClassOf( a:Mongrel a:Dog ) Each mongrel isnonnegative integer n, a dog. ClassAssertion( a:MongrelOwner a:Peter ) Peter isdata property expression DPE, and a mongrel owner. By the first axiom, each instance x of a:MongrelOwner must be connected via a:hasPet to an instance of a:Mongrel ;unary data range DR, and it contains all those individuals that are connected by the third axiom, this individualDPE to at least n different literals in DR. If DR is an instance of a:Dog ; thus, by the second axiom, xnot present, it is an instance of a:DogOwnertaken to be rdfs:Literal.

In other words, thisDataMinCardinality := 'MinCardinality' '(' nonNegativeInteger DataPropertyExpression [ DataRange ] ')'

Consider the ontology entailsconsisting of the axiom SubClassOf( a:MongrelOwner a:DogOwnerfollowing axioms.

PropertyAssertion( a:hasName a:Meg "Meg Griffin" ) Meg's name is "Meg Griffin".
PropertyAssertion( a:hasName a:Meg "Megan Griffin" ) Meg's name is "Megan Griffin".

The minimum cardinality expression MinCardinality( 2 a:hasName ) contains those individuals that are connected by a:hasName to at least two different literals. The fourth axiom, a:Peterxsd:string datatypes interprets different string literals as being distinct, so "Meg Griffin" and "Megan Griffin" are different; thus, the individual a:Meg is thenclassified as an instance of a:DogOwnerthe class expression MinCardinality( 2 a:hasName ).

9.1.3 Disjoint Classes8.5.2 Maximum Cardinality

A disjoint classes axiom DisjointClasses( CE 1 ... CEmaximum cardinality expression MaxCardinality( n DPE DR ) states that allconsists of the class expressions CE ia nonnegative integer n, 1 i n, are mutually disjoint with each other;a data property expression DPE, and a unary data range DR, and it contains all those individuals that is, no individual can beare connected by DPE to at the same time an instance of both CE i and CE j for i j. DisjointClasses := 'DisjointClasses'most n different literals in DR. If DR is not present, it is taken to be rdfs:Literal.

DataMaxCardinality := 'MaxCardinality' '(' axiomAnnotations ClassExpression ClassExpression { ClassExpression }nonNegativeInteger DataPropertyExpression [ DataRange ] ')'

Consider the ontology consisting of the following axioms. DisjointClasses( a:Boy a:Girlaxiom.

FunctionalProperty( a:hasName ) NothingEach object can be both a boy and a girl. ClassAssertion( a:Boy a:Stewie ) Stewie is a boy.have at most one name.

The axioms in this ontology imply that a:Stewie can be classified as an instance of ComplementOf( a:Girlmaximum cardinality expression MaxCardinality( 2 a:hasName ) . Ifcontains those individuals that are connected by a:hasName to at most two different literals. Since the ontology were extended with the assertion ClassAssertion( a:Girl a:Stewie ) ,axiom restricts a:hasName to be functional, all individuals in the ontology would become inconsistent. 9.1.4 Disjoint Unionare instances of this class Expressions A disjoint union axiom DisjointUnion( C CE 1 ... CEexpression.

8.5.3 Exact Cardinality

An exact cardinality expression ExactCardinality( n DPE DR ) states thatconsists of a class C isnonnegative integer n, a disjoint union of the class expressions CE idata property expression DPE, 1 i n,and a unary data range DR, and it contains all of which are mutually disjoint with each other. Such axiomsthose individuals that are sometimes referredconnected by DPE to as covering axioms, as they state that the extensions of all CE i exactly cover the extension of C . Thus, each instance of C is an instance ofexactly one CE i , and each instance of CE i is an instance of C . Each such axiom can be seen as a syntactic shortcut for the following two axioms: EquivalentClasses( C UnionOf( CE 1 ... CE n ) ) DisjointClasses( CE 1 ... CEn ) DisjointUnion := 'DisjointUnion'different literals in DR. If DR is not present, it is taken to be rdfs:Literal.

DataExactCardinality := 'ExactCardinality' '(' axiomAnnotations Class disjointClassExpressionsnonNegativeInteger DataPropertyExpression [ DataRange ] ')'

disjointClassExpressions := ClassExpression ClassExpression { ClassExpression }Consider the ontology consisting of the following axioms.

DisjointUnion( a:Child a:Boy a:GirlPropertyAssertion( a:hasName a:Brian "Brian Griffin" ) Each child is either a boy or a girl, each boyBrian's name is a child,"Brian Griffin".
FunctionalProperty( a:hasName ) Each girl is a child, and nothingobject can have at most one name.

The exact cardinality expression ExactCardinality( 1 a:hasName ) contains those individuals that are connected by a:hasName to exactly one literal. Since the ontology axiom restricts a:hasName to be both a boyfunctional and a girl. ClassAssertion( a:Child a:Stewie ) Stewie is a child. ClassAssertion( ComplementOf( a:Girl ) a:Stewie ) Stewiea:Brian is not a girl.connected by the first two axioms, a:Stewiea:hasName to "Brian Griffin", it is eitherclassified as an instance of a:Boy or a:Girl . The last assertion eliminatesthis class expression.

9 Axioms

The second possibility, so a:Stewie is classified asmain component of an instanceOWL 2 ontology is a set of a:Boy . 9.2 Object Propertyaxioms statements that say what is true in the domain being modeled. OWL 2 provides an extensive set of axioms, all of which extend the Axiom class in the structural specification. As shown in Figure 12, axioms thatin OWL 2 can be used to characterizedeclarations, axioms about classes, axioms about object property expressions. For clarity,or data properties, keys, assertions (sometimes also called facts), and axioms about annotations.

The Axioms of OWL 2
Figure 12. The structure of theseAxioms isof OWL 2

Axiom := Declaration | ClassAxiom | ObjectPropertyAxiom | DataPropertyAxiom | HasKey | Assertion | AnnotationAxiom

axiomAnnotations := { Annotation }

As shown in two separate figures, Figure 14 andFigure 15. The SubObjectPropertyOf1, OWL 2 axioms can contain axiom allows one to state thatannotations, the extensionstructure of one object property expressionwhich is includeddefined in Section 10. Axiom annotations have no effect on the extensionsemantics of another object property expression. The EquivalentObjectProperties axiom allows one to stateaxioms that is, they do not affect the extensionsmeaning of several object property expressionsOWL 2 ontologies [OWL 2 Direct Semantics]. In contrast, axiom annotations do affect structural equivalence: axioms will not be structurally equivalent if their axiom annotations are not structurally equivalent.

The same. The DisjointObjectPropertiesfollowing axiom allows one to statecontains a comment that explains the extensionspurpose of several object property expressionsthe axiom.

SubClassOf( Annotation( rdfs:comment "Male people are disjoint with each other that is, that they dopeople.") a:Man a:Person)

Since annotations affect structural equivalence between axioms, the previous axiom is not share pairs of connected individuals.structurally equivalent with the ObjectPropertyDomain and ObjectPropertyRangefollowing axiom, even though these two axioms can be usedare equivalent according to restrict the first andthe second individual, respectively, connected by an object propertyOWL 2 Direct Semantics [OWL 2 Direct Semantics].

SubClassOf( a:Man a:Person )

9.1 Class Expression Axioms

OWL 2 provides axioms that allow relationships to be instances of the specifiedestablished between class expression.expressions, as shown in Figure 13. The InverseObjectPropertiesSubClassOf axiom can be usedallows one to state that two object property expressions are inverseeach instance of one class expression is also an instance of another class expression, and thus to construct a hierarchy of each other. Figure 14. Object Property Axioms, Part Iclasses. The FunctionalObjectPropertyEquivalentClasses axiom allows one to state that an object property expression is functional that is, thatseveral class expressions are equivalent to each individual can have at most one outgoing connection of the specified object property expression.other. The InverseFunctionalObjectPropertyDisjointClasses axiom allows one to state that an object property expression is inverse-functionalseveral class expressions are pairwise disjoint that is, that each individual canthey have at most one incoming connection of the specified object property expression.no instances in common. Finally, the ReflexiveObjectProperty , IrreflexiveObjectProperty , SymmetricObjectProperty , AsymmetricObjectProperty ,and TransitiveObjectProperty axioms allowDisjointUnion class expression allows one to state that an object property expression is reflexive, irreflexive, symmetric, asymmetric, or transitive, respectively.define a class as a disjoint union of several class expressions and thus to express covering constraints.

The Class Axioms of OWL 2
Figure 15.13. The Class Axioms Defining Characteristicsof Object Properties, Part II ObjectPropertyAxiom := SubObjectPropertyOf | EquivalentObjectProperties | DisjointObjectProperties | InverseObjectProperties | ObjectPropertyDomain | ObjectPropertyRange | FunctionalObjectProperty | InverseFunctionalObjectProperty | ReflexiveObjectProperty | IrreflexiveObjectPropertyOWL 2

ClassAxiom := SubClassOf | SymmetricObjectPropertyEquivalentClasses | AsymmetricObjectPropertyDisjointClasses | TransitiveObjectProperty 9.2.1 Object Subproperties Object subproperty axioms are analogous toDisjointUnion

9.1.1 Subclass Axioms

A subclass axioms, and they come in two forms. The basic form is SubPropertyOf( OPE 1 OPE 2 ) . This axiom states that the object property expression OPE 1 is a subproperty of the object property expression OPE 2 that is, if an individual x is connected by OPE 1 to an individual y , then x is also connected by OPE 2 to y . The more complex form is SubPropertyOf( PropertyChain( OPE 1 ... OPE n ) OPE ) . Thisaxiom SubClassOf( CE1 CE2 ) states that, if an individual xthat the class expression CE1 is connected bya sequencesubclass of object property expressions OPE 1 , ..., OPE n with an individual y , then x is also connected with y bythe object propertyclass expression OPECE2. SuchRoughly speaking, this states that CE1 is more specific than CE2. Subclass axioms are also knowna fundamental type of axioms in OWL 2 and can be used to construct a class hierarchy. Other kinds of class expression axiom can be seen as complex role inclusions [ SROIQ ]. SubObjectPropertyOf := 'SubPropertyOf'syntactic shortcuts for one or more subclass axioms.

SubClassOf := 'SubClassOf' '(' axiomAnnotations subObjectPropertyExpressions superObjectPropertyExpression ')' subObjectPropertyExpressions := ObjectPropertyExpression | propertyExpressionChain propertyExpressionChain := 'PropertyChain' '(' ObjectPropertyExpression ObjectPropertyExpression { ObjectPropertyExpression }subClassExpression superClassExpression ')'
superObjectPropertyExpression := ObjectPropertyExpressionsubClassExpression := classExpression
superClassExpression := classExpression

Consider the ontology consisting of the following axioms.

SubPropertyOf( a:hasDog a:hasPetSubClassOf( a:Baby a:Child ) Having a dogEach baby is a kind of havingchild.
SubClassOf( a:Child a:Person ) Each child is a pet. PropertyAssertion( a:hasDog a:Peter a:Brianperson.
ClassAssertion( a:Baby a:Stewie ) BrianStewie is a dog of Peter.baby.

Since a:hasDoga:Stewie is a subpropertyan instance of a:hasPeta:Baby, each tuple of individuals connectedby the former property expressionfirst subclass axiom a:Stewie is also connectedclassified as an instance of a:Child as well. Similarly, by the latter property expression. Therefore, this ontology entails that a:Petersecond subclass axiom a:Stewie is connectedclassified as an instance of a:Person. This style of reasoning can be applied to a:Brian by a:hasPetany instance of a:Baby and not just a:Stewie; therefore, one can conclude that is, thea:Baby is a subclass of a:Person. In other words, this ontology entails the assertion PropertyAssertion( a:hasPet a:Peter a:Brianaxiom SubClassOf( a:Baby a:Person ).

Consider the ontology consisting of the following axioms.

SubPropertyOf( PropertyChain( a:hasMother a:hasSisterSubClassOf( a:PersonWithChild
    SomeValuesFrom( a:hasChild UnionOf( a:Boy a:Girl ) a:hasAunt)
The sister of someone's mother is)
A person that person's aunt. PropertyAssertion( a:hasMother a:Stewie a:Loishas a child has either at least one boy or a girl.
SubClassOf( a:Boy a:Child ) LoisEach boy is the mother of Stewie. PropertyAssertion( a:hasSister a:Lois a:Carola child.
SubClassOf( a:Girl a:Child ) CarolEach girl is a sisterchild.
SubClassOf( SomeValuesFrom( a:hasChild a:Child ) a:Parent ) If some object has a child, then this object is a parent.

The first axiom states that each instance of a:PersonWithChild is connected to an individual that is an instance of either a:Boy or a:Girl. (Because of Lois.the axioms inopen-world semantics of OWL 2, this ontology implydoes not mean that a:Stewiethere must be only one such individual or that all such individuals must be instances of either a:Boy or of a:Girl.) Furthermore, each instance of a:Boy or a:Girl is an instance of a:Child. Finally, the last axiom says that all individuals that are connected by a:hasAunt with a:Carol ; that is, thea:hasChild to an instance of a:Child are instances of a:Parent. Since this reasoning holds for each instance of a:PersonWithChild, each such instance is also an instance of a:Parent. In other words, this ontology entails the assertion PropertyAssertion( a:hasAunt a:Stewie a:Carolaxiom SubClassOf( a:PersonWithChild a:Parent ).

9.2.29.1.2 Equivalent Object PropertiesClasses

An equivalent object propertiesclasses axiom EquivalentProperties( OPEEquivalentClasses( CE1 ... OPECEn ) states that all of the object propertyclass expressions OPECEi, 1 i n, are semantically equivalent withto each other. This axiom allows one to use each OPECEi as a synonym for each OPECEj that is, in any expression in the ontology containing such an axiom, OPECEi can be replaced with OPECEj without affecting the meaning of the ontology. TheAn axiom EquivalentProperties( OPEEquivalentClasses( CE1 OPECE2 ) is equivalent to the following two axioms:

SubPropertyOf( OPESubClassOf( CE1 OPECE2 )
SubPropertyOf( OPESubClassOf( CE2 OPECE1 )

EquivalentObjectProperties := 'EquivalentProperties'Axioms of the form EquivalentClasses( C CE ), where C is a class and CE is a class expression, are often called definitions, because they define the class C in terms of the class expression CE.

EquivalentClasses := 'EquivalentClasses' '(' axiomAnnotations ObjectPropertyExpression ObjectPropertyExpressionClassExpression ClassExpression { ObjectPropertyExpressionClassExpression } ')'

Consider the ontology consisting of the following axioms.

EquivalentProperties( a:hasBrother a:hasMaleSiblingEquivalentClasses( a:Boy IntersectionOf( a:Child a:Man ) ) HavingA brotherboy is a male child.
ClassAssertion( a:Child a:Chris ) Chris is a child.
ClassAssertion( a:Man a:Chris ) Chris is a man.
ClassAssertion( a:Boy a:Stewie ) Stewie is a boy.

The samefirst axiom defines the class a:Boy as havingan intersection of the classes a:Child and a:Man; thus, the instances of a:Boy are exactly those instances that are both an instance of a:Child and an instance of a:Man. Such a definition consists of two directions. The first direction implies that each instance of a:Child and a:Man is an instance of a:Boy; since a:Chris satisfies these two conditions, it is classified as an instance of a:Boy. The second direction implies that each a:Boy is an instance of a:Child and of a:Man; thus, a:Stewie is classified as an instance of a:Man and of a:Boy.

Consider the ontology consisting of the following axioms.

EquivalentClasses( a:MongrelOwner SomeValuesFrom( a:hasPet a:Mongrel ) ) A mongrel owner has a pet that is a mongrel.
EquivalentClasses( a:DogOwner SomeValuesFrom( a:hasPet a:Dog ) ) A dog owner has a pet that is a male sibling. PropertyAssertion( a:hasBrother a:Chris a:Stewiedog.
SubClassOf( a:Mongrel a:Dog ) StewieEach mongrel is a brother of Chris. PropertyAssertion( a:hasMaleSibling a:Stewie a:Chrisdog.
ClassAssertion( a:MongrelOwner a:Peter ) ChrisPeter is a male siblingmongrel owner.

By the first axiom, each instance x of Stewie. Since a:hasBrother and a:hasMaleSibling are equivalent properties, this ontology entails that a:Chris isa:MongrelOwner must be connected via a:hasPet to an instance of a:Mongrel; by a:hasMaleSibling with a:Stewie that is, the ontology entailsthe assertion PropertyAssertion( a:hasMaleSibling a:Chris a:Stewie ) and that a:Stewiethird axiom, this individual is connectedan instance of a:Dog; thus, by a:hasBrother with a:Chris that is,the second axiom, x is an instance of a:DogOwner. In other words, this ontology entails the assertion PropertyAssertion( a:hasBrother a:Stewie a:Chrisaxiom SubClassOf( a:MongrelOwner a:DogOwner ). 9.2.3By the fourth axiom, a:Peter is then classified as an instance of a:DogOwner.

9.1.3 Disjoint Object PropertiesClasses

A disjoint object propertiesclasses axiom DisjointProperties( OPEDisjointClasses( CE1 ... OPECEn ) states that all of the object propertyclass expressions OPECEi, 1 i n, are mutually disjoint with each other;pairwise disjoint; that is, no individual xcan be connected toat the same time an individual y byinstance of both OPECEi and OPECEj for i j. DisjointObjectProperties := 'DisjointProperties'An axiom DisjointClasses( CE1 CE2 ) is equivalent to the following axiom:

SubClassOf( CE1 ComplementOf( CE2 ) )

DisjointClasses := 'DisjointClasses' '(' axiomAnnotations ObjectPropertyExpression ObjectPropertyExpressionClassExpression ClassExpression { ObjectPropertyExpressionClassExpression } ')'

Consider the ontology consisting of the following axioms.

DisjointProperties( a:hasFather a:hasMotherDisjointClasses( a:Boy a:Girl ) Fatherhood is disjoint with motherhood. PropertyAssertion( a:hasFatherNothing can be both a boy and a girl.
ClassAssertion( a:Boy a:Stewie a:Peter) PeterStewie is a boy.

The father of Stewie. PropertyAssertion( a:hasMotheraxioms in this ontology imply that a:Stewie a:Lois ) Lois is the mothercan be classified as an instance of Stewie. In this ontology,ComplementOf( a:Girl ). If the disjointness axiom is satisfied. If, however, oneontology were to add anextended with the assertion PropertyAssertion( a:hasMotherClassAssertion( a:Girl a:Stewie a:Peter), the disjointness axiom would be invalidated and theontology would become inconsistent.

9.2.4 Object Property Domain An object property domain9.1.4 Disjoint Union of Class Expressions

A disjoint union axiom PropertyDomain( OPEDisjointUnion( C CE1 ... CEn ) states that the domain of the object property expression OPEa class C is a disjoint union of the class expressionexpressions CEi, 1 i n, all of which are pairwise disjoint. Such axioms are sometimes referred to as covering axioms, as they state that is, if an individual x is connected by OPE with some other individual, then xthe extensions of all CEi exactly cover the extension of C. Thus, each instance of C is an instance of exactly one CEi, and each instance of CEi is an instance of C. Each such axiom can be seen as a syntactic shortcut for the following axiom: SubClassOf( SomeValuesFrom( OPE owl:Thingtwo axioms:

EquivalentClasses( C UnionOf( CE1 ... CEn ) )
DisjointClasses( CE1 ... CEn )

ObjectPropertyDomain := 'PropertyDomain'DisjointUnion := 'DisjointUnion' '(' axiomAnnotations ObjectPropertyExpression ClassExpressionClass disjointClassExpressions ')'
disjointClassExpressions := ClassExpression ClassExpression { ClassExpression }

Consider the ontology consisting of the following axioms.

PropertyDomain( a:hasDog a:Person ) Only people can own dogs. PropertyAssertion( a:hasDog a:Peter a:BrianDisjointUnion( a:Child a:Boy a:Girl ) BrianEach child is either a dog of Peter. By the first axiom,boy or a girl, each individual that has an outgoing a:hasDog connection mustboy is a child, each girl is a child, and nothing can be both a boy and a girl.
ClassAssertion( a:Child a:Stewie ) Stewie is a child.
ClassAssertion( ComplementOf( a:Girl ) a:Stewie ) Stewie is not a girl.

By the first two axioms, a:Stewie is either an instance of a:Persona:Boy or a:Girl. Therefore, a:Peter can beThe last assertion eliminates the second possibility, so a:Stewie is classified as an instance of a:Person ; that is, this ontology entails the assertion ClassAssertion( a:Person a:Peter )a:Boy.

Domain9.2 Object Property Axioms

inOWL 2 have a standard first-order semanticsprovides axioms that is somewhat different fromcan be used to characterize and establish relationships between object property expressions. For clarity, the semanticsstructure of suchthese axioms is shown in databasestwo separate figures, Figure 14 and object-oriented systems, where such axioms are interpreted as checks.Figure 15. The domainSubObjectPropertyOf axiom fromallows one to state that the example ontology wouldextension of one object property expression is included in such systems be interpreted as a constraint sayingthe extension of another object property expression. The EquivalentObjectProperties axiom allows one to state that a:hasDog can point only from individualsthe extensions of several object property expressions are the same. The DisjointObjectProperties axiom allows one to state that the extensions of several object property expressions are knownpairwise disjoint that is, that they do not share pairs of connected individuals. The ObjectPropertyDomain and ObjectPropertyRange axioms can be used to restrict the first and the second individual, respectively, connected by an object property expression to be instances of a:Person ; furthermore, sincethe example ontology does not explicitlyspecified class expression. The InverseObjectProperties axiom can be used to state that two object property expressions are the inverse of each other.

Object Property Axioms in OWL 2, Part I
Figure 14. Object Property Axioms in OWL 2, Part I

The FunctionalObjectProperty axiom allows one to state that an object property expression is functional that is, that each individual can have at most one outgoing connection of the specified object property expression. The InverseFunctionalObjectProperty axiom allows one to state that a:Peter isan instanceobject property expression is inverse-functional that is, that each individual can have at most one incoming connection of a:Personthe specified object property expression. Finally, the ReflexiveObjectProperty, IrreflexiveObjectProperty, SymmetricObjectProperty, AsymmetricObjectProperty, and TransitiveObjectProperty axioms allow one might expect the domain constraintto be invalidated. This, however,state that an object property expression is not the casereflexive, irreflexive, symmetric, asymmetric, or transitive, respectively.

Axioms Defining Characteristics of Object Properties in OWL 2, Part II
Figure 15. Axioms Defining Characteristics of Object Properties in OWL 2: as shown2, Part II

ObjectPropertyAxiom :=
    SubObjectPropertyOf | EquivalentObjectProperties |
    DisjointObjectProperties | InverseObjectProperties |
    ObjectPropertyDomain | ObjectPropertyRange |
    FunctionalObjectProperty | InverseFunctionalObjectProperty |
    ReflexiveObjectProperty | IrreflexiveObjectProperty |
    SymmetricObjectProperty | AsymmetricObjectProperty |
    TransitiveObjectProperty

9.2.1 Object Subproperties

Object subproperty axioms are analogous to subclass axioms, and they come in two forms.

The previous paragraph, the missing typebasic form is inferred from the domain constraint. 9.2.5 Object Property Range An object property range axiom PropertyRange(SubPropertyOf( OPE CE1 OPE2 ). This axiom states that the range of theobject property expression OPE1 is a subproperty of the classobject property expression CEOPE2 that is, if somean individual x is connected by OPE with1 to an individual xy, then x is also connected by OPE2 to y.

The more complex form is SubPropertyOf( PropertyChain( OPE1 ... OPEn ) OPE ). This axiom states that, if an instanceindividual x is connected by a sequence of CEobject property expressions OPE1, ..., OPEn with an individual y, then x is also connected with y by the object property expression OPE. EachSuch axiom can be seenaxioms are also known as a syntactic shortcut for the following axiom: SubClassOf( owl:Thing AllValuesFrom( OPE CE ) ) ObjectPropertyRange := 'PropertyRange'complex role inclusions [SROIQ].

SubObjectPropertyOf := 'SubPropertyOf' '(' axiomAnnotations subObjectPropertyExpressions superObjectPropertyExpression ')'
subObjectPropertyExpressions := ObjectPropertyExpression ClassExpression| propertyExpressionChain
propertyExpressionChain := 'PropertyChain' '(' ObjectPropertyExpression ObjectPropertyExpression { ObjectPropertyExpression } ')'
superObjectPropertyExpression := ObjectPropertyExpression

Consider the ontology consisting of the following axioms.

PropertyRange(SubPropertyOf( a:hasDog a:Doga:hasPet ) The range of the a:hasDog propertyHaving a dog is the class a:Dog .a kind of having a pet.
PropertyAssertion( a:hasDog a:Peter a:Brian ) Brian is a dog of Peter.

By the first axiom, each individual that has an incomingSince a:hasDog connection must be an instanceis a subproperty of a:Dog .a:hasPet, each tuple of individuals connected by the former property expression is also connected by the latter property expression. Therefore, this ontology entails that a:Peter is connected to a:Brian can be classified as an instance of a:Dogby a:hasPet; that is, thisthe ontology entails the assertion ClassAssertion(PropertyAssertion( a:hasPet a:Peter a:Brian a:Dog).

Range axioms in OWL 2 have a standard first-order semantics that is somewhat different fromConsider the semanticsontology consisting of such axioms in databases and object-oriented systems, where such axioms are interpreted as checks.the range axiom fromfollowing axioms.

SubPropertyOf( PropertyChain( a:hasMother a:hasSister ) a:hasAunt ) The example ontology would in such systems be interpreted as a constraint saying that a:hasDog can point only to individuals that are known to be instancessister of a:Dog ; furthermore, since the example ontology does not explicitly state that a:Briansomeone's mother is an instance of a:Dog , one might expect the range constraint to be invalidated. This, however,that person's aunt.
PropertyAssertion( a:hasMother a:Stewie a:Lois ) Lois is not the case in OWL 2: as shown inthe previous paragraph,mother of Stewie.
PropertyAssertion( a:hasSister a:Lois a:Carol ) Carol is a sister of Lois.

The missing typeaxioms in this ontology imply that a:Stewie is inferred fromconnected by a:hasAunt with a:Carol; that is, the range constraint. 9.2.6 Inverseontology entails the assertion PropertyAssertion( a:hasAunt a:Stewie a:Carol ).

9.2.2 Equivalent Object Properties

An inverseequivalent object properties axiom InverseProperties(EquivalentProperties( OPE1 ... OPE 2n ) states that all of the object property expressionexpressions OPEi, 1 is i n, are semantically equivalent to each other. This axiom allows one to use each OPEi as a synonym for each OPEj that is, in any expression in the ontology containing such an inverseaxiom, OPEi can be replaced with OPEj without affecting the meaning of the object property expression OPE 2 . Thus, if an individual x is connected byontology. The axiom EquivalentProperties( OPE1 to an individual y , then y is also connected byOPE2 ) is equivalent to x , and vice versa. Each such axiom can be seen as a syntactic shortcut forthe following axiom: EquivalentProperties(two axioms:

SubPropertyOf( OPE1 InverseOf(OPE2 )
SubPropertyOf( OPE2 OPE1 )

InverseObjectProperties := 'InverseProperties'EquivalentObjectProperties := 'EquivalentProperties' '(' axiomAnnotations ObjectPropertyExpression ObjectPropertyExpression { ObjectPropertyExpression } ')'

Consider the ontology consisting of the following axioms.

InverseProperties( a:hasFather a:fatherOfEquivalentProperties( a:hasBrother a:hasMaleSibling ) Having a fatherbrother is the opposite of beingsame as having a father of someone.male sibling.
PropertyAssertion( a:hasFathera:hasBrother a:Chris a:Stewie a:Peter) PeterStewie is the fathera brother of Stewie.Chris.
PropertyAssertion( a:fatherOf a:Petera:hasMaleSibling a:Stewie a:Chris ) PeterChris is the fathera male sibling of Chris.Stewie.

Since a:hasBrother and a:hasMaleSibling are equivalent properties, this ontology entails that a:Petera:Chris is connected by a:fatherOfa:hasMaleSibling with a:Stewie that is, the ontology entails the assertion PropertyAssertion( a:fatherOf a:Petera:hasMaleSibling a:Chris a:Stewie ) and it also entails and that a:Chrisa:Stewie is connected by a:hasFathera:hasBrother with a:Petera:Chris that is, the ontology entails the assertion PropertyAssertion( a:hasFathera:hasBrother a:Stewie a:Chris a:Peter).

9.2.7 Functional9.2.3 Disjoint Object Properties

AnA disjoint object property functionalityproperties axiom FunctionalProperty(DisjointProperties( OPE1 ... OPEn ) states that all of the object property expressionexpressions OPE is functionali, 1 i n, are pairwise disjoint; that is, for eachno individual x , therecan be at most one distinctconnected to an individual y such that x is connectedby both OPE to y . Each such axiom can be seen as a syntactic shortcut for the following axiom: SubClassOf( owl:Thing MaxCardinality( 1i and OPE ) ) FunctionalObjectProperty := 'FunctionalProperty'j for i j.

DisjointObjectProperties := 'DisjointProperties' '(' axiomAnnotations ObjectPropertyExpression ObjectPropertyExpression { ObjectPropertyExpression } ')'

Consider the ontology consisting of the following axioms.

FunctionalProperty(DisjointProperties( a:hasFather a:hasMother ) Each object can have at most one father.Fatherhood is disjoint with motherhood.
PropertyAssertion( a:hasFather a:Stewie a:Peter ) Peter is the father of Stewie.
PropertyAssertion( a:hasFathera:hasMother a:Stewie a:Peter_Griffina:Lois ) Peter GriffinLois is the fathermother of Stewie.

By the first axiom, a:hasFather can point from a:Stewie to at most one distinct individual, so a:Peter and a:Peter_Griffin must be equal; that is,In this ontology entailsontology, the disjointness axiom is satisfied. If, however, one were to add an assertion SameIndividual(PropertyAssertion( a:hasMother a:Stewie a:Peter a:Peter_Griffin) . One might intuitively expect, the previous ontology todisjointness axiom would be inconsistent, since the a:hasFather property points to two different values for a:Stewie . OWL 2, however, does not have the unique name assumption, so a:Peterinvalidated and a:Peter_Griffin are not necessarily distinct individuals. Ifthe ontology were extended with the axiom DifferentIndividuals( a:Peter a:Peter_Griffin ) , then itwould indeedbecome inconsistent.

9.2.8 Inverse-Functional9.2.4 Object PropertiesProperty Domain

An object property inverse functionalitydomain axiom InverseFunctionalProperty(PropertyDomain( OPE CE ) states that the domain of the object property expression OPE is inverse-functional that is, for each individual x , there can be at most one individual y suchthe class expression CE that yis, if an individual x is connected by OPE with some other individual, then x is an instance of CE. Each such axiom can be seen as a syntactic shortcut for the following axiom:

SubClassOf( owl:Thing MaxCardinality( 1 InverseOf(SomeValuesFrom( OPE owl:Thing ) CE )

) InverseFunctionalObjectProperty := 'InverseFunctionalProperty'ObjectPropertyDomain := 'PropertyDomain' '(' axiomAnnotations ObjectPropertyExpression ClassExpression ')'

Consider the ontology consisting of the following axioms.

InverseFunctionalProperty( a:fatherOfPropertyDomain( a:hasDog a:Person ) Each objectOnly people can have at most one father.own dogs.
PropertyAssertion( a:fatherOfa:hasDog a:Peter a:Stewie ) Peter is the father of Stewie. PropertyAssertion( a:fatherOf a:Peter_Griffin a:Stewiea:Brian ) Peter GriffinBrian is the fathera dog of Stewie.Peter.

By the first axiom, at most one distincteach individual can point by a:fatherOf to a:Stewie , so a:Peter and a:Peter_Griffinthat has an outgoing a:hasDog connection must be equal;an instance of a:Person. Therefore, a:Peter can be classified as an instance of a:Person; that is, this ontology entails the assertion SameIndividual(ClassAssertion( a:Person a:Peter a:Peter_Griffin).

One might intuitively expectDomain axioms in OWL 2 have a standard first-order semantics that is somewhat different from the previoussemantics of such axioms in databases and object-oriented systems, where such axioms are interpreted as checks. The domain axiom from the example ontology would in such systems be interpreted as a constraint saying that a:hasDog can point only from individuals that are known to be inconsistent,instances of a:Person; furthermore, since there are two individualsthe example ontology does not explicitly state that a:Stewiea:Peter is connectedan instance of a:Person, one might expect the domain constraint to by a:fatherOf . OWL 2,be invalidated. This, however, doesis not havethe unique name assumption, so a:Peter and a:Peter_Griffin are not necessarily distinct individuals. Ifcase in OWL 2: as shown in the ontology were extended withprevious paragraph, the axiom DifferentIndividuals( a:Peter a:Peter_Griffin ) , then it would indeed become inconsistent. 9.2.9 Reflexivemissing type is inferred from the domain constraint.

9.2.5 Object PropertiesProperty Range

An object property reflexivityrange axiom ReflexiveProperty(PropertyRange( OPE CE ) states that the range of the object property expression OPE is reflexivethe class expression CE that is, eachif some individual is connected by OPE to itself. ReflexiveObjectProperty := 'ReflexiveProperty'with an individual x, then x is an instance of CE. Each such axiom can be seen as a syntactic shortcut for the following axiom:

SubClassOf( owl:Thing AllValuesFrom( OPE CE ) )

ObjectPropertyRange := 'PropertyRange' '(' axiomAnnotations ObjectPropertyExpression ClassExpression ')'

Consider the ontology consisting of the following axioms.

ReflexiveProperty( a:knowsPropertyRange( a:hasDog a:Dog ) Everybody knows themselves. ClassAssertion( a:PersonThe range of the a:hasDog property is the class a:Dog.
PropertyAssertion( a:hasDog a:Peter a:Brian ) PeterBrian is a person.dog of Peter.

By the first axiom, a:Petereach individual that has an incoming a:hasDog connection must be connected by a:knows to itself;an instance of a:Dog. Therefore, a:Brian can be classified as an instance of a:Dog; that is, this ontology entails the assertion PropertyAssertion( a:knows a:Peter a:PeterClassAssertion( a:Brian a:Dog ).

9.2.10 Irreflexive Object Properties An object property irreflexivity axiom IrreflexiveProperty( OPE ) states that the object property expression OPE is irreflexiveRange axioms in OWL 2 have a standard first-order semantics that is, no individualis connected by OPE to itself. IrreflexiveObjectProperty := 'IrreflexiveProperty' '(' axiomAnnotations ObjectPropertyExpression ')' Considersomewhat different from the ontology consistingsemantics of such axioms in databases and object-oriented systems, where such axioms are interpreted as checks. The following axioms. IrreflexiveProperty( a:marriedTo ) Nobody canrange axiom from the example ontology would in such systems be marriedinterpreted as a constraint saying that a:hasDog can point only to themselves. If this ontology were extended withindividuals that are known to be instances of a:Dog; furthermore, since the assertion PropertyAssertion( a:marriedTo a:Peter a:Peter )example ontology does not explicitly state that a:Brian is an instance of a:Dog, one might expect the irreflexivity axiom wouldrange constraint to be contradicted andinvalidated. This, however, is not the ontology would become inconsistent. 9.2.11 Symmetriccase in OWL 2: as shown in the previous paragraph, the missing type is inferred from the range constraint.

9.2.6 Inverse Object Properties

An inverse object property symmetryproperties axiom SymmetricProperty(InverseProperties( OPE1 OPE2 ) states that the object property expression OPE1 is symmetric that is,an inverse of the object property expression OPE2. Thus, if an individual x is connected by OPE1 to an individual y, then y is also connected by OPE2 to x ., and vice versa. Each such axiom can be seen as a syntactic shortcut for the following axiom:

SubPropertyOf(EquivalentProperties( OPE1 InverseOf( OPE2 ) )

SymmetricObjectProperty := 'SymmetricProperty'InverseObjectProperties := 'InverseProperties' '(' axiomAnnotations ObjectPropertyExpression ObjectPropertyExpression ')'

Consider the ontology consisting of the following axioms.

SymmetricProperty( a:friendInverseProperties( a:hasFather a:fatherOf ) If x isHaving a friend of y, they yfather is a friendthe opposite of x. PropertyAssertion( a:friend a:Peter a:Brian ) Brian isbeing a friendfather of Peter. Since a:friend is symmetric, a:Peter must be connected by a:friend to a:Brian ; that is, this ontology entails the assertionsomeone.
PropertyAssertion( a:friend a:Briana:hasFather a:Stewie a:Peter ) . 9.2.12 Asymmetric Object Properties An object property asymmetry axiom AsymmetricProperty( OPE ) states that the object property expression OPE is asymmetric that is, if an individual xPeter is connected by OPE to an individual y , then y cannot be connected by OPE to x . AsymmetricObjectProperty := 'AsymmetricProperty' '(' axiomAnnotations ObjectPropertyExpression ')' Consider the ontology consisting ofthe following axioms. AsymmetricProperty( a:parentOf ) If x is a parent of y, they y is not a parentfather of x.Stewie.
PropertyAssertion( a:parentOfa:fatherOf a:Peter a:Stewiea:Chris ) Peter is a parentthe father of Stewie. IfChris.

This ontology were extended withentails that a:Peter is connected by a:fatherOf with a:Stewie that is, the ontology entails the assertion PropertyAssertion( a:parentOf a:Stewiea:fatherOf a:Peter a:Stewie ) , the asymmetry axiom would be invalidated and it also entails that a:Chris is connected by a:hasFather with a:Peter that is, the ontology would become inconsistent. 9.2.13 Transitiveentails the assertion PropertyAssertion( a:hasFather a:Chris a:Peter ).

9.2.7 Functional Object Properties

An object property transitivityfunctionality axiom TransitiveProperty(FunctionalProperty( OPE ) states that the object property expression OPE is transitivefunctional that is, if anfor each individual x is connected by OPE to an, there can be at most one distinct individual y such that is connected by OPE to an individual z , thenx is alsoconnected by OPE to zy. Each such axiom can be seen as a syntactic shortcut for the following axiom:

SubPropertyOf( PropertyChain( OPESubClassOf( owl:Thing MaxCardinality( 1 OPE ) OPE)

TransitiveObjectProperty := 'TransitiveProperty'FunctionalObjectProperty := 'FunctionalProperty' '(' axiomAnnotations ObjectPropertyExpression ')'

Consider the ontology consisting of the following axioms.

TransitiveProperty( a:ancestorOfFunctionalProperty( a:hasFather ) If x is an ancestor of y and y is an ancestor of z, then x is an ancestor of z.Each object can have at most one father.
PropertyAssertion( a:ancestorOf a:Carter a:Loisa:hasFather a:Stewie a:Peter ) CarterPeter is an ancestorthe father of Lois.Stewie.
PropertyAssertion( a:ancestorOf a:Lois a:Mega:hasFather a:Stewie a:Peter_Griffin ) LoisPeter Griffin is an ancestorthe father of Meg. Since a:ancestorOf is transitive, a:Carter must be connectedStewie.

By a:ancestorOfthe first axiom, a:hasFather can point from a:Stewie to a:Meg ;at most one distinct individual, so a:Peter and a:Peter_Griffin must be equal; that is, this ontology entails the assertion PropertyAssertion( a:ancestorOf a:Carter a:MegSameIndividual( a:Peter a:Peter_Griffin ).

9.3 Data Property Axioms OWL 2 also provides for dataOne might expect the previous ontology to be inconsistent, since the a:hasFather property axioms. Their structure is similarpoints to two different values for a:Stewie. OWL 2, however, does not make the unique name assumption, so a:Peter and a:Peter_Griffin are not necessarily distinct individuals. If the ontology were extended with the axiom DifferentIndividuals( a:Peter a:Peter_Griffin ), then it would indeed become inconsistent.

9.2.8 Inverse-Functional Object Properties

An object property axioms, as shown in Figure 16. The SubDataPropertyOfinverse functionality axiom allows one to stateInverseFunctionalProperty( OPE ) states that the extension of one dataobject property expression OPE is included in the extension of another data property expression. The EquivalentDataProperties allows one to stateinverse-functional that several data property expressions have the same extension. The DisjointDataProperties axiom allowsis, for each individual x, there can be at most one to stateindividual y such that the extensions of several data property expressions are disjointy is connected by OPE with x. Each other that is, they do not share individualliteral pairs. The DataPropertyDomainsuch axiom can be used to restrict individuals connected byseen as a property expression to be instances ofsyntactic shortcut for the specified class; similarly,following axiom:

SubClassOf( owl:Thing MaxCardinality( 1 InverseOf( OPE ) ) )

InverseFunctionalObjectProperty := 'InverseFunctionalProperty' '(' axiomAnnotations ObjectPropertyExpression ')'

Consider the DataPropertyRange axiomontology consisting of the following axioms.

InverseFunctionalProperty( a:fatherOf ) Each object can be used to restricthave at most one father.
PropertyAssertion( a:fatherOf a:Peter a:Stewie ) Peter is the literals pointed to by a property expression to be infather of Stewie.
PropertyAssertion( a:fatherOf a:Peter_Griffin a:Stewie ) Peter Griffin is the specified data range. Finally,father of Stewie.

By the FunctionalDataProperty axiom allowsfirst axiom, at most one distinct individual can point by a:fatherOf to state that a data property expression is functionala:Stewie, so a:Peter and a:Peter_Griffin must be equal; that is, that each individual can have at mostthis ontology entails the assertion SameIndividual( a:Peter a:Peter_Griffin ).

One outgoing connection ofmight expect the specified data property expression. Figure 16. Data Property Axioms of OWL 2 Noteprevious ontology to be inconsistent, since there are two individuals that a:Stewie is connected to by a:fatherOf. OWL 2, however, does not make the arity ofunique name assumption, so a:Peter and a:Peter_Griffin are not necessarily distinct individuals. If the ontology were extended with the data range used in a DataPropertyRangeaxiom MUST be one. DataPropertyAxiom := SubDataPropertyOf | EquivalentDataProperties | DisjointDataProperties | DataPropertyDomain | DataPropertyRange | FunctionalDataProperty 9.3.1 Data Subproperties A data subpropertyDifferentIndividuals( a:Peter a:Peter_Griffin ), then it would indeed become inconsistent.

9.2.9 Reflexive Object Properties

An object property reflexivity axiom SubPropertyOf( DPE 1 DPE 2ReflexiveProperty( OPE ) states that the dataobject property expression DPE 1OPE is a subproperty of the data property expression DPE 2reflexive that is, if aneach individual x is connected by OPE 1 to a literal y , then xis connected by OPE 2to y as well. SubDataPropertyOf := 'SubPropertyOf'itself.

ReflexiveObjectProperty := 'ReflexiveProperty' '(' axiomAnnotations subDataPropertyExpression superDataPropertyExpressionObjectPropertyExpression ')'

subDataPropertyExpression := DataPropertyExpression superDataPropertyExpression := DataPropertyExpressionConsider the ontology consisting of the following axioms.

SubPropertyOf( a:hasLastName a:hasNameReflexiveProperty( a:knows ) Having a last name is a kind of having a name. PropertyAssertion( a:hasLastNameEverybody knows themselves.
ClassAssertion( a:Person a:Peter "Griffin") Peter's last name is "Griffin" . Since a:hasLastNamePeter is a subproperty of a:hasName , each individual connectedperson.

By the former property to a literal is alsofirst axiom, a:Peter must be connected by the latter propertya:knows to the same literal. Therefore,itself; that is, this ontology entails the assertion PropertyAssertion( a:knows a:Peter a:Peter ).

9.2.10 Irreflexive Object Properties

An object property irreflexivity axiom IrreflexiveProperty( OPE ) states that the object property expression OPE is irreflexive that a:Peteris, no individual is connected by OPE to "Peter" through a:hasName ; that is,itself.

IrreflexiveObjectProperty := 'IrreflexiveProperty' '(' axiomAnnotations ObjectPropertyExpression ')'

Consider the ontology entailsconsisting of the following axioms.

IrreflexiveProperty( a:marriedTo ) Nobody can be married to themselves.

If this ontology were extended with the assertion PropertyAssertion( a:hasNamea:marriedTo a:Peter a:Peter "Peter") . 9.3.2 Equivalent Data, the irreflexivity axiom would be contradicted and the ontology would become inconsistent.

9.2.11 Symmetric Object Properties

An equivalent data propertiesobject property symmetry axiom EquivalentProperties( DPE 1 ... DPE nSymmetricProperty( OPE ) states that allthe dataobject property expressions DPE i , 1 i n, are semantically equivalentexpression OPE is symmetric that is, if an individual x is connected by OPE to each other. This axiom allows onean individual y, then y is also connected by OPE to use each DPE i as a synonym forx. Each DPE j that is, in any expression in the ontology containingsuch an axiom, DPE i can be replaced with DPE j without affecting the meaning of the ontology. Theaxiom EquivalentProperties( DPE 1 DPE 2 )can be seen as a syntactic shortcut for the following axiom:

SubPropertyOf( DPE 1 DPE 2OPE InverseOf( OPE ) SubPropertyOf( DPE 2 DPE 1)

EquivalentDataProperties := 'EquivalentProperties'SymmetricObjectProperty := 'SymmetricProperty' '(' axiomAnnotations DataPropertyExpression DataPropertyExpression { DataPropertyExpression }ObjectPropertyExpression ')'

Consider the ontology consisting of the following axioms. EquivalentProperties( a:hasName a:seLlama ) a:hasName and a:seLlama (in Spanish) are synonyms. PropertyAssertion( a:hasName a:Meg "Meg Griffin" ) Meg's name is "Meg Griffin" . PropertyAssertion( a:seLlama a:Meg "Megan Griffin" ) Meg's name is "Megan Griffin" . Since a:hasName and a:seLlama are equivalent properties, this ontology entails that a:Meg is connected by a:seLlama with "Meg Griffin" that is, the ontology entailsconsisting of the assertion PropertyAssertion( a:seLlama a:Meg "Meg Griffin"following axioms.

SymmetricProperty( a:friend ) If x is a friend of y, they y is a friend of x.
PropertyAssertion( a:friend a:Peter a:Brian ) and that a:MegBrian is alsoa friend of Peter.

Since a:friend is symmetric, a:Peter must be connected by a:hasName with "Megan Griffin"a:friend to a:Brian; that is, thethis ontology entails the assertion PropertyAssertion( a:hasName a:Meg "Megan Griffin"a:friend a:Brian a:Peter ).

9.3.3 Disjoint Data Properties A disjoint data9.2.12 Asymmetric Object Properties

An object property asymmetry axiom DisjointProperties( DPE 1 ... DPE nAsymmetricProperty( OPE ) states that all ofthe dataobject property expressions DPE i , 1 i n, are mutually disjoint with each other;expression OPE is asymmetric that is, noif an individual x can beis connected by OPE to a literalan individual y, then y cannot be connected by both DPE i and DPE j for i j. DisjointDataProperties := 'DisjointProperties'OPE to x.

AsymmetricObjectProperty := 'AsymmetricProperty' '(' axiomAnnotations DataPropertyExpression DataPropertyExpression { DataPropertyExpression }ObjectPropertyExpression ')'

Consider the ontology consisting of the following axioms.

DisjointProperties( a:hasName a:hasAddress ) Someone's name must be different from his address. PropertyAssertion( a:hasName a:Peter "Peter Griffin"AsymmetricProperty( a:parentOf ) Peter's nameIf x is "Peter Griffin" .a parent of y, they y is not a parent of x.
PropertyAssertion( a:hasAddressa:parentOf a:Peter "Quahog, Rhode Island"a:Stewie ) Peter's addressPeter is "Quahog, Rhode Island" . Ina parent of Stewie.

If this ontology, the disjointness axiom is satisfied. If, however, oneontology were to add anextended with the assertion PropertyAssertion( a:hasAddressa:parentOf a:Stewie a:Peter "Peter Griffin"), the disjointnessasymmetry axiom would be invalidated and the ontology would become inconsistent.

9.3.4 Data Property Domain A data9.2.13 Transitive Object Properties

An object property domaintransitivity axiom PropertyDomain( DPE CETransitiveProperty( OPE ) states that the domain of the data property expression DPE is the classobject property expression CEOPE is transitive that is, if an individual x is connected by DPE with some literal,OPE to an individual y that is connected by OPE to an individual z, then x is an instance of CEalso connected by OPE to z. Each such axiom can be seen as a syntactic shortcut for the following axiom:

SubClassOf( SomeValuesFrom( DPE rdfs:LiteralSubPropertyOf( PropertyChain( OPE OPE ) CEOPE )

DataPropertyDomain := 'PropertyDomain'TransitiveObjectProperty := 'TransitiveProperty' '(' axiomAnnotations DataPropertyExpression ClassExpressionObjectPropertyExpression ')'

Consider the ontology consisting of the following axioms.

PropertyDomain( a:hasName a:PersonTransitiveProperty( a:ancestorOf ) Only people can have names.If x is an ancestor of y and y is an ancestor of z, then x is an ancestor of z.
PropertyAssertion( a:hasName a:Peter "Peter Griffin"a:ancestorOf a:Carter a:Lois ) Peter's nameCarter is "Peter Griffin" . By the first axiom, each individual that has an outgoing a:hasName connection must bean instanceancestor of a:Person . Therefore, a:Peter can be classified asLois.
PropertyAssertion( a:ancestorOf a:Lois a:Meg ) Lois is an instanceancestor of a:PersonMeg.

Since a:ancestorOf is transitive, a:Carter must be connected by a:ancestorOf to a:Meg; that is, this ontology entails the assertion ClassAssertion( a:Person a:PeterPropertyAssertion( a:ancestorOf a:Carter a:Meg ).

Domain9.3 Data Property Axioms

inOWL 2 have a standard first-order semantics thatalso provides for data property axioms. Their structure is somewhat different fromsimilar to object property axioms, as shown in Figure 16. The semanticsSubDataPropertyOf axiom allows one to state that the extension of such axiomsone data property expression is included in databases and object-oriented systems, where such axiomsthe extension of another data property expression. The EquivalentDataProperties allows one to state that several data property expressions have the same extension. The DisjointDataProperties axiom allows one to state that the extensions of several data property expressions are interpreted as checks. Thus,disjoint with each other that is, they do not share individual–literal pairs. The domainDataPropertyDomain axiom from the example ontology would in such systems be interpreted as a constraint saying that a:hasNamecan point only frombe used to restrict individuals that are knownconnected by a property expression to be instances of a:Person ; furthermore, sincethe example ontology does not explicitly state that a:Peter is an instance of a:Person , one might expectspecified class; similarly, the domain constraint toDataPropertyRange axiom can be invalidated. This, however, is notused to restrict the case in OWL 2: as shownliterals pointed to by a property expression to be in the previous paragraph,specified unary data range. Finally, the missing typeFunctionalDataProperty axiom allows one to state that a data property expression is inferred fromfunctional that is, that each individual can have at most one outgoing connection of the domain constraint. 9.3.5specified data property Range Aexpression.

Data Property Axioms of OWL 2
Figure 16. Data Property rangeAxioms of OWL 2

DataPropertyAxiom :=
    SubDataPropertyOf | EquivalentDataProperties | DisjointDataProperties |
    DataPropertyDomain | DataPropertyRange | FunctionalDataProperty

9.3.1 Data Subproperties

A data subproperty axiom PropertyRange(SubPropertyOf( DPE DR1 DPE2 ) states that the range of thedata property expression DPE1 is a subproperty of the data range DRproperty expression DPE2 that is, if somean individual x is connected by DPE withOPE1 to a literal xy, then x is in DR . Each such axiom can be seenconnected by OPE2 to y as a syntactic shortcut for the following axiom: SubClassOf( owl:Thing AllValuesFrom( DPE DR ) ) DataPropertyRange := 'PropertyRange'well.

SubDataPropertyOf := 'SubPropertyOf' '(' axiomAnnotations DataPropertyExpression DataRangesubDataPropertyExpression superDataPropertyExpression ')'
subDataPropertyExpression := DataPropertyExpression
superDataPropertyExpression := DataPropertyExpression

Consider the ontology consisting of the following axioms.

PropertyRange(SubPropertyOf( a:hasLastName a:hasName xsd:string) The range of the a:hasName propertyHaving a last name is xsd:string .a kind of having a name.
PropertyAssertion( a:hasNamea:hasLastName a:Peter "Peter Griffin""Griffin" ) Peter's last name is "Peter Griffin""Griffin".

Since a:hasLastName is a subproperty of a:hasName, each individual connected by the first axiom, eachformer property to a literal that has an incoming a:hasName link must be in xsd:string . Inis also connected by the example ontology,latter property to the same literal. Therefore, this axiomontology entails that a:Peter is satisfied. If, however,connected to "Peter" through a:hasName; that is, the ontology were extended with anentails the assertion PropertyAssertion( a:hasName a:Peter "42"^^ xsd:integer"Peter" ) , the range axiom would imply that the literal "42"^^ xsd:integer is in xsd:string , which is a contradiction; therefore, the ontology would become inconsistent. 9.3.6 Functional.

9.3.2 Equivalent Data Properties

AAn equivalent data property functionalityproperties axiom FunctionalProperty(EquivalentProperties( DPE1 ... DPEn ) states that all the data property expressionexpressions DPE is functional that is, for each individual xi, there can be at most1 i n, are semantically equivalent to each other. This axiom allows one distinct literal y such that x is connected byto use each DPE with y .i as a synonym for each DPEj that is, in any expression in the ontology containing such an axiom, DPEi can be replaced with DPEj without affecting the meaning of the ontology. The axiom EquivalentProperties( DPE1 DPE2 ) can be seen as a syntactic shortcut for the following axiom:

SubClassOf( owl:Thing MaxCardinality(SubPropertyOf( DPE1 DPE2 )
SubPropertyOf( DPE2 DPE1 )

FunctionalDataProperty := 'FunctionalProperty'EquivalentDataProperties := 'EquivalentProperties' '(' axiomAnnotations DataPropertyExpression DataPropertyExpression { DataPropertyExpression } ')'

Consider the ontology consisting of the following axioms.

FunctionalProperty( a:hasAgeEquivalentProperties( a:hasName a:seLlama ) Each object can have at most one age.a:hasName and a:seLlama (in Spanish) are synonyms.
PropertyAssertion( a:hasAgea:hasName a:Meg "Meg Griffin" ) Meg's name is "Meg Griffin".
PropertyAssertion( a:seLlama a:Meg "17"^^ xsd:integer"Megan Griffin" ) MegMeg's name is seventeen years old. By the first axiom, a:hasAge can point from a:Meg to at most one distinct literal. In this example ontology,"Megan Griffin".

Since a:hasName and a:seLlama are equivalent properties, this axiomontology entails that a:Meg is satisfied. If, however,connected by a:seLlama with "Meg Griffin" that is, the ontology were extended withentails the assertion PropertyAssertion( a:hasAgea:seLlama a:Meg "15"^^ xsd:integer"Meg Griffin" ) , the semantics of functionality axioms would imply and that "15"^^ xsd:integer is equal to "17"^^ xsd:integer , whicha:Meg is a contradiction; therefore,also connected by a:hasName with "Megan Griffin" that is, the ontology would become inconsistent. 9.4 Keysentails the assertion PropertyAssertion( a:hasName a:Meg "Megan Griffin" ).

9.3.3 Disjoint Data Properties

A keydisjoint data properties axiom HasKey( CE PEDisjointProperties( DPE1 ... PEDPEn ) states that each (named) instanceall of the class expression CE is uniquely identified by the (data or object)data property expressions PEDPEi, 1 i n, are pairwise disjoint; that is, no two distinct (named) instances of CEindividual x can coincide on the values of all property expressions PE i . A key axiom of the form HasKey( owl:Thing OPE ) is similar to the axiom InverseFunctionalProperty( OPE ) ; the main difference is that the first axiom is applicable only to individuals that are explicitly named in an ontology, while the second axiom is also applicablebe connected to individuals whose existence is implieda literal y by existential quantification. The structure of such axiom is shown in Figure 17. Figure 17. Key Axioms in OWL 2 HasKey := 'HasKey'both DPEi and DPEj for i j.

DisjointDataProperties := 'DisjointProperties' '(' axiomAnnotations ClassExpression ObjectPropertyExpression |DataPropertyExpression DataPropertyExpression { ObjectPropertyExpression |DataPropertyExpression } ')'

Consider the ontology consisting of the following axioms.

HasKey( a:Person a:hasSSNDisjointProperties( a:hasName a:hasAddress ) Each person is uniquely identified by their social security number.Someone's name must be different from his address.
PropertyAssertion( a:hasSSNa:hasName a:Peter "123-45-6789""Peter Griffin" ) Peter's social security numbername is "123-45-6789""Peter Griffin".
ClassAssertion( a:Person a:Peter ) Peter is a person.PropertyAssertion( a:hasSSN a:Peter_Griffin "123-45-6789"a:hasAddress a:Peter "Quahog, Rhode Island" ) Peter Griffin's social security numberPeter's address is "123-45-6789""Quahog, Rhode Island".

ClassAssertion( a:Person a:Peter_Griffin ) Peter GriffinIn this ontology, the disjointness axiom is a person.satisfied. If, however, one were to add an assertion PropertyAssertion( a:hasAddress a:Peter "Peter Griffin" ), the firstdisjointness axiom makes a:hasSSNwould be invalidated and the key for individuals inontology would become inconsistent.

9.3.4 Data Property Domain

A data property domain axiom PropertyDomain( DPE CE ) states that the domain of the data property expression DPE is the class a:Person ; thus,expression CE that is, if an individual x is connected by DPE with some literal, then x is an instance of a:Person hasCE. Each such axiom can be seen as a valuesyntactic shortcut for a:hasSSN , then this value must be unique. Sincethe valuesfollowing axiom:

SubClassOf( SomeValuesFrom( DPE rdfs:Literal) CE )

DataPropertyDomain := 'PropertyDomain' '(' axiomAnnotations DataPropertyExpression ClassExpression ')'

Consider the ontology consisting of a:hasSSN arethe same forfollowing axioms.

PropertyDomain( a:hasName a:Person ) Only people can have names.
PropertyAssertion( a:hasName a:Peter and a:Peter_Griffin , these two individuals"Peter Griffin" ) Peter's name is "Peter Griffin".

By the first axiom, each individual that has an outgoing a:hasName connection must be equalan instance of a:Person. Therefore, a:Peter can be classified as an instance of a:Person; that is, this ontology entails the assertion SameIndividual(ClassAssertion( a:Person a:Peter a:Peter_Griffin).

One might intuitively expect the previous ontology to be inconsistent, since the a:hasSSN has the same value for two individuals a:Peter and a:Peter_Griffin . However,Domain axioms in OWL 2 does nothave a standard first-order semantics that is somewhat different from the unique name assumption, so a:Petersemantics of such axioms in databases and a:Peter_Griffinobject-oriented systems, where such axioms are not necessarily distinct individuals. If the ontology were extended withinterpreted as checks. Thus, the domain axiom DifferentIndividuals( a:Peter a:Peter_Griffin ) , then it would indeed become inconsistent.from the semantics of key axioms is specificexample ontology would in such systems be interpreted as a constraint saying that these axioms applya:hasName can point only tofrom individuals explicitly introduced inthat are known to be instances of a:Person; furthermore, since the example ontology by name, anddoes not explicitly state that a:Peter is an instance of a:Person, one might expect the domain constraint to unnamed individuals (i.e.,be invalidated. This, however, is not the individuals whose existencecase in OWL 2: as shown in the previous paragraph, the missing type is implied by existential quantification). This makes key axioms equivalent toinferred from the domain constraint.

9.3.5 Data Property Range

A variantdata property range axiom PropertyRange( DPE DR ) states that the range of DL-safe rules [ DL-Safe ]. Thus, key axioms will typically not affect class-based inferences such asthe computationdata property expression DPE is the data range DR that is, if some individual is connected by DPE with a literal x, then x is in DR. The arity of the subsumption hierarchy, but they will playDR MUST be one. Each such axiom can be seen as a role in answering queries about individuals. This choice has been made in order to keepsyntactic shortcut for the language decidable.following axiom:

SubClassOf( owl:Thing AllValuesFrom( DPE DR ) )

DataPropertyRange := 'PropertyRange' '(' axiomAnnotations DataPropertyExpression DataRange ')'

Consider the ontology consisting of the following axioms.

HasKey( a:Person a:hasSSNPropertyRange( a:hasName xsd:string ) Each personThe range of the a:hasName property is uniquely identified by their social security number.xsd:string.
PropertyAssertion( a:hasSSNa:hasName a:Peter "123-45-6789""Peter Griffin" ) Peter's social security number "123-45-6789" . ClassAssertion( a:Person a:Peter ) Peter is a person. ClassAssertion( SomeValuesFrom( a:marriedTo IntersectionOf( a:Man HasValue( a:hasSSN "123-45-6789" ) ) ) a:Lois ) Lois is married to some man whose social security numbername is "123-45-6789""Peter Griffin".

SubClassOf( a:Man a:Person ) Each man is a person.By the fourth axiom implies existence of some individual xfirst axiom, each literal that ishas an instance of a:Man and whose value forincoming a:hasName link must be in xsd:string. In the a:hasSSN data propertyexample ontology, this axiom is "123-45-6789" ; bysatisfied. If, however, the fifth axiom, x isontology were extended with an instance of a:Person as well. Furthermore, the second andassertion PropertyAssertion( a:hasName a:Peter "42"^^xsd:integer ), the thirdrange axiom say that a:Peter is an instance of a:Person andwould imply that the value of a:hasSSN for a:Peterliteral "42"^^xsd:integer is "123-45-6789" . Finally,in xsd:string, which is a contradiction; therefore, the firstontology would become inconsistent.

9.3.6 Functional Data Properties

A data property functionality axiom saysFunctionalProperty( DPE ) states that a:hasSSN is a keythe data property expression DPE is functional that is, for instances of a:Person . Thus,each individual x, there can be at most one might intuitively expectdistinct literal y such that x tois connected by DPE with y. Each such axiom can be equal to a:Peter , andseen as a syntactic shortcut for the ontology to entail the assertion ClassAssertion( a:Man a:Peterfollowing axiom:

SubClassOf( owl:Thing MaxCardinality( 1 DPE ) . The inferences in)

FunctionalDataProperty := 'FunctionalProperty' '(' axiomAnnotations DataPropertyExpression ')'

Consider the previous paragraph, however, cannot be drawn becauseontology consisting of the DL-safe semantics of key axioms: xfollowing axioms.

FunctionalProperty( a:hasAge ) Each object can have at most one age.
PropertyAssertion( a:hasAge a:Meg "17"^^xsd:integer ) Meg is an individual that has not been explicitly named in the ontology; therefore,seventeen years old.

By the semantics of key axioms does not applyfirst axiom, a:hasAge can point from a:Meg to x . Therefore,at most one distinct literal. In this OWL 2example ontology, this axiom is satisfied. If, however, the ontology does not entailwere extended with the assertion ClassAssertion( a:Man a:PeterPropertyAssertion( a:hasAge a:Meg "15"^^xsd:integer ) . 9.5 Assertions OWL 2 supports a rich set, the semantics of functionality axioms for stating assertions axioms about individualswould imply that are often also called facts . For clarity, different types of assertions are shown in three separate figures, Figure 18, 19, and 20. The SameIndividual assertion allows one"15"^^xsd:integer is equal to state"17"^^xsd:integer, which is a contradiction; therefore, the ontology would become inconsistent.

9.4 Keys

A key axiom HasKey( CE PE1 ... PEn ) states that several individuals are all equal toeach other, while(named) instance of the DifferentIndividuals assertion allows forclass expression CE is uniquely identified by the opposite(data or object) property expressions PEi that is, to state that several individuals are all different from each other.no two distinct (named) instances of CE can coincide on the ClassAssertion axiom allows one to state that an individual is an instancevalues of all property expressions PEi. A particular class. Figure 18. Class and Individual (In)Equality Assertions The ObjectPropertyAssertionkey axiom allows oneof the form HasKey( owl:Thing OPE ) is similar to statethe axiom InverseFunctionalProperty( OPE ); the main difference is that an individualthe first axiom is connected by an object property expressionapplicable only to individuals that are explicitly named in an individual,ontology, while NegativeObjectPropertyAssertion allows forthe opposite that is,second axiom is also applicable to state that an individualindividuals whose existence is not connectedimplied by an object property expression to an individual.existential quantification. The structure of such axiom is shown in Figure 19. Object Property Assertions17.

Key Axioms in OWL 2
Figure 17. Key Axioms in OWL 2

HasKey := 'HasKey' '(' axiomAnnotations ClassExpression ObjectPropertyExpression | DataPropertyExpression { ObjectPropertyExpression | DataPropertyExpression } ')'

Consider the ontology consisting of the following axioms.

HasKey( a:Person a:hasSSN ) Each person is uniquely identified by their social security number.
PropertyAssertion( a:hasSSN a:Peter "123-45-6789" ) Peter's social security number is "123-45-6789".
ClassAssertion( a:Person a:Peter ) Peter is a person.
PropertyAssertion( a:hasSSN a:Peter_Griffin "123-45-6789" ) Peter Griffin's social security number is "123-45-6789".
ClassAssertion( a:Person a:Peter_Griffin ) Peter Griffin is a person.

The DataPropertyAssertionfirst axiom allows one to state thatmakes a:hasSSN the key for individuals in the class a:Person; thus, if an individual is connected byinstance of a:Person has a data property expression to literal, while NegativeDataPropertyAssertion allowsvalue for a:hasSSN, then this value must be unique. Since the oppositevalues of a:hasSSN are the same for a:Peter and a:Peter_Griffin, these two individuals must be equal that is, to state that an individual is not connected by a data property expression to a literal. Figure 20. Data Property Assertionsthis ontology entails the assertion := SameIndividual | DifferentIndividuals | ClassAssertion | ObjectPropertyAssertion | NegativeObjectPropertyAssertion | DataPropertyAssertion | NegativeDataPropertyAssertion sourceIndividual := Individual targetIndividual := Individual targetValue := Literal 9.5.1 Individual Equality An individual equality axiomSameIndividual( a 1 ... a na:Peter a:Peter_Griffin ) states that all of.

One might expect the previous ontology to be inconsistent, since the a:hasSSN has the same value for two individuals a i , 1 i n,a:Peter and a:Peter_Griffin. However, OWL 2 does not make the unique name assumption, so a:Peter and a:Peter_Griffin are equalnot necessarily distinct individuals. If the ontology were extended with the axiom DifferentIndividuals( a:Peter a:Peter_Griffin ), then it would indeed become inconsistent.

The semantics of key axioms is specific in that these axioms apply only to each other.individuals explicitly introduced in the ontology by name, and not to unnamed individuals (i.e., the individuals whose existence is implied by existential quantification). This axiom allows onemakes key axioms equivalent to use eacha ivariant of DL-safe rules [DL-Safe]. Thus, key axioms will typically not affect class-based inferences such as the computation of the subsumption hierarchy, but they will play a synonym for each a j that is,role in any expressionanswering queries about individuals. This choice has been made in order to keep the ontology containing such an axiom, a i can be replaced with a j without affecting the meaning of the ontology. SameIndividual := 'SameIndividual' '(' axiomAnnotations Individual Individual { Individual } ')'language decidable.

Consider the ontology consisting of the following axioms.

SameIndividual( a:Meg a:Megan ) Meg and Megan are the same objects. PropertyAssertion( a:hasBrother a:Meg a:StewieHasKey( a:Person a:hasSSN ) Meg has a brother Stewie. Since a:Meg and a:Megan are equal, one individual can always be replaced with the other one. Therefore, this ontology entails that a:MeganEach person is connecteduniquely identified by a:hasBrother with a:Stewie that is, the ontology entails the assertiontheir social security number.
PropertyAssertion( a:hasBrother a:Megan a:Stewiea:hasSSN a:Peter "123-45-6789" ) Peter's social security number "123-45-6789".
9.5.2 Individual Inequality An individual inequality axiom DifferentIndividuals( a 1 ... a nClassAssertion( a:Person a:Peter ) states that all of the individuals a i , 1 i n, are mutually different from each other; that is, no individuals a i andPeter is a j with i j can be derived to be equal. This axiom can be usedperson.
ClassAssertion(
    SomeValuesFrom(
       a:marriedTo
       IntersectionOf( a:Man HasValue( a:hasSSN "123-45-6789" ) )
    )
    a:Lois
)
Lois is married to axiomatize the unique name assumption the assumption that all different individual names denote different individuals. DifferentIndividuals := 'DifferentIndividuals' '(' axiomAnnotations Individual Individual { Individual } ')' Considersome man whose social security number is "123-45-6789".
SubClassOf( a:Man a:Person ) Each man is a person.

The ontology consistingfourth axiom implies existence of some individual x that is an instance of a:Man and whose value for the following axioms. PropertyAssertion( a:fatherOf a:Peter a:Meg ) Petera:hasSSN data property is "123-45-6789"; by the fatherfifth axiom, x is an instance of Meg. PropertyAssertion( a:fatherOfa:Person as well. Furthermore, the second and the third axiom say that a:Peter a:Chris ) Peteris an instance of a:Person and that the fathervalue of Chris. PropertyAssertion( a:fatherOfa:hasSSN for a:Peter a:Stewie ) Peteris "123-45-6789". Finally, the fatherfirst axiom says that a:hasSSN is a key property for instances of Stewie. DifferentIndividuals(a:Person. Thus, one might expect x to be equal to a:Peter a:Meg a:Chris a:Stewie ) Peter, Meg, Chris,, and Stewie are all different from each other.for the last axiom in this exampleontology axiomatizesto entail the unique name assumption (but only forassertion ClassAssertion( a:Man a:Peter ).

The three namesinferences in the axiom). Ifprevious paragraph, however, cannot be drawn because of the ontology were extended withDL-safe semantics of key axioms: x is an axiom FunctionalProperty( a:fatherOf ) ,individual that has not been explicitly named in the ontology; therefore, the semantics of key axioms does not apply to x. Therefore, this axiom would implyOWL 2 ontology does not entail the assertion ClassAssertion( a:Man a:Peter ).

9.5 Assertions

OWL 2 supports a rich set of axioms for stating assertions axioms about individuals that a:Meg , a:Chris ,are often also called facts. For clarity, different types of assertions are shown in three separate figures, Figure 18, 19, and a:Stewie20. The SameIndividual assertion allows one to state that several individuals are all equal, which would invalidate the unique name assumption and would makeequal to each other, while the ontology inconsistent. 9.5.3 Class Assertions A classDifferentIndividuals assertion ClassAssertion( CE a ) statesallows for the opposite that is, to state that several individuals are all different from each other. The ClassAssertion axiom allows one to state that an individual ais an instance of thea particular class.

Class and Individual (In)Equality Assertions in OWL 2
Figure 18. Class expression CE . ClassAssertion := 'ClassAssertion' '(' axiomAnnotations ClassExpressionand Individual ')' Consider the ontology consisting of the following axioms. ClassAssertion( a:Dog a:Brian ) Brian is a dog. SubClassOf( a:Dog a:Mammal ) Each dog is a mammal.(In)Equality Assertions in OWL 2

The firstObjectPropertyAssertion axiom statesallows one to state that a:Brian isan instance of the class a:Dog .individual is connected by an object property expression to an individual, while NegativeObjectPropertyAssertion allows for the second axiom, each instance of a:Dogopposite that is, to state that an individual is not connected by an instance of a:Mammal . Therefore, this ontology entailsobject property expression to an individual.

Object Property Assertions in OWL 2
Figure 19. Object Property Assertions in OWL 2

The DataPropertyAssertion axiom allows one to state that a:Brian isan instance of a:Mammalindividual is connected by a data property expression to literal, while NegativeDataPropertyAssertion allows for the opposite that is, the ontology entails the assertion ClassAssertion( a:Mammal a:Brian ) . 9.5.4 Positive Objectto state that an individual is not connected by a data property Assertionsexpression to a positive objectliteral.

Data Property Assertions in OWL 2
Figure 20. Data Property Assertions in OWL 2

Assertion PropertyAssertion( OPE :=
    SameIndividual | DifferentIndividuals | ClassAssertion |
    ObjectPropertyAssertion | NegativeObjectPropertyAssertion |
    DataPropertyAssertion | NegativeDataPropertyAssertion

sourceIndividual := Individual
targetIndividual := Individual
targetValue := Literal

9.5.1 Individual Equality

An individual equality axiom SameIndividual( a1 ... a 2n ) states that all of the individualindividuals ai, 1 is connected by the object property expression OPE i n, are equal to each other. This axiom allows one to use each ai as a synonym for each aj that is, in any expression in the individualontology containing such an axiom, a 2 . ObjectPropertyAssertion := 'PropertyAssertion'i can be replaced with aj without affecting the meaning of the ontology.

SameIndividual := 'SameIndividual' '(' axiomAnnotations ObjectPropertyExpression sourceIndividual targetIndividualIndividual Individual { Individual } ')'

Consider the ontology consisting of the following axioms.

PropertyAssertion( a:hasDog a:Peter a:Brian ) Brian is a dog of Peter. SubClassOf( SomeValuesFrom( a:hasDog owl:ThingSameIndividual( a:Meg a:Megan ) a:DogOwnerMeg and Megan are the same objects.
PropertyAssertion( a:hasBrother a:Meg a:Stewie ) Things havingMeg has a dogbrother Stewie.

Since a:Meg and a:Megan are dog owners. The first axiom states that a:Peter is connected by a:hasDog to a:Brian . By the second axioms, each individual connected by a:hasDog to anequal, one individual is an instance of a:DogOwner .can always be replaced with the other one. Therefore, this ontology entails that a:Petera:Megan is an instance of a:DogOwnerconnected by a:hasBrother with a:Stewie that is, the ontology entails the assertion ClassAssertion( a:DogOwner a:PeterPropertyAssertion( a:hasBrother a:Megan a:Stewie ).

9.5.5 Negative Object Property Assertions A negative object property assertion NegativePropertyAssertion( OPE9.5.2 Individual Inequality

An individual inequality axiom DifferentIndividuals( a1 ... a 2n ) states that all of the individualindividuals ai, 1 is not connected by the object property expression OPE i n, are different from each other; that is, no individuals ai and aj with i j can be derived to be equal. This axiom can be used to axiomatize the unique name assumption the assumption that all different individual a 2 . NegativeObjectPropertyAssertion := 'NegativePropertyAssertion'names denote different individuals.

DifferentIndividuals := 'DifferentIndividuals' '(' axiomAnnotations objectPropertyExpression sourceIndividual targetIndividualIndividual Individual { Individual } ')'

Consider the ontology consisting of the following axiom. NegativePropertyAssertion( a:hasSonaxioms.

PropertyAssertion( a:fatherOf a:Peter a:Meg ) MegPeter is not a sonthe father of Peter. IfMeg.
PropertyAssertion( a:fatherOf a:Peter a:Chris ) Peter is the father of Chris.
PropertyAssertion( a:fatherOf a:Peter a:Stewie ) Peter is the father of Stewie.
DifferentIndividuals( a:Peter a:Meg a:Chris a:Stewie ) Peter, Meg, Chris, and Stewie are all different from each other.

The last axiom in this example ontology axiomatizes the unique name assumption (but only for the three names in the axiom). If the ontology were extended with an assertion PropertyAssertion( a:hasSon a:Peter a:Megaxiom FunctionalProperty( a:fatherOf ), the negative object property assertionthis axiom would be invalidatedimply that a:Meg, a:Chris, and a:Stewie are all equal, which would invalidate the ontologyunique name assumption and would becomemake the ontology inconsistent.

9.5.6 Positive Data Property9.5.3 Class Assertions

A positive data propertyclass assertion PropertyAssertion( DPEClassAssertion( CE a lt) states that the individual a is connected byan instance of the data propertyclass expression DPE to the literal ltCE.

DataPropertyAssertion := 'PropertyAssertion'ClassAssertion := 'ClassAssertion' '(' axiomAnnotations DataPropertyExpression sourceIndividual targetValueClassExpression Individual ')'

Consider the ontology consisting of the following axioms.

PropertyAssertion( a:hasAge a:Meg "17"^^ xsd:integerClassAssertion( a:Dog a:Brian ) MegBrian is seventeen years old.a dog.
SubClassOf( SomeValuesFrom( a:hasAge DatatypeRestriction( xsd:integer xsd:minInclusive "13"^^ xsd:integer xsd:maxInclusive "19"^^ xsd:integer ) ) a:Teenagera:Dog a:Mammal ) Things older than 13 and younger than 19 (both inclusive) are teenagers.Each dog is a mammal.

The first axiom states that a:Mega:Brian is connected by a:hasAge toan instance of the literal "17"^^ xsd:integerclass a:Dog. By the second axioms,axiom, each individual connected by a:hasAge to an integer between 13 and 19instance of a:Dog is an instance of a:Teenagera:Mammal. Therefore, this ontology entails that a:Mega:Brian is an instance of a:Teenagera:Mammal that is, the ontology entails the assertion ClassAssertion( a:Teenager a:Mega:Mammal a:Brian ).

9.5.7 Negative Data9.5.4 Positive Object Property Assertions

A negative datapositive object property assertion NegativePropertyAssertion( DPEPropertyAssertion( OPE a lt1 a2 ) states that the individual a1 is notconnected by the data property expression DPE to the literal lt . NegativeDataPropertyAssertion := 'NegativePropertyAssertion' '(' axiomAnnotations DataPropertyExpression sourceIndividual targetValue ')' Consider the ontology consisting of the following axiom. NegativePropertyAssertion( a:hasAge a:Meg "5"^^ xsd:integer ) Meg is not five years old. If this ontology were extended with an assertion PropertyAssertion( a:hasAge a:Meg "5"^^ xsd:integer ) , the negative data property assertion would be invalidated and the ontology would become inconsistent. 10 Annotations OWL 2 applications often need ways to associate information with ontologies, entities, and axioms in a way that does not affect the logical meaning of the ontology. Such information often plays a central role in OWL 2 applications. Although such information is not expected to affect the formal meaning of an ontology (i.e., it is not expected to affect the set of logical consequences that one can derive from an ontology), it is expected to be accessible in the structural specification of OWL 2. To this end, OWL 2 provides for annotations on ontologies, axioms, and entities. One might want to associate human-readable labels with URIs and use them when visualizing an ontology. To this end, one might use the rdfs:label annotationobject property to associate the labels with ontology URIs. Various OWL 2 syntaxes, such asexpression OPE to the functional-style syntax, provideindividual a mechanism for embedding comments into ontology documents.2.

ObjectPropertyAssertion := 'PropertyAssertion' '(' axiomAnnotations ObjectPropertyExpression sourceIndividual targetIndividual ')'

Consider the structureontology consisting of such comments, however, is dependent onthe syntax, so representing them infollowing axioms.

PropertyAssertion( a:hasDog a:Peter a:Brian ) Brian is a dog of Peter.
SubClassOf( SomeValuesFrom( a:hasDog owl:Thing ) a:DogOwner ) Things having a dog are dog owners.

The structural specificationfirst axiom states that a:Peter is likelyconnected by a:hasDog to be difficult or even impossible; hence, such comments are simply discarded during parsing. In contrast, annotations are "first-class citizens" ina:Brian. By the structural specificationsecond axioms, each individual connected by a:hasDog to an individual is an instance of OWL 2, and their structurea:DogOwner. Therefore, this ontology entails that a:Peter is independentan instance of a:DogOwner that is, the underlying syntax. Since it is based on XML,ontology entails the OWL 2 XML Syntax [ OWLassertion ClassAssertion( a:DogOwner a:Peter ).

9.5.5 Negative Object Property Assertions

A negative object property assertion NegativePropertyAssertion( OPE a1 a2 XML Syntax ] allows the embedding of) states that the standard XML comments into ontology documents. Such comments areindividual a1 is not represented inconnected by the structural specification of OWLobject property expression OPE to the individual a2 and, consequently, they should be ignored during document parsing. 10.1 Annotations.

NegativeObjectPropertyAssertion := 'NegativePropertyAssertion' '(' axiomAnnotations objectPropertyExpression sourceIndividual targetIndividual ')'

Consider the ontology consisting of Ontologies, Axioms, and other Annotations Ontologies, axioms, and annotations themselves can be annotated using annotations shown in Figure 21. As shown inthe figure, such annotations consistfollowing axiom.

NegativePropertyAssertion( a:hasSon a:Peter a:Meg ) Meg is not a son of Peter.

If this ontology were extended with an annotationassertion PropertyAssertion( a:hasSon a:Peter a:Meg ), the negative object property and an annotation value, where latter canassertion would be anonymous individuals, URIs, and literals. Figure 21. Annotations of Ontologiesinvalidated and Axioms in OWL 2 Annotation := 'Annotation'the ontology would become inconsistent.

9.5.6 Positive Data Property Assertions

A positive data property assertion PropertyAssertion( DPE a lt ) states that the individual a is connected by the data property expression DPE to the literal lt.

DataPropertyAssertion := 'PropertyAssertion' '(' annotationAnnotations AnnotationProperty AnnotationValueaxiomAnnotations DataPropertyExpression sourceIndividual targetValue ')'

annotationAnnotations := { Annotation } AnnotationValue := AnonymousIndividual | URI | Literal 10.2 Annotation Axioms OWL 2 provides means to state several types of axioms about annotation properties, as shown in Figure 22. These axioms have no effect onConsider the Direct Semanticsontology consisting of OWL 2 [ OWL 2 Direct Semantics ],the following axioms.

PropertyAssertion( a:hasAge a:Meg "17"^^xsd:integer ) Meg is seventeen years old.
SubClassOf(
    SomeValuesFrom( a:hasAge
       DatatypeRestriction( xsd:integer
          xsd:minInclusive "13"^^xsd:integer
          xsd:maxInclusive "19"^^xsd:integer
       )
    )
    a:Teenager
)
Things older than 13 and theyyounger than 19 (both inclusive) are made axioms in order to simplifyteenagers.

The structural specification of OWL 2. OWL 2 tools can interpret these axioms metalogically; for example, OWL 2 APIs can provide primitivesfirst axiom states that implementa:Meg is connected by a:hasAge to the intended meaningliteral "17"^^xsd:integer. By the second axioms, each individual connected by a:hasAge to an integer between 13 and 19 is an instance of these axioms. Figure 22. Annotationsa:Teenager. Therefore, this ontology entails that a:Meg is an instance of URIs and Anonymous Individuals in OWL 2 AnnotationAxiom := AnnotationAssertion | SubAnnotationPropertyOf | AnnotationPropertyDomain | AnnotationPropertyRange 10.2.1 Annotationa:Teenager that is, the ontology entails the assertion An annotationClassAssertion( a:Teenager a:Meg ).

9.5.7 Negative Data Property Assertions

A negative data property assertion AnnotationAssertion( AP as atNegativePropertyAssertion( DPE a lt ) states that the annotation subject as a URI or an anonymousindividual a is annotated withnot connected by the annotationdata property AP andexpression DPE to the annotation value avliteral lt.

Such axioms have no effect on the Direct Semantics of OWL 2 [ OWL 2 Direct Semantics ]. AnnotationAssertion := 'AnnotationAssertion'NegativeDataPropertyAssertion := 'NegativePropertyAssertion' '(' axiomAnnotations AnnotationProperty AnnotationSubject AnnotationValueDataPropertyExpression sourceIndividual targetValue ')'

AnnotationSubject := URI | AnonymousIndividual The following axiom assigns a human-readable comment to the URI a:Person . AnnotationAssertion( rdfs:label a:Person "RepresentsConsider the setontology consisting of all people." ) Sincethe annotationfollowing axiom.

NegativePropertyAssertion( a:hasAge a:Meg "5"^^xsd:integer ) Meg is assigned to a URI, it applies to all entities with the given URI. Thus,not five years old.

If anthis ontology contains both a class andwere extended with an individual a:Personassertion PropertyAssertion( a:hasAge a:Meg "5"^^xsd:integer ), the above comment applies to both entities. 10.2.2 Annotation Subproperties An annotation subproperty axiom SubPropertyOf( AP 1 APnegative data property assertion would be invalidated and the ontology would become inconsistent.

10 Annotations

OWL 2 ) statesapplications often need ways to associate information with ontologies, entities, and axioms in a way that does not affect the annotation property AP 1 is a subpropertylogical meaning of the annotation property AP 2 .ontology. Such axioms have no effect on the Direct Semantics of OWL 2 [information often plays a central role in OWL 2 Direct Semantics ]. SubAnnotationPropertyOf := 'SubPropertyOf' '(' axiomAnnotations subAnnotationProperty superAnnotationProperty ')' subAnnotationProperty := AnnotationProperty superAnnotationProperty := AnnotationPropertyapplications. Although annotation subproperty axioms dosuch information does not have a formal semantics, OWL 2 tools can choose to take their intuitive semantics into account when answering questions about annotations. Consideraffect the ontology consistingformal meaning of an ontology (i.e., it does not affect the following axioms. SubPropertyOf( a:englishLabel rdfs:label ) Havingset of logical consequences that one can derive from an English labelontology), it is a kind of having a label. AnnotationAssertion( a:englishLabel a:Dog "dog" )expected to be accessible in the labelstructural specification of OWL 2. To this end, OWL 2 provides for the URI a:Dog is "dog" .annotations on ontologies, axioms, and entities.

One might want to associate human-readable labels with URIs and use them when askedvisualizing an ontology. To return the values ofthis end, one might use the rdfs:label annotation property for the URI a:Dog , an OWL 2 tool could chooseto return "dog" . If anassociate such labels with ontology URIs.

Various OWL 2 tool chooses to providesyntaxes, such as the functional-style syntax, provide a feature,mechanism for embedding comments into ontology documents. The structure of such comments is, however, dependent on the syntax, so representing them in the structural specification is likely to be difficult or even impossible; hence, such comments are simply discarded during parsing. In contrast, annotations are "first-class citizens" in the structural specification of OWL 2, and their structure is independent of the underlying syntax.

Since it is expected to cleanly separatebased on XML, the OWL 2 XML Syntax [OWL 2 XML Syntax] allows the embedding of the standard XML comments into ontology documents. Such metalogical queries fromcomments are not represented in the more common logical queries presentedstructural specification of OWL 2 and, consequently, they should be ignored during document parsing.

10.1 Annotations of Ontologies, Axioms, and other Annotations

Ontologies, axioms, and annotations themselves can be annotated using annotations shown in Figure 21. As shown in the previous sections. 10.2.3figure, such annotations consist of an annotation property Domainand an annotation property domain axiom PropertyDomain( AP U ) states thatvalue, where the domainlatter can be anonymous individuals, URIs, and literals.

Annotations of Ontologies and Axioms in OWL 2
Figure 21. Annotations of theOntologies and Axioms in OWL 2

Annotation property AP is the := 'Annotation' '(' annotationAnnotations AnnotationProperty AnnotationValue ')'
annotationAnnotations  := { Annotation }
AnnotationValue := AnonymousIndividual | URI U . Such| Literal

10.2 Annotation Axioms

OWL 2 provides means to state several types of axioms about annotation properties, as shown in Figure 22. These axioms have no effect on the Direct Semantics of OWL 2 [OWL 2 Direct Semantics ]. AnnotationPropertyDomain := 'PropertyDomain' '(' axiomAnnotations AnnotationProperty URI ')' Although annotation subproperty], and they are treated as axioms do not have a formal semantics,only in order to simplify the structural specification of OWL 2.

Annotations of URIs and Anonymous Individuals in OWL 2
Figure 22. Annotations of URIs and Anonymous Individuals in OWL 2

tools can choose to take their intuitive semantics into account. A common interpretation is to treat theseAnnotationAxiom := AnnotationAssertion | SubAnnotationPropertyOf | AnnotationPropertyDomain | AnnotationPropertyRange

10.2.1 Annotation property domain axiomsAssertion

An annotation assertion AnnotationAssertion( AP as integrity constraints. Consider the ontology consisting of the following axioms. PropertyDomain( a:dogImageURI a:Dogat ) states that the objectsannotation subject as a URI or an anonymous individual is annotated bywith the annotation property a:dogImageURI must be instances of a:DogAP and the annotation value av. ClassAssertion( a:Dog a:Brian ) Brian is a dog. AnnotationAssertion( a:dogImageURI a:Brian <http://www.example.com/images/brian.jpg> ) SpecifiesSuch axioms have no effect on the URIDirect Semantics of Brian's image. AnOWL 2 tool could use[OWL 2 Direct Semantics].

AnnotationAssertion := 'AnnotationAssertion' '(' axiomAnnotations AnnotationProperty AnnotationSubject AnnotationValue ')'
AnnotationSubject := URI | AnonymousIndividual

The firstfollowing axiom assigns a human-readable comment to check whetherthe annotation property a:dogImageURI was applied only to instances of a:DogURI a:Person.

Since a:Brian is an instance of a:Dog ,AnnotationAssertion( rdfs:label a:Person "Represents the last annotation satisfiesset of all people." )

Since the annotation property domain axiom. If an OWL 2 tool choosesis assigned to provide sucha feature,URI, it is expectedapplies to cleanly separate such metalogical queries fromall entities with the more common logical queries presented ingiven URI. Thus, if an ontology contains both a class and an individual a:Person, the previous sections. 10.2.4above comment applies to both entities.

10.2.2 Annotation Property RangeSubproperties

An annotation property rangesubproperty axiom PropertyRange(SubPropertyOf( AP U1 AP2 ) states that the range of theannotation property AP1 is a subproperty of the URI Uannotation property AP2. Such axioms have no effect on the Direct Semantics of OWL 2 [OWL 2 Direct Semantics].

AnnotationPropertyRange := 'PropertyRange'SubAnnotationPropertyOf := 'SubPropertyOf' '(' axiomAnnotations AnnotationProperty URIsubAnnotationProperty superAnnotationProperty ')'
Although annotation subproperty axioms do not have a formal semantics, OWL 2 tools can choose to take their intuitive semantics into account. A common interpretation is to treat thesesubAnnotationProperty := AnnotationProperty
superAnnotationProperty := AnnotationProperty

10.2.3 Annotation Property range axioms as integrity constraints. Consider the ontology consisting of the following axioms. PropertyRange( rdfs:label xsd:string ) TheDomain

An annotation property rdsf:label can be used only in annotations with a string value. AnnotationAssertion( rdfs:label a:Dog "dog"domain axiom PropertyDomain( AP U ) states that the label fordomain of the URI a:Dogannotation property AP is "dog"the URI U. AnSuch axioms have no effect on the Direct Semantics of OWL 2 tool could use the first[OWL 2 Direct Semantics].

AnnotationPropertyDomain := 'PropertyDomain' '(' axiomAnnotations AnnotationProperty URI ')'

10.2.4 Annotation Property Range

An annotation property range axiom to check whetherPropertyRange( AP U ) states that the valuesrange of annotations withthe rdfs:labelannotation property are of appropriate type. Since "dog"AP is a string,the second annotation satisfiesURI U. Such axioms have no effect on the annotation property range axiom. If anDirect Semantics of OWL 2 tool chooses to provide such a feature, it is expected to cleanly separate such metalogical queries from the more common logical queries presented in the previous sections.[OWL 2 Direct Semantics].

AnnotationPropertyRange := 'PropertyRange' '(' axiomAnnotations AnnotationProperty URI ')'

11 Global Restrictions on Axioms

Let Ax beThe axiom closure Ax (with anonymous individuals renamed apart as explained in Section 5.6.2) of aneach OWL 2 ontology O .MUST satisfy the global restrictions defined in this section. As explained in the literature [SROIQ], Ax MUST obey certain global restrictionsthis restriction is necessary in order to obtain a decidable language. The formal definition of these restrictionsconditions is rather technical, so it is split into two parts. Section 11.1 first introduces the notions of a property hierarchy and of simple object property expressions. These notions are then used in Section 11.2 to define the actual restrictionsconditions on the axioms in the axiom closure of an ontology.Ax.

11.1 Property Hierarchy and Simple Object Property Expressions

For an object property expression OPE, the inverse property expression INV(OPE) is defined as follows:

The set AllOPE(Ax) of all object property expressions w.r.t. Ax is the smallest set containing OP and INV(OP) for each object property OP occurring in Ax.

An object property expression OPE is composite in the set of axioms Ax if

The relation is the smallest relation on AllOPE(Ax) for which the following conditions hold (A B means that holds for A and B):

The property hierarchy relation * is the reflexive-transitive closure of .→.

An object property expression OPE is simple in Ax if, for each object property expression OPE' such that OPE' * OPE holds, OPE' is not composite.

Roughly speaking, a simple object property expression has no direct or indirect subproperties that are either transitive or are defined by means of property chains, where the notion of indirect subproperties is captured by the property hierarchy. Consider the following axioms:

SubPropertyOf( PropertyChain( a:hasFather a:hasBrother ) a:hasUncle ) The brother of someone's father is that person's uncle.
SubPropertyOf( a:hasUncle a:hasRelative ) Having an uncle is a kind of having a relative.
SubPropertyOf( a:hasBiologicalFather a:hasFather ) Having a biological father is a kind of having a father.

The object property a:hasUncle occurs in an object subproperty axiom involving a property chain, so it is not simple. Consequently, the object property a:hasRelative is not simple either, because a:hasUncle is a nonsimple subproperty of a:hasRelative. In contrast, the object property a:hasBiologicalFather is simple, and so is a:hasFather.

11.2 The Restrictions on the Axiom Closure

The axioms Ax satisfy the global restrictions of OWL 2 if the following six conditions hold:

The first two restrictions merely prohibit the usage of nonsimple properties in number restrictions and in certain axioms about object properties. The third restriction limits the usage of owl:topDataProperty. Without it, owl:topDataProperty could be used to write axioms about datatypes, which would invalidate Theorem 1 from the OWL 2 Direct Semantics [OWL 2 Direct Semantics].

The main goal of the fourth restriction is to prevent cyclic definitions involving object subproperty axioms with property chains. Consider the following ontology:

SubPropertyOf( PropertyChain( a:hasFather a:hasBrother ) a:hasUncle ) The brother of someone's father is that person's uncle.
SubPropertyOf( PropertyChain( a:hasChild a:hasUncle ) a:hasBrother ) The uncle of someone's child is that person's brother.

The first axiom defines a:hasUncle in terms of a:hasBrother, while the second axiom defines a:hasBrother in terms of a:hasUncle. These two axioms are thus cyclic: the first one depends on the second one and vice versa. Such cyclic definitions are known to lead to undecidability of the basic reasoning problems. Thus, these two axioms mentioned above cannot occur together in an axiom closure of an OWL 2; however, each axiom alone may be allowed (depending on the other axioms in the closure).

A particular kind of cyclic definitions is known not to lead to decidability problems. Consider the following ontology:

SubPropertyOf( PropertyChain( a:hasChild a:hasSibling ) a:hasChild ) The sibling of someone's child is that person's child.

The above definition is cyclic, since the object property a:hasChild occurs in both the subproperty chain and as a superproperty. Axioms of this form, however, do not violate the global restrictions of OWL 2.

The fifth and the sixth restriction ensure that each OWL 2 ontology with anonymous individuals can be transformed to an equivalent ontology without anonymous individuals. Roughly speaking, this is possible if property assertions connect anonymous individuals in a tree-like way. Consider the following ontology:

PropertyAssertion( a:hasChild a:Francis _:x ) Francis has some (unknown) child.
PropertyAssertion( a:hasChild _:x a:Meg ) This unknown child has Meg...
PropertyAssertion( a:hasChild _:x a:Chris ) ...Chris...
PropertyAssertion( a:hasChild _:x a:Stewie ) ...and Stewie as children.

The connections between individuals a:Francis, a:Meg, a:Chris, and a:Stewie can be understood as a tree that contains _:x as its internal node. Because of that, the anonymous individuals can be "rolled-up"; that is, these four assertions can be replaced by the following equivalent assertion:

ClassAssertion(
    SomeValuesFrom( a:hasChild
       IntersectionOf(
          HasValue( a:hasChild a:Meg )
          HasValue( a:hasChild a:Chris )
          HasValue( a:hasChild a:Stewie )
       )
    )
    a:Francis
)

If the anonymous individuals were allowed to be connected by properties in arbitrary ways (and, in particular, in cycles), such a transformation would clearly be impossible. This transformation, however, is necessary in order to reduce the basic inference problems in OWL 2 to the appropriate description logic reasoning problems with known computational properties [SROIQ].

12 Appendix: Internet Media Type, File Extension, and Macintosh File Type

Contact
Ivan Herman / Sandro Hawke
See also
How to Register a Media Type for a W3C Specification Internet Media Type registration, consistency of use TAG Finding 3 June 2002 (Revised 4 September 2002)

The Internet Media Type / MIME Type for the OWL functional-style Syntax is text/owl-functional.

It is recommended that OWL functional-style Syntax files have the extension .ofn (all lowercase) on all platforms.

It is recommended that OWL functional-style Syntax files stored on Macintosh HFS file systems be given a file type of TEXT.

The information that follows will be submitted to the IESG for review, approval, and registration with IANA.

Type name
text
Subtype name
owl-functional
Required parameters
None
Optional parameters
charset This parameter may be required when transfering non-ASCII data across some protocols. If present, the value of charset should be UTF-8.
Encoding considerations
The syntax of the OWL functional-style Syntax is expressed over code points in Unicode [UNICODE]. The encoding should be UTF-8 [RFC3629], but other encodings are allowed.
Security considerations
The OWL functional-style Syntax uses IRIs as term identifiers. Applications interpreting data expressed in the OWL functional-style Syntax should address the security issues of Internationalized Resource Identifiers (IRIs) [RFC3987] Section 8, as well as Uniform Resource Identifiers (URI): Generic Syntax [RFC3986] Section 7. Multiple IRIs may have the same appearance. Characters in different scripts may look similar (a Cyrillic "o" may appear similar to a Latin "o"). A character followed by combining characters may have the same visual representation as another character (LATIN SMALL LETTER E followed by COMBINING ACUTE ACCENT has the same visual representation as LATIN SMALL LETTER E WITH ACUTE). Any person or application that is writing or interpreting data in the OWL functional-style Syntax must take care to use the IRI that matches the intended semantics, and avoid IRIs that may look similar. Further information about matching of similar characters can be found in Unicode Security Considerations [UNISEC] and Internationalized Resource Identifiers (IRIs) [RFC3987] Section 8.
Interoperability considerations
There are no known interoperability issues.
Published specification
This specification.
Applications which use this media type
No widely deployed applications are known to currently use this media type. It is expected that OWL tools will use this media type in the future.
Additional information
None.
Magic number(s)
OWL functional-style Syntax documents may have the strings 'Namespace:' or 'Ontology:' (case dependent) near the beginning of the document.
File extension(s)
".ofn"
Base URI
There are no constructs in the OWL functional-style Syntax to change the Base URI.
Macintosh file type code(s)
"TEXT"
Person & email address to contact for further information
Ivan Herman <ivan@w3.org> / Sandro Hawke <sandro@w3.org>
Intended usage
COMMON
Restrictions on usage
None
Author/Change controller
The OWL functional-style Syntax is the product of the W3C OWL Working Group; W3C reserves change control over this specification.

13 Appendix: Differences from OWL 1 Abstract Syntax (Nonnormative)

OWL 2 departs in its conceptual design and in syntax from OWL 1 Abstract Syntax. This section summarizes the major differences and explains the rationale behind the changes.

13.1 Dropping the Frame-Like Syntax

OWL 1 provides a frame-like syntax that allows several aspects of a class, property or individual to be defined in a single axiom.

The following is an example of an OWL 1 frame-like axiom.

ObjectProperty( a:partOf inverseOf( a:containedIn ) inverseFunctional transitive
    Annotation( rdfs:label "Specifies that an object is a part of another object.")
)

This type of axiom may cause problems in practice. First, it bundles many different features of the given entity into a single axiom. While this may be convenient when ontologies are being manipulated by hand, it is not convenient for manipulating them programmatically. In fact, most implementations of OWL 1 break such axioms apart into several "atomic" axioms, each dealing with only a single feature of the entity. However, this may cause problems with round-tripping, as the structure of the ontology may be destroyed in the process. Second, this type of axiom is often misinterpreted as a declaration and unique "definition" of the given entity. In OWL 1, however, entities may be used without being the subject of any such axiom, and there may be many such axioms relating to the same entity. Third, OWL 1 does not provide means to annotate axioms, which has proved to be quite usefulsomething that is often needed in practice.tools and applications. These problems are addressed in OWL 2 in several ways. First, the frame-like notation has been dropped in favor of a more fine-grained structure of axioms, where each axiom describes just one feature of the given entity. Second, OWL 2 provides explicit declarations, and an explicit definition of the notion of structural consistency. Third, all axioms in OWL 2 can be annotated, and entity annotation axioms provide means for that.

The OWL 1 axiom from the previous example can be represented in OWL 2 using the following axioms.

Declaration( ObjectProperty( a:partOf ) )
AnnotationAssertion( rdfs:label a:partOf "Specifies that an object is a part of another object." )
InverseProperties( a:partOf a:containedIn )
InverseFunctionalProperty( a:partOf )
TransitiveProperty( a:partOf )

Although OWL 2 is more verbose, this is not expected to lead to problems given that most OWL ontologies are created using ontology engineering tools. Moreover, such tools are free to present the information to the user in a more intuitivedifferent (possibly frame-like) way.

13.2 Inverse Property Expressions

In OWL 1, all properties are atomic, but it is possible to assert that one object property is the inverse of another.

In OWL 1, one can state the following axiom to axiomatize a:hasPart as the inverse property of a:isPartOf.

ObjectProperty( a:hasPart inverse a:isPartOf )

In OWL 2, property expressions such as InverseOf( a:hasPart ) can be used in class expressions, which avoids the need to give a name to every inverse property. If desired, however, names can still be given to inverse properties.

The following OWL 2 axiom asserts that a:isPartOf is the inverse of a:hasPart, and is thus semantically equivalent to the OWL 1 axiom from the previous example.

EquivalentProperties( a:hasPart InverseOf( a:isPartOf ) )

Such axioms are quite common, so OWL 2 provides the following syntactic shortcut as well.

InverseProperties( a:hasPart a:isPartOf )

13.3 Anonymous Individuals

In OWL 1, anonymous individuals were introduced as individuals without names.

The following OWL 1 axiom does not specify individual's name; therefore, the introduced individual is anonymous.

Individual(
    value( a:city a:Quahog )
    value( a:state a:RI )
)

In contrast, anonymous individuals are identified using node IDs in OWL 2.

The following OWL 1 axiom introduces an anonymous individual:

PropertyAssertion( a:city _:1 a:Quahog )
PropertyAssertion( a:state _:1 a:RI )

14 Complete Grammar (Normative)

Editor's Note: The complete grammar will be reproduced here for the last callfinal version of the document..document.

15 Index

Editor's Note: The index will be created for the last callfinal version of the document.

16 References

[OWL 2 Direct Semantics]
Direct Semantics Boris Motik, Peter F. Patel-Schneider, Bernardo Cuenca Grau, eds. W3C Editor's Draft, 2126 November 2008, http://www.w3.org/2007/OWL/draft/ED-owl2-semantics-20081121/http://www.w3.org/2007/OWL/draft/ED-owl2-semantics-20081126/. Latest version available at http://www.w3.org/2007/OWL/draft/owl2-semantics/.
[OWL 2 XML Syntax]
XML Serialization Boris Motik, Peter Patel-Schneider, eds. W3C Editor's Draft, 2126 November 2008, http://www.w3.org/2007/OWL/draft/ED-owl2-xml-serialization-20081121/http://www.w3.org/2007/OWL/draft/ED-owl2-xml-serialization-20081126/. Latest version available at http://www.w3.org/2007/OWL/draft/owl2-xml-serialization/.
[SROIQ]
The Even More Irresistible SROIQ. Ian Horrocks, Oliver Kutz and Uli Sattler. In Proc. of the 10th Int. Conf. on Principles of Knowledge Representation and Reasoning (KR 2006). AAAI Press, 2006.
[XML]
Extensible Markup Language (XML) 1.1. Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, Eve Maler, François Yergeau and John Cowan, eds. W3C Recommendation 16 August 2006, edited in place 29 September 2006.
[XML Namespaces]
Namespaces in XML 1.0 (Second Edition). Tim Bray, Dave Hollander, Andrew Layman and Richard Tobin, eds. W3C Recommendation 16 August 2006.
[XML Schema Datatypes]
W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes. D. Peterson, S. Gao, A. Malhotra, C. M. Sperberg-McQueen, H. S. Thompson, eds. W3C Working Draft 20 June 2008.
[RDF Syntax]
RDF/XML Syntax Specification (Revised). Dave Beckett, Editor, W3C Recommendation, 10 February 2004, http://www.w3.org/TR/rdf-syntax-grammar/.
[BCP 47]
BCP 47 - Tags for Identifying Languages. A. Phillips, M. Davis, eds., IETF, September 2006, http://www.rfc-editor.org/rfc/bcp/bcp47.txt.
[RFC 2119]
RFC 2119: Key words for use in RFCs to Indicate Requirement Levels. Network Working Group, S. Bradner. Internet Best Current Practice, March 1997.
[RFC3629]
UTF-8, a transformation format of ISO 10646, F. Yergeau, November 2003, http://www.ietf.org/rfc/rfc3629.txt
[RFC3986]
RFC 3986 Uniform Resource Identifier (URI): Generic Syntax, T. Berners-Lee, R. Fielding and L. Masinter, January 2005, http://www.ietf.org/rfc/rfc3986.txt
[RFC3987]
RFC 3987 - Internationalized Resource Identifiers (IRIs). M. Duerst and M. Suignard. IETF, January 2005, http://www.ietf.org/rfc/rfc3987.txt.
[OWL Semantics and Abstract Syntax]
OWL Web Ontology Language: Semantics and Abstract Syntax Peter F. Patel-Schneider, Patrick Hayes and Ian Horrocks, eds. W3C Recommendation, 10 February 2004, http://www.w3.org/TR/2004/REC-owl-semantics-20040210/. Latest version available at http://www.w3.org/TR/owl-semantics/.
[CURIE]
CURIE Syntax 1.0: A syntax for expressing Compact URIs. M. Birbeck and S. McCarron, Editors, W3C Working Draft, 26 November 2007, http://www.w3.org/TR/2007/WD-curie-20071126/.
[RDF Test Cases]
RDF Test Cases. Jan Grant and Dave Beckett, Editors, W3C Recommendation 10 February 2004, http://www.w3.org/TR/rdf-testcases/.
[ISO/IEC 10646]
ISO/IEC 10646-1:2000. Information technology — Universal Multiple-Octet Coded Character Set (UCS) — Part 1: Architecture and Basic Multilingual Plane and ISO/IEC 10646-2:2001. Information technology — Universal Multiple-Octet Coded Character Set (UCS) — Part 2: Supplementary Planes, as, from time to time, amended, replaced by a new edition or expanded by the addition of new parts. [Geneva]: International Organization for Standardization. ISO (International Organization for Standardization).
[DL-Safe]
Query Answering for OWL-DL with Rules. Boris Motik, Ulrike Sattler and Rudi Studer. Journal of Web Semantics: Science, Services and Agents on the World Wide Web, 3(1):41–60, 2005.
[IEEE 754]
IEEE Standard for Binary Floating-Point Arithmetic. Standards Committee of the IEEE Computer Society
[ISO 8601:2004]
ISO 8601:2004. Representations of dates and times. ISO (International Organization for Standardization).
[RDF]
Resource Description Framework (RDF): Concepts and Abstract Syntax. Graham Klyne and Jeremy J. Carroll, eds., W3C Recommendation 10 February 2004
[RDF:TEXT]
rdf:text: A Datatype for Internationalized Text Jie Bao, Axel Polleres, Boris Motik. W3C Editor's Draft, 2126 November 2008, http://www.w3.org/2007/OWL/draft/ED-owl2-rdf-text-20081121/http://www.w3.org/2007/OWL/draft/ED-owl2-rdf-text-20081126/. Latest version available at http://www.w3.org/2007/OWL/draft/owl2-rdf-text/.
[UNICODE]
The Unicode Standard Version 3.0, Addison Wesley, Reading MA, 2000, ISBN: 0-201-61633-5, http://www.unicode.org/unicode/standard/standard.html
[UNISEC]
Unicode Security Considerations, Mark Davis and Michel Suignard, July 2008, http://www.unicode.org/reports/tr36http://www.unicode.org/reports/tr36/
[MOF]
Meta Object Facility (MOF) Core Specification, version 2.0. Object Management Group, OMG Available Specification January 2006.
[UML]
OMG Unified Modeling Language (OMG UML), Infrastructure, V2.1.2. Object Management Group, OMG Available Specification November 2007.