Yajxb (Yet another Java-XSB Bridge)

What is Yajxb?

Yajxb realizes a connection fom Java to XSB. In contrast to InterProlog, using Yajxb causes Java to call XSB directly via Java's native interface mechanism.

Why should I use Yajxb?

If you want to use XSB within Java and for some reason don't want to use InterProlog, Yajxb is something you might want to try. I wrote it because I needed an inference core for our Semi-Structured Data Query and Inference Language Triple and InterProlog did not really work for me.

Can I call Java from XSB?

Not yet.

Does it run under Linux?

Yes.

Does it run under Microsoft Windows?

I don't know. Actually, it should - the C code looks pretty OS independent. Anyone with a C Compiler for Microsoft Windows out there?

What are the caveats?

Java loads the XSB system as a shared library. During inital loading, when using XSB Java sometimes crashes nondeterministically (4-10% of loading trys). All I can say so far is, that it seems it is not my fault. Once it is loaded, everything works fine. I hope this get fixed in a future version.

What is the license model?

You can use it for whatever you want - as long as you give me some credit. A longish version of the previous sentence is also available.

How do I install it?

Download and Install XSB 2.3.
Download Yajxb from http://www-db.stanford.edu/~stefan/rdf/yajxb/yajx b-20010310.tar.gz.
Ungzip und untar Yajxb in the directory, where the main XSB directory resides (XSB).
Change the file 'setjava' according to your settings.Do 'source ./setjava'.
Change the Makefile according to your settings (this should mean you just have to change the LOCAL and JAVA_INC settings).
Create a folder 'lib'.
Type 'make all'.
Edit XSBHello.java . Change the path in the XSB initialization parameters according to your settings.
Type 'javac XSBHello.java' and 'java XSBHello'.
You should get:
hello
world

(What else?)

XSBHello.java should give you an idea of how to use Yajxb.
Look at the source of the class edu.stanford.db.xsb.XSBCore for more information about the interface.

Who is the one to blame?

Stefan Decker (stefan@db.stanford.edu)

March 10, 2001