Declarativa Declarativa
 

 

Entrada

Produtos

Serviços

Inquiridor
Aplicações internet à medida
Auditoria informática
Subcontratação para I&D

Plataforma de conteúdos

Tecnologia

Web Information Systems
Web Application Maker
InterProlog

A empresa

Apresentação institucional
Declarativa Declarativa

How to download and install XSB Prolog for use with InterProlog

XSB has built-in support for InterProlog, which needs to be specified on installation.

Windows 2000, XP

Linux Red Hat 9, Mac OS X (10.3 and later)

Download the Windows precompiled XSB Prolog 2.7.1 or later from xsb.sourceforge.net (if you need to use version 2.6 make sure to pick the XSB-2.6_win_interprolog_fixed.zip file)

Extract the whole 'xsb' file tree into some directory MY_XSB_DIR. 

See if it works in a command shell window, by typing MY_XSB_DIR\config\x86-pc-windows\bin\xsb 

You should obtain something like this:
XSB Version 2.6 (Duff) of June 24, 2003
[x86-pc-windows; mode: debug; engine: slg-wam; gc: indirection; scheduling: local]
| ?- 

Download XSB Prolog from xsb.sourceforge.net (make sure to pick the compressed tar file here)

Extract the whole 'xsb' file tree into some directory MY_XSB_DIR. 

InterProlog works better with XSB 2.7.1 and later. The following applies only for XSB 2.6:

Apply this small patch to MY_XSB_DIR/emu/std_pred_xsb_i.h, a bug fix (courtesy of XSB Inc.) which didn't make it in time for the XSB 2.6 release. This will only affect the InterProlog JNI interface for XSB 2.6 and JDK 1.4.2. Earlier JDK versions and later XSB dispense the patch.

The following applies only to Mac OS X:  

First, notice that Java and JNI headers are in peculiar locations (cf. Apple's FAQ), such as /System/Library/Frameworks/JavaVM.framework/Headers. 

Second, it is necessary to alter the XSB make process so that the proper gcc options are used building the dynamic library. There's probably a better way to do this, but the following worked for me; find this in MY_XSB_DIR/build/emuMakeFile.in:

xsbdynmod::
echo "Making XSB Shared Library $(bindir)/libxsb.so"
@LD@ -o libxsb.so -shared $(LINKFLAGS) $(OBJS) ${ODBCOBJ} ${INTERPROLOGOBJ}
@cp libxsb.so $(bindir) 2>/dev/null || echo ""

...and edit to something like:

xsbdynmod:: 
echo "Making XSB Shared Library $(bindir)/libxsb.jnilib, MacOS 10.3 style" 
gcc -o libxsb.jnilib -dynamiclib -single_module -nostartfiles $(OBJS) ${ODBCOBJ} ${INTERPROLOGOBJ} 
@cp libxsb.jnilib $(bindir) 2>/dev/null || echo ""

Follow the steps in the XSB INSTALL document, but requesting InterProlog support and generation of the XSB dynamic library:

cd MY_XSB_DIR/build
./configure --with-interprolog --site-includes='MY_JAVA_DIR/includes MY_JAVA_DIR/includes/linux'

./makexsb

So far you should have enough to use the InterProlog sockets implementation for XSB working (XSBSubprocessEngine). 

The next step builds the shared library necessary for the InterProlog JNI implementation to work (NativeEngine):

./makexsb dynmodule

Make sure all this runs without errors.

See if XSB Prolog works in a command shell window, by typing the command indicated at the end of makexsb, something like MY_XSB_DIR/config/i586-pc-linux-gnu/bin/xsb

You should obtain something like this:
XSB Version 2.6 (Duff) of June 24, 2003
[i586-pc-linux-gnu; mode: debug; engine: slg-wam; gc: indirection; scheduling: local]
| ?- 

You can now continue installing InterProlog.


 Declarativa - Serviços de Informática, Lda.
  www.declarativa.com, info@declarativa.com  fax: +351-22-030-1511  tel: +351-22-030-1580
UPTEC - Parque de Ciência e Tecnologia da Universidade do Porto (GoogleMap)
Rua Actor Ferreira da Silva 100 4200-298 Porto Portugal