W3C home > Mailing lists > Public > public-owl-wg@w3.org > November 2007

All about imports

From: Bijan Parsia <bparsia@cs.man.ac.uk>
Date: Thu, 29 Nov 2007 14:19:56 +0000
Message-Id: <70484C1D-4A28-4EB7-8062-FAE426B1FEF5@cs.man.ac.uk>
To: OWL WG <public-owl-wg@w3.org>

(I never get official actions. Bleah.)

This is to kick off discussion of owl:imports. Imports was a  
controversial feature in the WebOnt Working Group (being subject to  
some formal objections) and are somewhat confusing (something I  
believed about them for a long time was just revealed to me to have  
been totally wrong; i.e., I presumed partially based on tool behavior  
that imports were location based). Furthermore, since OWL went rec,  
there have been other developments (including XInclude)

                                       ====OWL 1.0====
Looking at the normative statements about owl:imports in OWL 1.0  
<http://www.w3.org/TR/owl-semantics/>:

 From section 2.1:
	There are also several built-in ontology properties; they are  
owl:imports, owl:priorVersion, owl:backwardCompatibleWith, and  
owl:incompatibleWith. Ontology annotations that use owl:imports have  
the extra effect of importing the target ontology.
[[This is in a normative section but seems to be informative.]]

And from 3.4:
	Aside from this local meaning, an owl:imports annotation also  
imports the contents of another OWL ontology into the current  
ontology. The imported ontology is the one, if any, that has as name  
the argument of the imports construct. (This treatment of imports is  
divorced from Web issues. The intended use of names for OWL  
ontologies is to make the name be the location of the ontology on the  
Web, but this is outside of this formal treatment.)

[[This is the normative claim about imports in the direct semantics.  
Note that this is a *name based* account, though the suggestion is  
that it is location oriented with names being locations. In practice,  
I think it's often location oriented with no "name checking".]]

 From 5.3:
	Definition: Let K be a collection of RDF graphs. K is imports closed  
iff for every triple in any element of K of the form x owl:imports  
u . then K contains a graph that is the result of the RDF processing  
of the RDF/XML document, if any, accessible at u into an RDF graph.  
The imports closure of a collection of RDF graphs is the smallest  
import-closed collection of RDF graphs containing the graphs.

[[This seems entirely location based! Thus, location based behavior  
is, perhaps, legal, but in OWL Full. Bleargh!]]

 From section 2.1, we should note, that ontology ids are optional. By  
2.1 and 3.4 these would be unimportable in OWL DL (at least), but  
importable under OWL Full (assuming you had them accessible at the  
appropriate URI).

                                       ====OWL 1.1====
 From <http://www.w3.org/2007/OWL/wiki/Syntax>

 From section 3:
	In OWL 1.0, owl:imports was a special annotation URI, which denotes  
that an ontology imports another ontology. In OWL 1.1, imports are  
not ontology annotations, but are a separate primitive, as discussed  
next; the owl:imports annotation property has no built-in meaning.

	Each ontology contains a possibly empty set of import declarations.  
An ontology O directly imports an ontology O' if O contains an import  
declaration whose value is the ontology URI of O'. The relation  
imports is defined as a transitive closure of the relation directly  
imports. The axiom closure of an ontology O is the smallest set  
containing all the axioms of O and of all ontologies that O imports.  
Intuitively, an import declaration specification states that, when  
reasoning with an ontology O, one should consider not only the axioms  
of O, but the entire axiom closure of O.

[[Clearly name based.]]

This is the only mention I could find.

                                       ==== Tool Behavior ====

[[Test case infrastructure needs reaching critical!!! Can we settle  
this soonish?]]

The only existing test I could find was:
	http://www.w3.org/TR/owl-test/byFunction#function-imports

I was not able to find any import level tests:
	http://www.w3.org/TR/owl-test/#testImportLevel

[[Pointers to more tests welcome.]]

You can run the test in Pellet (at least) with the following command  
line invocation (on macs/unix):

./pellet.sh -if http://www.w3.org/2002/03owlt/imports/premises001 -c  
TREE -r -cf http://www.w3.org/2002/03owlt/imports/conclusions001 -s OFF

This will show Socrates in the class hierarchy under Man and will  
confirm the entailment ("Entailed: Yes")

I created two test cases for imports level:
	[1] http://www.cs.man.ac.uk/~bparsia/owl/tests/testImports1.owl
	[2] http://www.cs.man.ac.uk/~bparsia/owl/tests/testImports2.owl

Which import the exact same file from two different URIs:
	[3] http://www.cs.man.ac.uk/~bparsia/owl/tests/testImported1.owl
	[4] http://www.cs.man.ac.uk/~bparsia/owl/tests/testImported2.owl

The argument to the owl:imports statement is [3] and [4]  
respectively, but the ontology in each is named [3] only.

Thus, [1] should be in OWL Lite. [2] should be in OWL Full (assuming  
no errors on my part). The WonderWeb validator[A] reports them both  
as Lite. As does the venerable online pellet demo[B]. Pellet 1.5.1  
cmd line reports the same.

One could modify the tests to have non-empty imported to see whether  
they, in spite of species issues, do the imports anyway.

Protege4 (webstart edition[C]) will load [3] when [1] is loaded, but  
will list [4] as not loaded by [3]. This is correct OWL 1.1 and OWL  
DL behavior, but not OWL Full behavior. I regard it as rather  
undesirable.

I've not made tests with multiple ontology elements (with different  
URIs).

                                       ==== Related Work ====

Since OWL 1.0 went to rec, XInclude has also gone to rec:
	http://www.w3.org/TR/xinclude/

We may want to allow this as an alternative (or replacement), or to  
use it in the XML syntax.

In XML Schema, the schemaLocation attribute provides (multiple) hints  
on where to find the schema:
	http://www.stylusstudio.com/w3c/schema0/schemaLocation.htm

So, we could give a name/location pair as the value, e.g.,
	<owl:Ontology>
		<owl:imports>
			http://www.cs.man.ac.uk/~bparsia/owl/tests/testImported1.owl
			http://www.cs.man.ac.uk/~bparsia/owl/tests/testImported2.owl
		</owl:imports>

(the first uri is the name, the second the location). I modeled this  
on the schemaLocation use of space delimited pairs, but we could have  
a more complex object.

Some W3C specs have an "inclusion/importing" distinction which  
generally has to do with visibility of elements. That's probably not  
relevant.

                                       ==== Conclusion ====

Some clean up is definitely needed. OWL 1.1 loses some functionality  
over OWL 1.0 (even if it is a full feature). At least some DL tools  
use OWL Full semantics for imports (i.e., location based importing).  
I personally don't see the value of name based importing in the  
absence of a hinting mechanism...and even then, the identity  
conditions of "ontologies" (as opposed to documents) are pretty weak.

There's a lot of recent work on segmenting ontologies, so some sort  
of solution for that, or at least hooks for solutions, would be  
nice.  One could define an XPointer scheme a la [D], or just work  
with structured values of imports statements, e.g.,

	<owl:Ontology>
		<owl:imports>
			<owl:ImportsManifest>
			    <owl:fromOntNamed><owl: Ontology rdf:about="http:// 
www.cs.man.ac.uk/~bparsia/owl/tests/testImported1.owl"></>
			    <owl:LocationHints>....</>
			    <upwardModuleForSignature>...list of terms...</>
			</owl:ImportedOntology>
		</owl:imports>


This discharges an action I was not assigned :)

Cheers,
Bijan.

[A] http://www.mygrid.org.uk/OWL/Validator
[B] http://www.mindswap.org/2003/pellet/demo.shtml
[C] http://protege.stanford.edu/fileshare/tredmond/webstart.html
[D] http://www.springerlink.com/link.asp?id=uphvk0wy2hfvjqqp
Received on Thursday, 29 November 2007 14:18:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:13:27 GMT