W3C home > Mailing lists > Public > www-rdf-comments@w3.org > July to September 2002

Re: rdfs:subClassOf and metaclasses

From: Piotr Kaminski <piotr@ideanest.com>
Date: Mon, 01 Jul 2002 10:41:35 -0700
To: www-rdf-comments@w3.org
Message-id: <006d01c22127$87b82a70$ada15018@transfinity>

OK, let me give an example of what I would like to do, show how subclassing
may not always make sense, and propose a rule to prevent these situations.

Assume I'm working on a UML-like framework in RDF [1] (except not
stratified, of course).  The M0 models will represent actual instances (e.g.
objects in an app, people using the app, individual documents describing the
app).  The M1 models will describe classes of the above, and the M2 model
will describe the classes of classes.  The M0/M1 models change for each app,
but the M2 model is (more-or-less) fixed and is what I'm interested in

So let's concentrate on introducing the metaclasses of actors and documents:

Actor rdfs:subClassOf rdfs:Class
Document rdfs:subClassOf rdfs:Class

Then in the M1 model we can say:

Employee rdf:type Actor
Manager rdf:type Actor
Requirements rdf:type Document

And in M0 we might have:

Bob rdf:type Employee
Jim rdf:type Manager
Reqs-02-07-01 rdf:type Requirements

We could also say, in M1:

Manager rdfs:subClassOf Employee

That makes sense.  But apparently we could also say:

Requirements rdfs:subClassOf Employee

Which doesn't make sense to me.  How can the class of requirement documents
be a subclass of the class of employees?  They're not even the same "kind"
of class.

I see (at least) 3 possible answers:

1.  That's your problem, not RDFS'.  If you put enough constraints on the M2
metaclasses, any M1 class that tries to be an instance of some unrelated
bunch of them won't be able to have any M0 instances anyway.

2.  You shouldn't use rdfs:subClassOf for subclasses of rdfs:Class.
Introduce your own subproperty of it, and restrict it to pairs of matching

3.  Introduce a rule into RDFS prohibiting the situation above:

Define MA to be a metaclass of A iff A rdf:type MA and MA rdfs:subClassOf
rdfs:Class.  Then for all A and B such that A rdfs:subClassOf B, it must be
true that for all metaclasses MA of A and MB of B either MA = MB or MA
rdfs:subClassOf MB.

The rule is trivially true if both A and B are just instances of rdfs:Class,
which is probably true of 99% of classes out there.  But for metaclasses, it
prohibits the subclass relation from crossing the metaclass inheritance

Anyway, I'm still not sure this is a real problem, and which (if any) of the
solutions above might be appropriate, but I think it's worth discussing.

        -- P.

[1] I'm not actually working on such a framework, but it's a convenient
example.  It would be too convoluted to explain how I really ran into this

  Piotr Kaminski <piotr@ideanest.com> http://www.ideanest.com
  It's the heart afraid of breaking that never learns to dance
Received on Monday, 1 July 2002 13:48:32 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:15:18 UTC