How to mix Java with Prolog

62
rate or flag this page

By highway star

Why do you have to mix Java with Prolog?

Java is a great programming language, but it is an imperative programming language and it is difficult to model declarative problems with it. Instead, Prolog is more suitable to handle problems where you need declarative programming features. In order to properly connect your Java program with a Prolog interpreter you need an interface. There are several such interfaces depending on the Prolog intepreter you want to use. In this page I will describe some of the interfaces that I found searching the web.

Mixing Java with Ciao Prolog

Ciao Prolog provides an interface for Java. You can find out more by checking their site at:

http://clip.dia.fi.upm.es/Software/Ciao/ciao_html/ciao_158.html#SEC662

JPL: a bidirectional interface for SWI-Prolog

JPL is a library using the SWI-Prolog foreign interface and the Java jni interface providing a bidirectional interface between Java and Prolog that can be used to embed Prolog in Java as well as for embedding Java in Prolog. In both setups it provides a reentrant bidirectional interface. Check it here:

http://www.swi-prolog.org/packages/jpl/

Jasper: a bidrectional interface for SICStus Prolog

Jasper is a bi-directional interface between programs written in Java and programs written in Prolog. The Java-side of the interface constists of a Java package (

jasper
) containing classes representing the SICStus emulator. Check it here:

http://www.sics.se/sicstus/docs/3.7.1/html/sicstus_12.html

InterProlog: a powerful Java/Prolog interface

I found this interesting interface that can help you build powerful programs mixing Java and Prolog:

http://www.cs.ucy.ac.cy/compulog/dec98update/projects/interprolog.htm

Print   —   Rate it:  up  down  flag this hub

Comments

RSS for comments on this Hub

Robert Shiplett  says:
5 months ago

I added a link to the Aule Prolog + SemWeb page

Curl from www.curl.com is required to view the page (currently I have no Linux or Mac viewer available)

I found Java to Amzi prolog worked very well. I think there are options at BinNet as well.

Did you ever looka t Prolog in Smalltalk?

Regards

Submit a Comment

Members and Guests

Sign in or sign up and post using a hubpages account.


optional


  • No HTML is allowed in comments, but URLs will be hyperlinked
  • Comments are not for promoting your hubs or other sites

working