Re: declaredAs

Hi, Boris!

Boris Motik wrote on Mon, 30 Jul 2007 18:55:11 +0100:

> 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. 

In my opinion, the discussion here about declarations in OWL1.1 is 
centered to much on technical aspects (compatibility and the like). I 
want to change the focus more on the "do we really need it?" question.

When I am building an OWL ontology, I use a graphical modeling tool. 
When my ontology refers to the vocabulary of other ontologies via 
(direct or indirect) import statements, my modeling tool includes all 
the classes and properties defined there in the class and property 
hierarchy views. When I specify an axiom referring to a property from an 
imported ontology, I drag and drop the name of this property from the 
property view to the axiom I assemble. I normally do not write down 
names of resources which are already defined elsewhere. So I normally 
will not produce typos. But if I really produce typos (writing down 
names of existing resources is possible anyway for flexibility with my 
modeling tool), the modeling tool will find this out immediately and 
warns me in some form (for instance, it asks me to create the not 
existing resource). So in practice, typos are simply out of discussion 
for me.

And I do not regard tool based ontology modeling as a luxury, which one 
just /can/ do. I regard ontology authoring in OWL as such a hard task, 
that I cannot see any other way to perform it adequately, than by using 
such a graphical modeling tool, which at least ensures structural 
consistency of my ontology with regard to all imported ontologies.

It is not easy for me to see why someone wants to parse /single/ OWL 
files, when it includes import statements, instead of regarding the 
complete import graph as a complete ontology. Single file parsing might 
perhaps be useful sometimes to do some quick heuristic checks. But to 
know for sure, if everything is ok, I have to parse the complete thing, 
like I have to compile the complete Java source tree and not just every 
single class to see that everything matches well. Anyway, the last 
things I will wonder about in this discussion is, if OWL parser 
developing is a hard task, or if regarding the imports is an efficiency 
issue.

But even if I really should come in a situation where single file 
parsing turns out to be useful, I will certainly not start to fill my 
files with missing declarations, be it "abused" typing axioms, or be it 
declaredAs statements. Every such declaration will be doubling of 
information: Information, which already exists (in some form) in other 
ontologies: those ontologies which I am expected to import, but do not 
import them for some reason.

To better see the problem, we can ask what would be the "right" way to 
use declaredAs statements? (BTW: Has this already be discussed 
somewhere?) For a given OWL file, I would need to insert enough such 
declaration statements to provide the parser with all the information it 
needs to do proper structural consistency checking. Assume, I have an 
ontology design, where I have my complete ontology split into many small 
OWL files importing each other. Then I will possibly need a lot of such 
declaredAs statements in each of the files. And if I change any of these 
partial ontologies, I have to check if the set of declaredAs statements 
in each of the files is still adequate.

What a maintenance nightmare this will be! What a burden on the ontology 
author! And all this just to make life easier for the parser author?

No, it is not that I oppose declarations in OWL1.1 because of technical 
reasons like missing downwards compatibility. (I already get this 
problem with axiom annotations, which I do not oppose in general.) I 
oppose declaredAs statements because I do not see any /use/ for them. I 
think that many people will simply ignore them, perhaps not even know 
about this feature. And, possibly, those people who use them might be in 
danger of producing pretty badly designed ontologies. At least, they 
might be in danger to do a lot of redundant work.

To summarize: I do not regard declaredAs statements as a solution for 
the "abused typing axiom" problem, because I do not think that this 
abused typing axiom problem really exists! Why does it not exist? 
Because it is meant to be a solution for the "single file parsing with 
typos" problem. And this problem again does not, IMO, really exist! Why 
does it not exist? Because I believe that people should use graphical 
modeling tools which regard the complete ontology with all imports, not 
just fragments of the ontology.

So, you might say that your example was "just an example". But I 
currently do not see another - realistic and important - usecase for 
having declarations in OWL1.1. If you know any, please let me know. But 
if there really is no such usecase, than I strongly suggest to consider 
dropping declarations from the current draft of OWL1.1.

Cheers,
Michael


> --------------------
> 
> 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 Tuesday, 31 July 2007 21:11:27 UTC