The tests of this document are also available in these non-normative formats: Zip archive of approved tests, Zip archive of proposed tests, the test web site.
Copyright © 2003 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply.
This document contains and presents test cases for the Web Ontology Language (OWL) approved by the Web Ontology Working Group. Many of the test cases illustrate the correct usage of the Web Ontology Language (OWL), and the formal meaning of its constructs. Other test cases illustrate the resolution of issues considered by the working group. Conformance for OWL documents and OWL document checkers is specified.
This section describes the status of this document at the time of its publication. ther documents may supersede this document. The latest status of this document series is maintained at the W3C.
This is the Last Call Working Draft of "OWL Test Cases" for review by members of the W3C and other interested parties in the general public. The Last Call review is intended primarily to review the text of this document. The tests are still in development and are being changed during the last call review period, up to the publication of the corresponding Proposed Recommendation. Each test may be edited or have a change of status according to the process specified below. Further tests are being added. An editors' version of this document, with the latest tests, can be found at http://www.w3.org/2002/03owlt/editors-draft/snapshot. Other resulting changes expected before Proposed Recommendation are indicated by editors' notes. Despite this flux, the working group would value implementor feedback on the tests both in this document and those found in the editors' version. The Last Call review period ends 07 March 2003.
This document is subsidiary to the normative definition of the Web Ontology Language [OWL Abstract Syntax and Semantics]).
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". A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR.
Patent disclosures relevant to this specification may be found on the Working Group's public patent disclosure page.
Comments on this document should be sent to public-webont-comments@w3.org, a mailing list with a public archive. General discussion of related technology is welcome in www-rdf-logic@w3.org (archive).
This document has been produced as part of the W3C Semantic Web Activity (Activity Statement) following the procedures set out for the W3C Process. The document has been written by the Web Ontology Working Group. The goals of the Web Ontology working group are discussed in the Web Ontology Working Group charter.
As part of the definition of the Web Ontology Language (OWL) [OWL Language] the Web Ontology Working Group provides a set of test cases. This document contains those test cases. They are intended to provide examples for, and clarification of, the normative definition of OWL found in [OWL Abstract Syntax and Semantics] to which this document is subsiduary.
This document describes the various types of test used
and the format in which the tests
are presented.
Alternative formats of the test collection are provided.
These are intended to be suitable
for use by OWL developers in test harnesses,
possibly as part of a test driven development process,
such as Extreme Programming [XP].
The format of the Manifest
files
used as part of these alternative formats is described.
This document describes the process for conflict resolution and errata related to these tests.
In the non-normative appendices, this document also describes the process for creation and approval of these tests.
Further appendices show further proposed tests that are awaiting resolution by the working group.
Various conformance levels are defined in this document in terms of [OWL Abstract Syntax and Semantics].
However, the test cases do not constitute a conformance test suite for OWL.
The tests illustrate issue resolutions, and illustrate the use and meaning of the terms in the OWL namespace.
There are other miscellaneous tests: some arising in the literature, and in preexisting systems; others intending to show the difficulty of complete implementations of OWL Full.
The deliverables included as part of the test cases are:
Note: Other files can be found under the top URL of the web-site which are not part of the deliverable.
[[EDITORS' NOTE: Do we need index files for the web site that clarify which parts are part of the deliverable and which are not?]]
Of the deliverables the only normative tests are those included in this document. All other deliverables, are informative. Moreover, the recommendation document is informative except for the conformance statements, the test data (specified in RDF/XML [RDF/XML Syntax]), and the supporting documentation.
When the normative tests and the other normative OWL recommendations diverge the following process should be followed.
If the OWL working drafts are at or before Proposed Recommendation then:
If the OWL recommendation has passed Proposed Recommendation then:
Note: this last step does not require consensus, or even a majority.
Note: the errata process over the tests is monotonic decreasing; i.e. after Proposed Recommendation, any system that passes all the test cases will necessarily pass all the test case with errata.
Each test consists of either one or more RDF/XML documents and a Manifest
file.
Tests of one document indicate some property of that document
when viewed as an OWL knowledge base.
Tests of two or more documents indicate a relationship between the two documents
when viewed as OWL knowledge bases.
The Manifest
file is named ManifestNNN.rdf
(The NNN
is replaced by the test number).
It contains metadata (in RDF) indicating the test type,
and describing the test.
These tests use one document.
It is named badNNN.rdf
.
This document includes a use of the OWL namespace with a local name
that is not defined by the OWL recommendation.
Note: These tests are intended to help migration from DAML+OIL [DAML+OIL], since the local names chosen are defined in the DAML+OIL namespace.
These tests use two documents.
One is named premisesNNN.rdf
,
the other is named conclusionsNNN.rdf
.
The conclusions
are
entailed by the premises
.
Such entailment is defined by the OWL semantics [OWL Abstract Syntax and Semantics],
(see also
OWL Full entailment).
These tests use two documents.
One is named premisesNNN.rdf
,
the other is named nonconclusionsNNN.rdf
.
The nonconclusions
are not
entailed
by the premises
.
Such entailment is defined by the OWL semantics [OWL Abstract Syntax and Semantics],
(see also
OWL Full entailment).
These tests use one document.
It is named conclusionsNNN.rdf
.
The conclusions
follow from the OWL semantics
[OWL Abstract Syntax and Semantics].
These tests are a special case of the entailment tests
in which the premises are empty.
These tests use one document.
It is named conclusionsNNN.rdf
.
These are a special case of true tests.
The conclusions
follow from the
OWL Full semantics
[OWL Abstract Syntax and Semantics].
The tests are intended to illustrate how
OWL Full can be used to describe its own properties and
classes.
These tests use one document.
It is named consistentNNN.rdf
.
The document is
consistent
as defined
by the OWL Semantics [OWL Abstract Syntax and Semantics],
(see also
OWL Full consistency).
These tests use one document.
It is named inconsistentNNN.rdf
.
The document is not
consistent
as defined
by the OWL semantics [OWL Abstract Syntax and Semantics],
(see also
OWL Full consistency).
These tests use more than two documents.
One is named premisesNNN.rdf
,
another is named conclusionsNNN.rdf
, the rest have names beginning supportNNN.rdf
.
The support
documents are in the
imports closure of the
premises
document.
The conclusions
are
entailed
by the
imports closure
of the premises
.
Such entailment is defined by the OWL semantics [OWL Abstract Syntax and Semantics],
(see also
OWL Full entailment).
These tests use two documents.
One is named importsNNN.rdf
,
the other is named mainNNN.rdf
.
These
tests indicate the
interaction between owl:imports
and the sublanguage levels of the main
document.
An OWL Full
document
is an
RDF/XML document [RDF/XML Syntax],
for which the corresponding
RDF graph
[RDF Concepts]
does not use any URI references
starting with the prefix http://www.w3.org/2002/07/owl#
except those found in the
[RDF Schema for OWL].
An OWL DL document is an OWL Full document such that the imports closure [OWL Abstract Syntax and Semantics] of the corresponding RDF graph [RDF Concepts] is an OWL DL ontology in RDF graph form.
An OWL Lite document is an OWL Full document such that the imports closure [OWL Abstract Syntax and Semantics] of the corresponding RDF graph [RDF Concepts] is an OWL Lite ontology in RDF graph form.
A consistent OWL document is an OWL Full document for which the corresponding RDF graph [RDF Concepts] is consistent according to the [OWL Abstract Syntax and Semantics].
This section uses the words MUST, MUST NOT, SHOULD and MAY as in [RFC 2119].
An OWL
syntax checker
takes a document as input, and outputs one word being one of Lite
,
DL
, Full
, Other
.
The output MUST conform with the following:
An OWL syntax checker SHOULD report network errors occurring during the computation of the imports closure.
An OWL consistency checker
takes a document as input, and outputs one word being Consistent
,
Inconsistent
, or Unknown
.
Five different conformance classes of OWL consistency checker are defined.
An OWL consistency checker MUST NOT output Consistent
unless the input document is a
consistent OWL document.
An OWL consistency checker MUST NOT output Inconsistent
unless the input document is not a
consistent OWL document.
An OWL consistency checker SHOULD report network errors occurring during the computation of the imports closure.
An OWL Lite consistency checker is an OWL consistency checker that takes an OWL Lite document as input.
An OWL DL consistency checker is an OWL consistency checker that takes an OWL DL document as input.
An OWL Full consistency checker is an OWL consistency checker that takes an OWL Full document as input.
Note: Every OWL Full consistency checker is also an OWL DL consistency checker. Every OWL DL consistency checker is also an OWL Lite consistency checker. Every OWL Lite consistency checker can be trivially transformed into an OWL Full consistency checker.
The different levels are intended to be used to indicate the intended domain of a consistency checker.
Note: there are trivial implementations of these consistency
checkers; for example, one which always outputs Unknown
.
A complete OWL Lite consistency checker is an OWL consistency checker that takes an OWL Lite document as input, and is logically complete with respect to [OWL Abstract Syntax and Semantics] over the set of all OWL Lite documents.
A complete OWL DL consistency checker is an OWL consistency checker that takes an OWL DL document as input, and is logically complete with respect to [OWL Abstract Syntax and Semantics] over the set of all OWL DL documents.
Note:
Complete OWL DL consistency checkers
and
Complete OWL Lite consistency checkers
MAY return Unknown
on an OWL DL document
or OWL Lite document in the case where
a resource limit has been exceeded.
[WG note: The use of must, should etc. is consistent with [RFC 2119], but since this section is informative I have not imported the definitions.]
An OWL syntax checker when presented with any of the test files must return the indicated result.
An OWL Lite consistency checker,
when presented with a file from
an OWL Lite consistency test,
must output Consistent
or Unknown
.
An OWL DL consistency checker,
when presented with a file from
an OWL DL or OWL Lite consistency test,
must output Consistent
or Unknown
.
An OWL Full consistency checker,
when presented with a file from
an OWL Full, OWL DL or OWL Lite consistency test,
must output Consistent
or Unknown
.
The corresponding inconsistency tests must result in output of
Inconsistent
or Unknown
.
A complete OWL Lite consistency checker or a
complete OWL DL consistency
checker should not return Unknown
on the relevant
consistency
or inconsistency tests.
Many of the non-entailment tests can be converted into consistency tests by negating the conclusions. Many of the entailment tests can be converted into inconsistency tests by negating the conclusions. When this process is applied to an OWL Lite entailment or non-entailment, the resulting consistent or inconsistent document is usually an OWL DL document.
The Manifest
file follows the RDF schema developed
for the RDF Test Cases [RDF Test Cases].
This is augmented by a few new properties and types which are declared in the OWL Test Ontology, found at http://www.w3.org/2002/03owlt/testOntology.
Specifically each test has its own Manifest
file, and is identified from
the URI reference formed from the Manifest
file's URL with a fragment test
.
The test has one rdf:type
explicit, and this is one of:
otest:NotOwlFeatureTest
otest:PositiveEntailmentTest
otest:NegativeEntailmentTest
otest:TrueTest
otest:OWLforOWL
otest:ConsistencyTest
otest:InconsistencyTest
otest:ImportEntailmentTest
otest:ImportLevelTest
Where otest
is bound to
http://www.w3.org/2002/03owlt/testOntology#
and rtest
is bound to
http://www.w3.org/2000/10/rdf-tests/rdfcore/testSchema#
.
The name of the original author of the test is shown using a
dc:creator
property, see [Dublin Core].
A description of the test is given (using XHTML markup [XHTML])
as the value of the rtest:description
property.
An issue, if any, from the OWL Issues list [OWL Issues], is
the value of a rtest:issue
property.
An appropriate language feature, from the OWL namespace, if any, is
the value of the otest:feature
property.
The input documents with the test data are found as the value of
the rtest:inputDocument
property or
as the value of both the
rtest:premiseDocument
and
the
rtest:conclusionDocument
.
The support files for import entailment tests and import level tests are found
as the values of otest:importedPremiseDocument
.
The conformance level associated with both files and tests
are given with the otest:level
property.
The value for each document and test is one of
otest:Full
, otest:DL
,
otest:Lite
or otest:Other
(documents only).
These tests are ones that are either known from the literature (specifically from [DL ref-1] and [DL ref-2]), or from test suites contributed by DL implementors (specifically some group and some other group).
Some actual tests in this category ...
These tests, taken from the [OWL Guide] are ones that do not fit any other category.
wine.owl, and food.owl by reference rather than verbatim ...
There is no expectation that any implementation will successful run the tests in this section; any that do gain extra credit.
The intent is to illustrate the semantics of OWL, particularly OWL Full, as specified by [OWL Abstract Syntax and Semantics], with the specific goal of showing that it is possible to say things that it is not reasonable to expect an implementation to completely understand.
Some actual tests in this category ... Tests concerning prime factorization. tests concerning dominos and transitiveproperties with cardinality constraints. Tests concerning peculiar extensions of the OWL vocabulary.
Tests are created by members of the working group. An (optional) test editor is provided to facilitate this. Tests are then placed in the appropriate directory in the test web site. This is done using CVS access to the W3C CVS server [W3C CVS].
When created, tests are given a status of "PROPOSED"
.
The author of the test creates a Manifest file in the directory
of the new test, identifying:
"PROPOSED"
.At the chair's discretion, individual tests or groups of tests are put to the working group in the weekly telecon or at a face-to-face meeting.
Tests are approved by working group decision.
The working group may take account of favourable review of the tests and/or implementation reports, as well as other factors.
Many of the tests are proposed by Carroll and verified by De Roo's implementation.
If the Working Group approves a test, then it is included in the test case document.
The Working Group may reject a test, in which case its status is
changed to "REJECTED"
. This does not indicate that the
converse of the test has been accepted. There may be stylistic
or other grounds for rejecting technically correct tests.
The Working Group has complete discretion to approve or reject tests independent of their conformance with this process or their conformance with the OWL working drafts.
In the light of new information, and at the chairs' discretion, the working group
may review any previous decision regarding any test cases. The status of
"OBSOLETED"
may be used where a test has ceased to be appropriate.
The editors may make editorial changes to approved and proposed tests. This includes:
There is a preference for the following stylistic rules. None of these rules is obligatory, but test authors should be minded that it will be easier to gain working group consensus if they follow these rules.
Tests should normally be expressed in RDF/XML.
The following RDF/XML grammar rules [RDF/XML Syntax] are not used:
xml:base
Test and manifest files should have an xml:base
attribute
[XMLBASE]
on
the document element. This should show the preferred URL
of the document, from which it is actually retrievable.
Files that contain no relative URIs may omit the xml:base
attribute.
Test and manifest files should use the ".rdf"
suffix. URIs should not. The URL used for xml:base
declarations
does not have a suffix.
example
Domains
All URLs in the test and manifest files should be retrievable web resources
except for those that use domain names with "example"
as the penultimate
component (e.g. "http://www.example.org/ontology#prop"
).
The following copyright statement should be included as an XML comment in every test file:
<!-- Copyright World Wide Web Consortium, (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). All Rights Reserved. Please see the full Copyright clause at <http://www.w3.org/Consortium/Legal/copyright-software.html> $Id: This string is updated by cvs. $ -->
The description should:
The description should be included as an XML comment in each test file, and be included as RDF content in the Manifest file.
Tests that relate principally to some owl property or class, should be put in a directory named using the local name of that property of class.
Otherwise, tests that relate to an issue should be put in a directory
named like I3.4
where the issue number is taken from the OWL issue list
[OWL Issues].
Each directory should contain tests numbered consecutively from 001
.
No two tests in a single directory should have the same number.
Each file in a test should have the number of the test at the end of its name, before the suffix.
The rest of the file name should follow the conventions for the test type.
Note: the approved tests in a directory will not necessarily be contiguously numbered.
Note: this differs from the RDF Core test case numbering conventions.
This section repeats the normative tests.
This time the test data is shown in simple triples, using N-triple syntax [RDF Test Cases] with qnames. Qnames are used in place of URIs in the syntax with no delimiters. This syntax conforms with the usage in N3 [N3], the namespace prefixes are also declared using N3 syntax [N3].
Relative URLs in the triples are with respect to the following base:
http://www.w3.org/2002/03owlt/
.
The following namespace prefixes are used throughout:
rdf
http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs
http://www.w3.org/2000/01/rdf-schema#
owl
http://www.w3.org/2002/07/owl#
xsd
http://www.w3.org/2005/XMLSchema#
first
#
second
#
In the N3 syntax [N3] used for namespace declarations, the first four appear as follows:
Namespaces: |
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix xsd: <http://www.w3.org/2005/XMLSchema#> . |
Other namespaces are explicitly listed with the test data.
These tests are ones that are either known from the literature (specifically from [DL ref-1] and [DL ref-2]), or from test suites contributed by DL implementors (specifically some group and some other group).
Some actual tests in this category ...
These tests, taken from the [OWL Guide] are ones that do not fit any other category.
wine.owl, and food.owl by reference rather than verbatim ...
There is no expectation that any implementation will successful run the tests in this section; any that do gain extra credit.
The intent is to illustrate the semantics of OWL, particularly OWL Full, as specified by [OWL Abstract Syntax and Semantics], with the specific goal of showing that it is possible to say things that it is not reasonable to expect an implementation to completely understand.
Some actual tests in this category ... Tests concerning prime factorization. tests concerning dominos and transitiveproperties with cardinality constraints. Tests concerning peculiar extensions of the OWL vocabulary.
These tests are ones that are either known from the literature (specifically from [DL ref-1] and [DL ref-2]), or from test suites contributed by DL implementors (specifically some group and some other group).
Some actual tests in this category ...
These tests, taken from the [OWL Guide] are ones that do not fit any other category.
wine.owl, and food.owl by reference rather than verbatim ...
There is no expectation that any implementation will successful run the tests in this section; any that do gain extra credit.
The intent is to illustrate the semantics of OWL, particularly OWL Full, as specified by [OWL Abstract Syntax and Semantics], with the specific goal of showing that it is possible to say things that it is not reasonable to expect an implementation to completely understand.
Some actual tests in this category ... Tests concerning prime factorization. tests concerning dominos and transitiveproperties with cardinality constraints. Tests concerning peculiar extensions of the OWL vocabulary.
This section repeats the tests of the previous section.
Relative URLs in the triples are with respect to the following base:
http://www.w3.org/2002/03owlt/
.
The following namespace prefixes are used throughout:
rdf
http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs
http://www.w3.org/2000/01/rdf-schema#
owl
http://www.w3.org/2002/07/owl#
xsd
http://www.w3.org/2005/XMLSchema#
first
#
second
#
In the N3 syntax [N3] used for namespace declarations, the first four appear as follows:
Namespaces: |
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix xsd: <http://www.w3.org/2005/XMLSchema#> . |
Other namespaces are explicitly listed with the test data.
These tests are ones that are either known from the literature (specifically from [DL ref-1] and [DL ref-2]), or from test suites contributed by DL implementors (specifically some group and some other group).
Some actual tests in this category ...
These tests, taken from the [OWL Guide] are ones that do not fit any other category.
wine.owl, and food.owl by reference rather than verbatim ...
There is no expectation that any implementation will successful run the tests in this section; any that do gain extra credit.
The intent is to illustrate the semantics of OWL, particularly OWL Full, as specified by [OWL Abstract Syntax and Semantics], with the specific goal of showing that it is possible to say things that it is not reasonable to expect an implementation to completely understand.
Some actual tests in this category ... Tests concerning prime factorization. tests concerning dominos and transitiveproperties with cardinality constraints. Tests concerning peculiar extensions of the OWL vocabulary.
Most of these issues will be ignored.
Jtidy reported 1 warnings in CVS/.
Jtidy reported 1 warnings in oneOf/.
Jtidy reported 1 warnings in AllDistinct/.
Jtidy reported 1 warnings in I3.4/.
Jtidy reported 1 warnings in I4.1/.
Jtidy reported 1 warnings in FunctionalProperty/.
Jtidy reported 1 warnings in disjointWith/.
Jtidy reported 1 warnings in someValuesFrom/.
Jtidy reported 1 warnings in maxCardinality/.
Jtidy reported 1 warnings in intersectionOf/.
Jtidy reported 1 warnings in TransitiveProperty/.
Jtidy reported 1 warnings in I3.2/.
Jtidy reported 1 warnings in umlp/.
Jtidy reported 1 warnings in editors-draft/.
Jtidy reported 1 warnings in oneOfDistinct/.
Can suffix be removed from URI: false.rdf
Jtidy reported 7 errors in webont-issues.
Jtidy reported 1 warnings in imports/.
Jtidy reported 1 warnings in cardinality/.
Jtidy reported 1 warnings in allValuesFrom/.
Jtidy reported 1 warnings in Nothing/.
Jtidy reported 1 warnings in SymmetricProperty/.
Jtidy reported 1 warnings in I5.1/.
Jtidy reported 1 warnings in I5.3/.
Jtidy reported 1 warnings in I5.5/.
Jtidy reported 1 warnings in I4.6/.
Jtidy reported 1 warnings in samePropertyAs/.
Jtidy reported 1 warnings in complementOf/.
Unimplemented - non trivial ManifestLoader.getText()
Jtidy reported 1 warnings in InverseFunctionalProperty/.
Jtidy reported 214 warnings in webont-issues.
Jtidy reported 1 warnings in bin/.
Jtidy reported 1 warnings in 03owlt/.
Jtidy reported 1 warnings in inverseOf/.
Jtidy reported 1 warnings in qualified-cardinality-constraints/.
Jtidy reported 1 warnings in unionOf/.
Jtidy reported 1 warnings in I5.24/.
Jtidy reported 1 warnings in sameClassAs/.
Jtidy reported 1 warnings in differentFrom/.
Can the descriptions of approved tests be quotes from other (normative) documents?
Check descriptions for appropriate links to other OWL specs.
Add automatic checking of filenames.
Use relative URLs for some of the imports tests in triple form, to stop them exceeding page widths limits.
Jeremy Carroll thanks Oreste Signore, his host at the W3C Office in Italy and Istituto di Scienza e Tecnologie dell'Informazione "Alessandro Faedo", part of the Consiglio Nazionale delle Ricerche, where Jeremy is a visiting researcher.
The following people have contributed tests to this document: list to be created - in quantitive order.
This section is only for WG review, and gives the changes since the version available for the January face-to-face.
Extensive change to status of this document.
Change intro to be subsidiary only on ASS, and not on OWL Reference.
Weakened change process to only kick in after Proposed Rec.
Clarified monotonicity of change process.
Added test type TrueTests (editorial change) and OWLforOWL tests.
Deleted miscellaneous test type.
complete rewrite of conformance and running the tests sections.
Added contributors to the acknowledgements
Updated copyright statements
Changed approval process to not require review, but to indicate that implementation experience counts. Also specifically mentioned Carroll propose, De Roo verifies.
Permitted the use of relative URLs in the triples form of the tests.
Added extra sections to the test case parts: misc, dl, extra credit. Note in the final document there won't be a proposed tests section, so the duplication of the text will be reduced.
Polishing of abstract and intro - vis-a-vis conformance statements
Other minor polishing
The following refs were not defined: