W3C home > Mailing lists > Public > public-owl-dev@w3.org > July to September 2007

Re: declaredAs

From: Boris Motik <bmotik@cs.man.ac.uk>
Date: Mon, 30 Jul 2007 18:55:11 +0100
To: <public-owl-dev@w3.org>
Message-ID: <003701c7d2d2$c6682e70$27c35882@wolf>
Hello,

 

I have just taken a look at this declaredAs issue, and wanted to (I)
highlight a potential problem that might arise if we conflate typing and
declaredness, (II) summarize the discussion about the problems of the
existing solution, and (III) propose a new solution.

 

--------------------

I: The Problem

--------------------

 

Our main reason for introducing declarations was to be able to detect typos.
Unrelated to this, we need explicit typing information to be able to parse
the ontology. If we conflate the two notions, we have problems, which are
particularly acute if we also use imports. Consider the ontology O1 that
contains the triple

 

(1)  a:myProp rdf:type owl:ObjectProperty

 

and the ontology O2 that imports O1 and additionally contains the triples

 

(2)  a:x1 owl:someValuesFrom a:myConcept

(3)  a:x1 owl:onProperty a:myPrp           (<= notice the typo!).

 

 

The ontology O2 is not parsable by itself, because we do not know what is
a:myPrp: it could be either a data or an object property. There are several
ways to fix this.

 

One possibility would be, when parsing O2, to also parse O1 and look for
typing statements. In this particular example, when parsing O2, we should
also parse O1 and, since O1 does not determine the type for a:myPrp, we
would raise a parse error. Had we spelled a:myPrp correctly in O2, we would
obtain the typing information from O1. This solution really is very complex
to implement (just imagine ontologies with cyclic imports!) and is bad for
performance. In fact, when I implemented it in KAON2, I could not believe
how hard it was. 

 

To make writing OWL/RDF parsers easier, it seems that we should allow each
file to be parsed separately. Thus, in OWL 1.1 we would expect O2 to contain
an explicit typing statement for each entity. Hence, we should add to O2 the
following triple:

 

(4)  a:myPrp rdf:type owl:ObjectProperty

 

The ontology O2 now contains all the information that we need to parse it.
Unfortunately, we now cannot detect the typo any more since a:myPrp has been
declared in O2! To summarize, if typing statements are also declarations,
then all objects are automatically declared in the ontology that they are
used in. This prevents us from detecting typos, and this is more pronounced
when we are using imports.

 

In order to fix problems such as the one presented here, in OWL 1.1 we chose
to separate the notion typing (which is just a helper for the RDF parser and
is actually not reflected in the structural specification of OWL 1.1) from
declarations (which are first-class citizens in the structural
specification) by introducing owl11:declaredAs.

 

 

 

 

----------------------------------------------------

II: My interpretation of the discussion so far

----------------------------------------------------

 

If I am not mistaken, one of the main complaints about the existing
situation of OWL 1.1 was that we are not backwards compatible with OWL 1.0.
In particular, the problem arises if the original ontology contains "naked"
URIs (i.e.,  URIs that occur only in rdf:type statements and not in some
other axiom). According to the existing RDF mapping, when you convert such
an ontology into the structural specification, you loose all "naked" URIs.

 

 

 

 

----------------------------------------

III: A possible fix to the problem

----------------------------------------

 

In order to have a clear mechanism for checking for typos, I propose to
stick with declaredAs. The above example thus would not contain any
declarations, which, in fact, is compatible with OWL 1.0 (namely, OWL 1.0
does not contain declarations, and checking for typos is virtually
impossible).

 

To prevent the problems that have been pointed out and which I summarized in
Section II, we could change the RDF mapping as follows: If some URI x occurs
in a triple that is not of the form <x, rdf:type, owl:Class |
owl:ObjectProperty | owl:DataProperty>, then do nothing for x; otherwise, if
x occurs only in such triples, then convert each such triple into a
corresponding declarations. Effectively, this would mean that "naked" URIs
would be considered to be declared in the ontology that they are used in,
whereas typing statements for "non-naked" URIs are treated just as parsing
hints.

 

This alone would have a drawback that reading an OWL 1.0 document containing
"naked" URIs would create declarations, which are not part of OWL 1.1; thus,
when you saved the document back to RDF, you would not and up with OWL 1.0.
To correct this problem, I propose the following solution: When serializing
an OWL 1.1 ontology into RDF, if an URI x occurs only in a declaration, then
we serialize the declaration using rdf:type instead of owl11:declaredAs.

 

 

 

This solution seems to capture the intuition behind the typing statements of
"naked" URIs in OWL 1.0: such typing statements usually are meant to be
declarations. Furthermore, this solution allows us to parse each ontology
file by looking just at the triples in that file. Finally, we still have a
clean separation between typing and declaration statements, which allows us
to address situations such as the one I outlined in Section I.

 

 

 

How do you feel about this proposal?

 

Sincerely yours,

 

      Boris

 

 
Received on Monday, 30 July 2007 17:55:58 GMT

This archive was generated by hypermail 2.3.1 : Wednesday, 27 March 2013 09:32:54 GMT