From jan@swi.psy.uva.nl Wed Nov  7 14:40:12 2001
Received: from gollem.swi.psy.uva.nl (root@gollem [145.18.152.30])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id fA7DeCt12734;
	Wed, 7 Nov 2001 14:40:12 +0100 (MET)
Received: from localhost (localhost [[UNIX: localhost]])
	by gollem.swi.psy.uva.nl (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) id fA7DeCm07006;
	Wed, 7 Nov 2001 14:40:12 +0100
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Organization: SWI, University of Amsterdam
To: Bijan Parsia <bparsia@email.unc.edu>, prolog@swi.psy.uva.nl
Subject: Re: [SWIPL] [BUG] rdf_db declares bad rdfs namespace
Date: Wed, 7 Nov 2001 14:20:42 +0100
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
References: <Pine.A41.4.21L1.0111061813360.44290-100000@login6.isis.unc.edu>
In-Reply-To: <Pine.A41.4.21L1.0111061813360.44290-100000@login6.isis.unc.edu>
MIME-Version: 1.0
Message-Id: <01110714401200.05352@gollem>
Content-Transfer-Encoding: 8bit

On Wed, 07 Nov 2001, Bijan Parsia wrote:
>On Tue, 6 Nov 2001, Jan Wielemaker wrote:
>
>[snip]
>> Code on the twiki web should be seen as examples, not maintained
>> libraries.
>
>Sure....uhm...does that mean you don't want us to dicuss them here?

This depends.  For the RDF stuff the answer is possitive, as it is
ongoing work for me.  Some other code there is not much more than an
abandoned or at least sleeping track.

The RDF stuff is there because quite some people appear to be using
SWI-Prolog for its RDF parser and it might be useful to share some code 
doing something to what comes out of the parser.  rdf_db.pl and rdfs.pl
are two libraries I'm using in current projects.  For neither though
I claim the API is adequate or the implementation is complete.  I extend
them mostly on my needs and it would be nice if others did the same, so
eventually they become complete enough to incorporate into the normal
distribution.

>Should I avoid pointing to them from articles?

It's just fine to refer to them, but where appropriate, explain it is
just sample code.

>I'm working on a new XML.com article about SWI-Prolog and RDF, called
>"Expert System Backed Websites" (if anyone has a project that they'd like
>pointed to or highlighted in this article, please drop me a note!). Plan
>is to treat RSS1.0 + RDFS as a language for describing semantic networks.
>I'm not clear that rdfs.pl is actually going to be useful for this, though
>a modified version might be. (I still haven't gotten rdf_instance to
>recognize instances of subclasses.)

You've got to enumerate the subclasses first or later.  See
rdfs_domain/2.  Eventually there should be two calls, one for strictly
instance of this class and one for this class or a subclass thereof. 
The database probably needs some additional tables to make the latter
quick, given a large number of instances and classes.

>I note that the cache doesn't refresh if you add a class or subclass via
>rdf_assert, nor does it recognize that (just about) everything should be a
>member of rdfs:Resource. (All this is ok, this is just sample code, I
>know!)

There are other concerns.  The project I'm working with uses a large,
but fixed, set of schemas.  Trivial would be to add a call to flush the
cache.  Given the class structure in RDFS efficient caching an cache
updates are not really trivial.  I'd be glad if someone digs into this.

	Regards --- Jan

