I do not see the true requirement for a foreign language interface for your task: use Prolog IO, it is easy to use and efficient. You can also start by supporting only protocol / 1. Just KISS advice ...
A foreign language interface is required if you need something implemented in this other language.
SWI-Prolog C ++ is an interface , it is much easier to use than a C-copy, and allows you to simultaneously expand the language using a very simple built-in encoding as an attachment of the engine to a stand-alone "main" one. And these 2 aspects can be gracefully cohexist: say, for a quick prototype, we only implement the built-in modules and use the upper level of REPL, while a full-scale application can start the engine, which will be used as a logical engine, and send it (hopefully tested through REPL) in the background.
Then there is a JPL for SWI-Prolog and Java. I don't know much about this ... I saw some of the problems that were reported on the SWI-Prolog mailing list due to the (mostly) complexity of the various thread models. But of course it works.
An interesting development is to provide an IDE in Eclipse ( PDT , Prolog development tools). I think they use their own Java interface. Currently, it may be a better choice than JPL.
But the most interesting SWI-Prolog interface can offer an HTTP server infrastructure today. If you know the development of a WEB client (HTML / JavaScript / XML / RDF), you have many tools for splitting your design into MVC Client / Server. Prolog launches the web service, and Rich Client interacts with the end user. This architecture makes your application ready to run locally as well as in the wild.
See How to ... This is not an easy task, but (IMHO) is very useful and long-lasting.
source share