7 Interfacing .NET and Java

SICStus Prolog supports two different ways of interfacing a Prolog program with a Java client, and one for interfacing with a .NET client.

SICStus Prolog provides a uniform way of interfacing to Java and .NET clients via the PrologBeans (see lib-prologbeans) interface. This is a loosely coupled interface, which means that the client code runs in a different process from the Prolog code. In fact, the client program and the Prolog program can run on separate machines, since the communication is done via TCP/IP sockets. This design has the following advantages over a tightly coupled interface, where they run in the same process:

The main limitation of the design is that callbacks from Prolog to the client is not provided for.

PrologBeans is the recommended package unless you have special needs and are interfacing with Java in which case you may consider using Jasper.

For interfacing to Java clients SICStus Prolog also provides Jasper (see lib-jasper), a “tightly coupled” interface. This means that everything runs in the same process (the necessary code is loaded at runtime via dynamic linking).

Advantages of Jasper:

Send feedback on this subject.