<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Manchester Syntax for OWL 1.1</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Matthew Horridge</string-name>
          <email>matthew.horridge@cs.man.ac.uk</email>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Peter F. Patel-Schneider</string-name>
        </contrib>
      </contrib-group>
      <abstract>
        <p>The Manchester OWL syntax is a user-friendly syntax for OWL DL, fundamentally based on collecting all information about a particular class, property, or individual into a single construct, called a frame. The Manchester OWL syntax has been revised to be a syntax for OWL 1.1, involving adding the new OWL 1.1 description constructs and the new axioms allowed in OWL 1.1 ontologies.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        – the normative exchange syntax in RDF/XML [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ],
– the so-called abstract syntax for OWL DL [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], and
– an XML syntax [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
– RDF/XML, as before,
– a functional-style syntax, replacing the abstract syntax [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], and
– a revised XML syntax [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>These syntaxes have differing purposes; for transfer within the Semantic
Web, to assist in formal definition of the semantics, for transfer as XML. None
of them, however, are designed for ease of use by humans when building or
analyzing ontologies. Instead, it was thought that these vital tasks would be
performed using tools that provide a graphical interface for human users.
Indeed there are tools that provide such a graphical interface, including Prot´eg´e
(http://protege.stanford.edu/overview/) and Swoop (http://code.google.com/
p/swoop/). However, it was soon understood that some parts of creating an
ontology require the creation and entry of complex descriptions, for example
when creating a class. A useful way of creating such complex descriptions is via
a linear syntax. Similarly presenting these complex descriptions can usefully be
done by using a linear syntax (generally with nice indentation).</p>
      <p>
        The original Manchester OWL syntax [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] was created to meet this need. It
was designed mainly as a syntax for OWL descriptions that would be easier
to write and understand, particularly for non-logicians. The Manchester OWL
syntax is not, however, a natural language syntax for OWL. The Prot´eg´e OWL
plugin used the Manchester OWL syntax both when entering and displaying
complex descriptions. The syntax could also be used to dump and read OWL
DL ontologies.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Syntax Philosophy</title>
      <p>The Manchester OWL syntax tries to minimize syntactic constructs that are
difficult to enter or understand, particularly in description. Complex
descriptions use short, intuitive English words instead of logical symbols and the usual
precedence rules to minimize parentheses.</p>
      <p>For example,
Student or Person that hasAge all xsd:integer[ &lt;= 25 ]
corresponds to</p>
      <sec id="sec-2-1">
        <title>ObjectUnionOf(Student</title>
      </sec>
      <sec id="sec-2-2">
        <title>ObjectIntersectionOf(Person</title>
      </sec>
      <sec id="sec-2-3">
        <title>DataAllValuesFrom( hasAge</title>
      </sec>
      <sec id="sec-2-4">
        <title>Datarange( xsd:integer minInclusive "25"^^xsd:integer ))))</title>
        <p>The Manchester OWL syntax is much more compact and more readable.</p>
        <p>
          The new functional-style syntax for OWL 1.1 has moved from the
framelike abstract syntax for OWL DL and is, instead, based on axioms. This move
was taken because of problems encountered with the original abstract syntax
having to do with performing operations on OWL ontologies, such as removing
axioms. The functional-style syntax thus corresponds very closely to a potential
mechanism for storing ontologies in tools, the structural specification of OWL
1.1 ontologies [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ].
        </p>
        <p>The Manchester OWL syntax, purposefully, retains a object-centered
framelike organization for ontologies, as a frame organization supports a very natural
way of creating, editing, and viewing ontologies, similar to the presentation of
ontologies in most ontology-building tools, e.g., Prot´eg´e 4. IN this organization,
all the information about an object (a class or property or individual) is
collected together, both to aid in perusal of ontology documents and to mirror the
way graphical user interfaces like Prot´eg´e present information about parts of
ontologies.</p>
        <p>Frames and the parts of a frame are uniformly introduced by keywords that
end in colons, allowing for their easy recognition. It is suggested that when
printing ontologies that indentation be used to help with readability, as follows:</p>
      </sec>
      <sec id="sec-2-5">
        <title>Class: Person</title>
      </sec>
      <sec id="sec-2-6">
        <title>SubClassOf: hasAge exactly 1 and hasGender exactly 1 and hasGender only {female , male} Individual: John</title>
        <p>The advent of OWL 1.1 required some changes to the Manchester OWL syntax.</p>
        <p>
          The new constructs in descriptions, qualitative cardinality restrictions and
self restrictions, were easy to handle, just requiring additional syntax, similar to
the existing syntax. Allowing CURIES [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] simply was a matter of extending the
syntax of what used to be local names. Punning mostly required no changes, but
see below for one problem with punning.
        </p>
        <p>OWL 1.1 allows annotations in many more places than were allowed
previously. These annotations are allowed in the Manchester OWL syntax. They are
introduced by an Annotations: keyword, in a way consistent with the other
constructs in the syntax.</p>
        <p>The following example shows a class frame with two annotations (a label and
a comment) on the frame itself, one annotation on the subclass axiom to Person
and two annotations on the subclass axiom to owl:Thing.</p>
      </sec>
      <sec id="sec-2-7">
        <title>Class: Student</title>
      </sec>
      <sec id="sec-2-8">
        <title>Annotations: rdfs:label "Student"@en</title>
        <p>rdfs:comment "The class of students"</p>
      </sec>
      <sec id="sec-2-9">
        <title>SubClassOf:</title>
      </sec>
      <sec id="sec-2-10">
        <title>Annotations: dc:creator "Peter"</title>
      </sec>
      <sec id="sec-2-11">
        <title>Person,</title>
      </sec>
      <sec id="sec-2-12">
        <title>Annotations: dc:creator "Matthew" dc:date "12 May 2007" owl:Thing</title>
        <p>Because annotations break up the flow of information, they can be harmful to
readability.</p>
        <p>The syntax here allows for annotations on annotations which are not (yet)
part of OWL 1.1. Extending annotations in this way is one of the issues that the
OWL working group is considering.</p>
        <p>Some constructs in OWL 1.1, such as the axioms for n-way disjointness of
classes and properties and n-way difference and sameness of individuals, are not
obviously part of any particular object. In fact, they are equally about each of
the n classes, properties, or individuals involved. Attaching these constructss to
any one frame would be misleading. The Manchester OWL syntax thus breaks
from its general object-centricity with specific syntax for these axioms, as in the
following example.</p>
      </sec>
      <sec id="sec-2-13">
        <title>DifferentIndividuals: f:Jeff f:Emily f:Jack f:Ellen f:Susan</title>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>4 Issues</title>
      <p>OWL 1.1 does pose a few problems for the Manchester OWL syntax.</p>
      <p>The frames for classes, properties, and individuals play a similar role to
declarations in OWL 1.1, and thus the syntax does not have a separate construct
for declarations. However, it can be the case that an ontology adds information
to an imported class, property, or individual. In this case the frame for that class,
property, or individual is not a declaration. Global analysis is thus required to
determine which declarations are required in an ontology.</p>
      <p>Moving between the Manchester OWL syntax and the functional-style syntax
and structural specification for OWL 1.1 requires moving between frames and
axioms. This is actually not difficult at all, as each frame construct has a number
of top-level pieces that each correspond directly to an axiom.</p>
      <p>For example, the frame
corresponds to seven axioms (and possibly one declaration) in the
functionalstyle syntax, as follows:</p>
      <p>Punning between object and data properties (i.e., an object property and a
data property with the same name) could cause ambiguity between object and
data property restrictions. Overcoming this ambiguity would require much extra
vocabulary, resulting in lessened readability. Therefore the Manchester OWL
syntax does not support dumping of ontologies with punned object and data
properties. Duplicating the syntax, as in the OWL 1.1 functional-style syntax,
was another possible solution, but it would have interfered with readability too
much.
5</p>
    </sec>
    <sec id="sec-4">
      <title>The Manchester OWL Syntax</title>
      <p>Here is a grammar for the Manchester OWL Syntax, with some low-level
productions (e.g., digits) removed. In the grammar, terminals are enclosed in single
quotes (‘’) and non-terminals are in bold. Optional parts are in brackets ([])
and repeated parts are in braces (). Some productions are given informally or
by references, indicated with italics.
5.1</p>
      <sec id="sec-4-1">
        <title>CURIES, Names, and Constants</title>
      </sec>
      <sec id="sec-4-2">
        <title>NCName</title>
        <p>prefix
irelative-ref
reference
curie</p>
      </sec>
      <sec id="sec-4-3">
        <title>Abbreviated-IRI</title>
      </sec>
      <sec id="sec-4-4">
        <title>Full-IRI URI</title>
        <p>::= as defined in XML Namespaces
::= NCName
::= as defined in RFC-3987
::= irelative-ref
::= [ [ prefix ] ‘:’ ] reference
::= curie
::= ‘&lt;’ IRI as defined in RFC-3987 ‘&gt;’
::= Full-IRI | Abbreviated-IRI
datatypeURI ::= URI | ‘integer’ | ‘decimal’ | ‘float’ | ‘string’
owlClassURI ::= URI
objectPropertyURI ::= URI
dataPropertyURI ::= URI
individualURI ::= URI
annotationURI ::= URI
ontologyURI ::= URI
stringLiteral ::= ‘"’ string with \ and " \-escaped ‘"’
integerLiteral ::= [‘+’|‘-’] digits
decimalLiteral ::= [‘+’|‘-’ ] digits ‘.’ digits
exponent ::= (‘e’ | ‘E’) [‘+’ | ‘-’] digits
floatingPointLiteral ::= [‘+’|‘-’] ( digits [‘.‘digits] [ exponent]
| ‘.’ digits[ exponent]) ( ‘f’ | ‘F’ )
typedLiteral ::= stringLiteral ‘^^’ datatype
typedConstant ::= stringLiteral | integerLiteral | decimalLiteral
| floatingPointLiteral | typedLiteral
languageTag ::= a language tag as specified in RFC-4646
untypedConstant ::= stringLiteral [ ‘@’ languageTag ]
constant ::= typedConstant | untypedConstant
5.2</p>
      </sec>
      <sec id="sec-4-5">
        <title>Lists, Entities, and Annotations</title>
        <p>Because comma-separated lists occur in very many places in the syntax, to save
space the grammar here has two meta-productions, one for lists and one for lists
with annotations in them.</p>
        <p>NTList ::= NT { ‘,’ NT }
NTAnnotatedList ::= [annotations] NT { ‘,’ [annotations] NT }</p>
        <p>The non-terminal descriptionList is thus a comma-separated list of
descriptions, such as</p>
        <sec id="sec-4-5-1">
          <title>Person, Student, hasChild exactly 1 Person</title>
          <p>and the non-terminal descriptionAnnotationList is thus a comma-separated
list of descriptions each possibly proceeed by annotations, such as</p>
        </sec>
        <sec id="sec-4-5-2">
          <title>Annotations: dc:creator "Peter"</title>
        </sec>
        <sec id="sec-4-5-3">
          <title>Person,</title>
        </sec>
        <sec id="sec-4-5-4">
          <title>Annotations: dc:creator "Matthew" dc:date "12 May 2007" owl:Thing</title>
          <p>Annotations and entities are formed as follows:
annotation ::= annotationURI ( constant | individualURI | entity )
annotations ::= ‘Annotations:’ annotationAnnotatedList
entity ::= ‘Datatype’ ‘(’ datatypeURI ‘)’
| ‘OWLCLass’ ‘(’ OWLClassURI ‘)’
| ‘ObjectProperty’ ‘(’ objectPropertyURI ‘)’
| ‘DataProperty’ ‘(’ dataPropertyURI ‘)’
| ‘Individual’ ‘(’ individualURI ‘)’
| ‘AnnotationProperty’ ‘(’ annotationPropertyURI ‘)’</p>
          <p>This grammar allows annotations on annotations, which are not (yet) in
OWL 1.1. The current state of annotations in OWL 1.1 corresponds to replacing
the production for annotations with
annotations ::= ‘Annotations:’ annotationList
5.3</p>
          <p>Ontology Documents
namespace ::= ‘Namespace:’ [ prefix ] ‘=’ Full-IRI
ontologyDoc ::= { namespace } ontology
ontology ::= ‘Ontology:’ ontologyURI { import }</p>
          <p>{ annotations } { frame }
import ::= ‘Import:’ URI
frame ::= classFrame | objectPropertyFrame</p>
          <p>| dataPropertyFrame | individualFrame | misc
5.4</p>
          <p>Property Expressions and Datatypes
inverseObjectProperty ::= ‘inverseOf’ objectPropertyExpression
objectPropertyExpression ::= objectPropertyURI</p>
          <p>| inverseObjectProperty
dataPropertyExpression ::= dataPropertyURI
dataComplementOf ::= ‘not’ dataRange
dataOneOf ::= ‘{’ constant { ‘,’ constant } ‘}’
datatypeFacet ::= ‘length’ | ‘minLength’ | ‘maxLength’
| ‘pattern’ | ‘&lt;=’ | ‘&lt;’ | ‘&gt;=’ | ‘&gt;’
| ‘digits’ | ‘fraction’
restrictionValue ::= constant
datatypeRestriction ::= datatypeURI
‘[’ datatypeFacet restrictionValue</p>
          <p>{ , datatypeFacet restrictionValue } ‘]’
dataRange ::= datatypeURI | dataComplementOf
| dataOneOf | datatypeRestriction</p>
          <p>Note: If the datatypeURI involved is an XML Schema datatype then the
datatypeFacets and restrictionValues have to be valid for that datatype.
5.5</p>
          <p>Descriptions
atomic ::= OWLClassURI
| ‘{’ individualURI { ‘,’ individualURI } ‘}’
| ‘(’ description ‘)’
restriction ::= objectPropertyExpression ‘some’ primary
| objectPropertyExpression ‘only’ primary
| objectPropertyExpression ‘value’ individualURI
| objectPropertyExpression ‘min’ nonNegativeInteger [ primary ]
| objectPropertyExpression ‘exactly’ nonNegativeInteger [primary]
| objectPropertyExpression ‘max’ nonNegativeInteger [ primary ]
| objectPropertyExpression ‘Self’
| dataPropertyExpression ‘some’ dataRange
| dataPropertyExpression ‘only’ dataRange
| dataPropertyExpression ‘value’ constant
| dataPropertyExpression ‘min’ nonNegativeInteger [ dataRange ]
| dataPropertyExpression ‘exactly’ nonNegativeInteger [dataRange]
| dataPropertyExpression ‘max’ nonNegativeInteger [ dataRange ]
primary ::= [ ‘not’ ] ( restriction | atomic )
conjunction ::= | primary ‘and’ primary { ‘and’ primary }</p>
        </sec>
      </sec>
      <sec id="sec-4-6">
        <title>OWLClassURI ‘that’ [ ‘not’ ] restriction { ‘and’ [ ‘not’ ] restriction } | primary description ::= conjunction ‘or’ conjunction { ‘or’ conjunction } | conjunction</title>
        <p>5.6</p>
        <p>Class, Property, and Individual Frames
classFrame ::= ‘Class:’ OWLClassURI
{ ‘Annotations:’ annotationAnnotatedList
| ‘SubClassOf:’ descriptionAnnotatedList
| ‘EquivalentTo:’ descriptionAnnotatedList
| ‘DisjointWith:’ descriptionAnnotatedList
| ‘DisjointUnionOf:’ annotations descriptionList }
objectPropertyFrame ::= ‘ObjectProperty:’ objectPropertyURI
{ ‘Annotations:’ annotationAnnotatedList
| ‘Domain:’ descriptionAnnotatedList
| ‘Range:’ descriptionAnnotatedList
| ‘Characteristics:’ objectPropertyCharacterAnnotatedList
| ‘SubPropertyOf:’ objectPropertyExpressionAnnotatedList
| ‘EquivalentTo:’ objectPropertyExpressionAnnotatedList
| ‘DisjointWith:’ objectPropertyExpressionAnnotatedList
| ‘Inverses:’ objectPropertyExpressionAnnotatedList
| ‘SubPropertyChain:’ annotations objectPropertyExpression
‘o’ objectPropertyExpression {‘o’ objectPropertyExpression} }
objectPropertyCharacter ::= ‘Functional’ | ‘InverseFunctional’
| ‘Reflexive’ | ‘Irreflexive’
| ‘Symmetric’ | ‘Asymmetric’ | ‘Transitive’
dataPropertyFrame ::= ‘DataProperty:’ dataPropertyURI
{ ‘Annotations:’ annotationAnnotatedList
| ‘Domain:’ descriptionAnnotatedList
| ‘Range:’ dataRangeAnnotatedList
| ‘Characteristics:’ annotations ‘Functional’
| ‘SubPropertyOf:’ dataPropertyExpressionAnnotatedList
| ‘EquivalentTo:’ dataPropertyExpressionAnnotatedList
| ‘DisjointWith:’ dataPropertyExpressionAnnotatedList }
objectPropertyFact ::= objectPropertyURI individualURI
dataPropertyFact ::= dataPropertyURI constant
fact ::= [ ‘not’ ] (objectPropertyFact | dataPropertyFact)
individualFrame ::= ‘Individual:’ individualURI
{ ‘Annotations:’ annotationAnnotatedList
| ‘Types:’ descriptionAnnotatedList
| ‘Facts:’ factAnnotatedList
| ‘SameAs:’ individualURIAnnotatedList
| ‘DifferentFrom:’ individualURIAnnotatedList }
7</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Status and Future Work</title>
      <p>The Manchester OWL syntax is used in the Prot´eg´e 4 ontology development
tool (http://www.co-ode.org/downloads/protege-x/). Prot´eg´e 4 can dump and
load OWL 1.1 ontologies in the Manchester OWL syntax. As well, complex
descriptions can be entered using the Manchester OWL syntax. Most of the
examples in this paper were generated using Prot´eg´e 4. Although the Manchester
OWL syntax was initially developed to be more human-readable than other
OWL syntaxes, there has as yet been no formal user studies to support this
aspect of the current language.</p>
      <p>The OWL Primer (http://www.w3.org/2007/OWL/wiki/Primer), under
consideration in the W3C OWL Working Group, currently uses the Manchester
OWL syntax as its primary syntax because this syntax is the most readable
OWL syntax. The OWL Working Group may also decide to produce a Working
Group note on the Manchester OWL syntax.</p>
      <p>The OWL 1.1 language is still under development. The syntax in this paper
attempts to track the current version of OWL 1.1 with a bit of anticipation
related to annotations. The Manchester OWL syntax will be updated as OWL
1.1 is updated. Prot´eg´e 4 currently implements a slightly older version of the
syntax (and has a couple of bugs in this area as well).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <source>1. OWL 1</source>
          .
          <article-title>1 web ontology language: Structural specification and functional-style syntax</article-title>
          .
          <source>W3C</source>
          Working Draft, http://www.w3.org/TR/owl11-syntax/,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <article-title>2. RDF/XML syntax specification (revised)</article-title>
          .
          <source>W3C Recommendation</source>
          , http://www.w3.org/TR/rdf-syntax-grammar/,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Bernardto</given-names>
            <surname>Cuenca</surname>
          </string-name>
          <string-name>
            <given-names>Grau</given-names>
            , Boris Motik, and
            <surname>Peter F. Patel-Schneider</surname>
          </string-name>
          .
          <source>OWL 1</source>
          .
          <article-title>1 web ontology language: XML syntax. W3C Member Submission</article-title>
          , http://www.w3.org/Submission/2006/SUBM-owl11-xml syntax-
          <volume>20061219</volume>
          /,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Matthew</given-names>
            <surname>Horridge</surname>
          </string-name>
          , Nick Drummond, John Goodwin, Alan Rector, Robert Stevens, and
          <string-name>
            <surname>Hai</surname>
            <given-names>H.</given-names>
          </string-name>
          <string-name>
            <surname>Wang</surname>
          </string-name>
          .
          <article-title>The Manchester OWL syntax</article-title>
          .
          <source>In OWL Experiences and Directions Workshop</source>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <article-title>5. CURIE syntax 1.0: A syntax for expressing compact URIs</article-title>
          . W3C Working Draft, http://www.w3.org/TR/2007/WD-curie-
          <volume>20071126</volume>
          /,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <article-title>6. OWL web ontology language: XML presentation syntax</article-title>
          .
          <source>W3C Note</source>
          , http://www.w3.org/TR/owl-xmlsyntax/,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Peter F. Patel-Schneider</surname>
          </string-name>
          ,
          <article-title>Patrick Hayes, and Ian Horrocks. OWL web ontology language: Semantics and abstract syntax</article-title>
          .
          <source>W3C Recommendation</source>
          , http://www.w3.org/TR/owl-semantics/,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>