[an error occurred while processing this directive] Running Wilbur and RACER together [an error occurred while processing this directive]

Running Wilbur and RACER from the same Lisp

Note: This document only applies to RACER version 1.7 and the alpha (and as of now only) version of Wilbur. All code was tested only on Allegro Common Lisp version 6.2.

Wilbur is an RDF and DAML parser. RACER is a description logic reasoner capable of grokking RDF and DAML code. Both are written in Lisp.

It is natural to use both from the same program, for example to fetch triples from an RDF file using Wilbur, and make inferences about them from RACER. However, out of the box, this will not work. You will get the error host "wilbur-www" unknown in hosts.cl, or something of this sort. This is simply, as far as I could tell, a naming disagreement between the two utilities. Wilbur's wilbur.system file only defines the host "wilbur", and not "wilbur-www". In addition, what Wilbur's logical-pathnames refer to as core seems to be referred to as code in RACER. I don't really understand these problems, but here's how I fixed them :) In wilbur.system, add:

(setf (logical-pathname-translations "wilbur-www")
      '(("core;*.lisp"   "wilbur:base;source;*.*")
        ("core;*.lisp"   "wilbur:base;source;*.*")
        ("core;*.system" "wilbur:base;source;*.*")
        ("core;*.fasl"   "wilbur:bin;*.*")
        ("core;*.*"      "wilbur:base;*.*")
        ("code;*.lisp"   "wilbur:base;source;*.*")
        ("code;*.lisp"   "wilbur:base;source;*.*")
        ("code;*.system" "wilbur:base;source;*.*")
        ("code;*.fasl"   "wilbur:bin;*.*")
        ("code;*.*"      "wilbur:base;*.*")
        ("schemata;*.*"  "wilbur:base;schemata;*.*")
        ("base;**;*.*"   "~/semweb/wilbur/core/**/*.*")
        ("bin;**;*.*"    "~/semweb/wilbur/core/**/*.*")))
This does it for me. A sample run (RACER must be loaded first):
CL-USER(1): (load "/home/katz/semweb/racer/racer-1-7.fasl")
[..snip some irrelevant warnings..]
;;; RACER Version 1.7.6
;;; RACER: Reasoner for Aboxes and Concept Expressions Renamed
;;; Supported description logic: ALCQHIr+(D)-
;;; Copyright (C) 1998-2002, Volker Haarslev and Ralf Moeller.
;;; RACER comes with ABSOLUTELY NO WARRANTY; use at your own risk.
;;; Commercial use is prohibited; contact the authors for licensing.
;;; RACER is running on x86 computer as node jkatz 

;;; The XML/RDF/RDFS/DAML parser is implemented with Wilbur developed
;;; by Ora Lassila. For more information on Wilbur see 
;;; http://wilbur-rdf.sourceforge.net/.
T
CL-USER(2): (load "/home/katz/semweb/wilbur/core/source/wilbur.system")
; Loading /home/katz/semweb/wilbur/core/source/wilbur.system
; Compiling system: "Wilbur RDF processor and frame system".
;   Compiling system: "Wilbur utilities for Common Lisp".
;   Compiling system: "Nokia CL-XML".
;   Compiling system: "Nokia CL-RDF and CL-DAML".
;   Compiling system: "Ivanhoe RDF frame system".
; Loading system: "Wilbur RDF processor and frame system".
T
CL-USER(3): (setf wilbur::*db* (make-instance 'wilbur::db))
#
CL-USER(4): (wilbur:load-db "http://slashdot.org/slashdot.rdf")
;   Fast loading from bundle code/acldns.fasl.
#
!"http://my.netscape.com/rdf/simple/0.9/"
NIL
CL-USER(5): (daml-read-file "/home/katz/semweb/xslt-project/experimental/user-and-admin.rdf")
USER-AND-ADMIN
CL-USER(6): (all-individuals)
(|http://www.mindswap.org/~katz/xslt-project/user-and-admin.daml#A1|
 |http://www.mindswap.org/~katz/xslt-project/user-and-admin.daml#HowToConnectToTheInternet|
 |http://www.mindswap.org/~katz/xslt-project/content-def.daml#DetailedText|
 |http://www.cs.umd.edu/projects/plus/DAML/onts/docmnt1.0.daml#Manual|)
It works! If you end up getting errors like:
CL-USER(3): (setf wilbur::*db* (make-instance 'wilbur::db))
Error: `NIL' is not of the expected type `ARRAY'
  [condition type: TYPE-ERROR]

Restart actions (select using :continue):
 0: Return to Top Level (an "abort" restart).
 1: Abort entirely from this process.
CL-USER(4): (exit)

Error: XML -- syntax error (why: ()
  [condition type: SYNTAX-ERROR]

Restart actions (select using :continue):
 0: Return to Top Level (an "abort" restart).
 1: Abort entirely from this process.
That means you loaded Wilbur before RACER.

If you have any questions or comment please don't hesitate to email me at katz@underlevel.net. [an error occurred while processing this directive]