On 25/10/2010, at 3:12 PM, Bob Morris wrote:
Steve misinterprets me. My warning is not that a term always applies to a certain type of resource by asserting that the term has an rdfs:domain. It is that a term is given an rdfs:domain then that term \only/ applies to a resource that is of rdf:type that domain. That is the formal semantics of rdfs:domain. It is somewhat the opposite of the usual meaning of "domain" as used by mathematicians. My position is that it should not be done without substantial thought, because it closes the world somewhat, and the open world assumption is a hallmark of rdf.
And because the meaning is somewhat the opposite of what you expect, it's easy to say something you didn't mean. At the risk of teaching my grandmother to suck eggs, in OWL:
if a property P is declared to have a domain T: It is *not* the case that every instance x of T *must* have a value for property P. It is *not* the case that any x having property P *must* be declared as having type T. It is *not* the case that any x having property P *must not* be declared as having any other type.
According to the spec: "9.2.5 Object Property Domain: ObjectPropertyDomain( OPE CE ) states that ... if an individual x is connected by OPE with some other individual, then x is an instance of CE."
That is: "P domain T" and "x P whatever" -> "x hasType T", in addition to any other types x might also have.
Very much the opposite of what people accustomed to computer languages expect: "int x;" normally means you cannot put a string into x. In owl it means that if you put a string into x, then that string is an int. My first reaction was: what's the use of that? Everything would eventually get typed as everything! The important bit is that your vocabulary can also declare semantic rules. You can declare: that every instance x of T *must* have a value for property P: SubclassOf(T ObjectMinimumCardinality(1 P)) that any x having property P *must not* be declared as some other type T2: SubclassOf(ObjectMinimumCardinality(1 P) ObjectComplementOf(T2))
You can state that every Name has a nameComplete property, or that a Name is never a Specimen. If you do this, and somone uses your classes and properties wrongly, then a reasoner given that ontology (a set of rdf files and their imports closure) will conclude that it is *inconsistent*.
Without these extra rules, people using properties in a way that seems natural to them can inadvertently say things they probably didn't mean. If you declare that nameComplete has a domain of Name, then someone using it to attach a name to a specimen is not accomplishing what they thought they were accomplishing "But I just wanted to say that this is the complete name of the specimen!".
But what's the alternative? People are always going to misinterpret things unless the property names are entire sentences. Perhaps a "strict" vocabulary and a "loose" vocabulary, with identically-named properties, the strict ones being declared as subproperties of the loose ones. Or maybe at the end of the day it is simply correct to reply "No, you ought not use properties from the TDWG TaxonName namespace to decorate Specimen records. Sorry. You'll need to choose something else appropriate.". There's nothing at all to stop anyone from declaring their own vocabularies.
I suppose the point is: * these sorts of issues don't really become issues at the mechanical layer until someone starts to write reasoning rules. * a hasDomain declaration *is* an OWL reasoning rule, it isn't just an annotation or a comment, and you can't ignore the implications of doing it. * OWL perhaps provides a concrete formalism for some of the discussions here - well beyond simply being able to declare properties and annotate them * that formalism is a little tricky and can be counterintuitive
=================================
Here's a simple example (using the RDF serialisation) that can be read into Protege. The reasoner likes it, and deduces that x is a T. If you comment out the indicated line, the reasoner concludes that Nothing is a Thing (you can deduce anything from an inconsistent ontology).
<?xml version="1.0"?> <rdf:RDF xmlns="http://foo#" xml:base="http://foo" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
<owl:ObjectProperty rdf:about="#P1"> <rdfs:domain rdf:resource="#T"/> </owl:ObjectProperty> <owl:ObjectProperty rdf:about="#P2"/> <owl:Class rdf:about="#T"> rdfs:subClassOf owl:Restriction <owl:onProperty rdf:resource="#P2"/> <owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger%22%3E1</owl:cardinality> </owl:Restriction> </rdfs:subClassOf> </owl:Class> <owl:Thing rdf:about="#x"> <P1 rdf:resource="#y"/> <P2 rdf:resource="#y"/> <!-- comment out this line --> </owl:Thing> <owl:Thing rdf:about="#y"/> </rdf:RDF>
------ If you have received this transmission in error please notify us immediately by return e-mail and delete all copies. If this e-mail or any attachments have been sent to you in error, that error does not constitute waiver of any confidentiality, privilege or copyright in respect of information in the e-mail or attachments.
Please consider the environment before printing this email.
------