W3C home > Mailing lists > Public > www-rdf-interest@w3.org > October 2000

Re: definition of domain

From: Jeen Broekstra <jbroeks@cs.vu.nl>
Date: Thu, 12 Oct 2000 12:21:24 +0200 (CEST)
To: Tom Van Eetvelde <tom.van_eetvelde@alcatel.be>
cc: www-rdf-interest@w3.org
Message-ID: <Pine.GSO.4.20.0010121134480.17009-100000@flits.cs.vu.nl>
On Thu, 12 Oct 2000, Tom Van Eetvelde wrote:

> I wonder why in the RDFS specification, 'domain' is defined as follows:


> What I find a bit unfortunate is the fact that a defined
> property may only be used on instances of the class mentioned
> in the domain. I believe the property should also be applicable
> for aubclasses of the class in the domain.

It is. In the definition of subClassOf it states:

    2.3.2. rdfs:subClassOf

    This property specifies a subset/superset relation between
    classes. The rdfs:subClassOf property is transitive. If class
    A is a subclass of some broader class B, and B is a subclass
    of C, then A is also implicitly a subclass of C.
    Consequently, resources that are instances of class A will
    also be instances of C, since A is a sub-set of both B and C.

I have added the RDF descriptions of your examples below, with
some comments.

> E.g. suppose the following is defined:
>  *  class 'animal'

    <rdfs:Class ID="animal"/>

>  *  property 'eats' with domain animal

    <rdf:Property ID="eats">
	<rdfs:domain rdf:resource="#animal"/>

> I would like to introduce now the class 'carnivore' as subclass of animal
> with the restriction that 'carnivore' only eats 'animal'.

This is not possible in RDFS. You can not restrict domain/range
of a property locally (= in a class definition).  The best you
can do is the introduction of a new property:

    <rdfs:Class ID="carnivore">
	<rdfs:subClassOf rdf:resource="#animal"/>

    <rdf:Property ID="carnivore_eats">
	<rdfs:subPropertyOf rdf:resource="#eats"/>
	<rdfs:domain rdf:resource="#carnivore"/>
	<rdfs:range rdf:resource="#animal"/>

The gazelle:

    <rdf:Description about="#gazelle">
	<rdf:type rdf:resource="#animal"/>

And your lion would look like:

    <rdf:Description about="#lion">
	<rdf:type rdf:resource="#carnivore">
	<carnivore_eats rdf:resource="#gazelle"/>

or, alternatively:

    <rdf:Description about="#lion">
	<rdf:type rdf:resource="#animal"/>
	<eats rdf:resource="#gazelle"/>

> a lion is of type animal, lion eats gazelle which is of type
> animal, so lion is a carnivore. 

Unfortunately, this inference is not possible, for a number of

    1. As said before, the property range restriction you propose
       is not possible. You can only introduce a new property.
    2. Even if it were possible, the facts that:
	a) lion is an animal
	b) it eats a gazelle
	c) a gazelle is an animal
       are not enough to infer that lion is a carnivore. 
       I'll abstract from the animals example:

       Suppose we have a class C and a subclass C', and we have
       property P which we can apply to C and C', but in C' its
       range is restricted to C. Also assume we have an instance
       c of C, and and instance d of C, and we know P(c,d). We
       still can not infer that c is an instance of C', because
       we do not know whether _only_ instances of C' can have
       instances of C as the value of a property P.

       Back to zoo-speak:

       We do not know whether carnivores are the only animals
       that eat other animals.
> So in fact, you actually narrow the class 'animal' by narrowing
> the range of its properties

This narrowing of the range is only possible at a global
level[1]. That means that if you narrow the range for eats, you
do that not only for carnivores but also for every other class
that uses that particular property.

> I believe this could also make the slotconstraints in the 'OIL
> to RDFS translation' a bit more natural.

The problem stated above is exactly the reason we introduced
slotconstraints in the RDFS syntax of OIL in the first place :)



[1] Notice, that in the current spec range restrictions like this
are not possible at all, since it is explicitly required that
only one range statement is made over a property. However, given
recent discussions, I assume that this will change.
                               Vrije Universiteit, Faculty of Sciences
Jeen Broekstra              Division of Mathematics & Computer Science
jbroeks@cs.vu.nl                                    de Boelelaan 1081a
http://www.cs.vu.nl/~jbroeks        1081 HV Amsterdam, the Netherlands
Received on Thursday, 12 October 2000 06:22:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:07:32 UTC