views:

88

answers:

2

Hi there,

I am trying to use a a java-prolog layer on top of my current agent-based simulation. I am running Mac OS X Snow Leopard and Netbeans 6.9 and tried to use JPL from swi-prolog however I haven't managed to run a test successfully due to problems with the libraries and their paths. I need a very fast implementation and I was wondering if anyone has any benchmarks or personal experience with bidirectional java-prolog interfaces. Any comments on the topic would be appreciated.

Thanks Dimitri

A: 

Are you looking for a way to exchange messages efficiently between a java process and a prolog process?

I might recommend Google's Protocol Buffers, which provides a language-neutral and efficient means for exchanging messages between different systems...

http://code.google.com/p/protobuf/

http://www.swi-prolog.org/pldoc/package/protobufs.html

romacafe
I am mainly looking into building a reasoning engine for agents in my simulations. I am not sure how the protocol buffers will help me with that. What I want is to run the reasoning code in Prolog and get the results back in java in order to perform certain actions. In a similar manner I would like to execute java methods from Prolog. The key is to have a portable engine per agent that is very efficient.
Dimitris
+1  A: 

In 2007 I ran the classic Prolog benchmarks (programs such as queens, tak, qsort, nrev and so on) against four Prolog implementations written in Java: tuProlog, JIProlog, JLog and JavaLog. The overall fastest implementation was JLog. All details can be found in an article accepted at SAC 2008.

I'd suggest you have a look also at jTrolog, which was officially born after I measured the performance of the other Java-based Prolog engines. Perhaps PrologCafe may be of some interest, too.

Note, however, that I am not informed about the maintenance state of any of them. Choose carefully if you need some kind of support by their respective authors.

Giulio Piancastelli