I\'m working on an application in Java, that needs to do some complex logic rule deductions as part of its functionality. I\'d like to code my logic deductions in Prolog or
According to Wikipedia, the following versions of Prolog have Java interfaces. I've linked to the main pages for them:
Good luck with your search!
SWI prolog A very popular implementation seems to have a Java interface as does SiCStus which would be easier than using JNI to instantiate an instance in your Java Process. I've used both from C quite a while ago and do recommend them. My prefference would be SWI as it is open-source and from my experience the de facto implementation.
The documentation for SWI's Java interface seems to be adequate, and the embedding process quite straight forward.
I've needed to do the same 2 years ago. I used SWI interface which is called JPL. It lets you load a Prolog file, assert on it and query on it. It does required an installation of SWI Prolog but that's not problem at all. SWI Prolog is available for many platforms.
I've also tried alternatives that were 100% implemented in Java and didn't required external programs. All them were buggy or hard to use. Don't waste your time.
Amzi prolog has been around for a while. I have used it briefly but not the embedded version. however they do have good documentation and support can be bought. They have Java port so it might be worth a look.
Clojure is a JVM based Lisp-like language with a library (core.logic) supporting logic and constraint based programming. Clojure also has a large number of facilities for generating java classes and working with java code, so inter-op between the two languages is trivial.
Prof. Paul Tarau made available from his page several implementations
Jinni Prolog
Kernel Prolog