In the context of a Java/Eclipse application I would like to use Prolog for a particular task. What are the available solutions and tools to do that, and associated pro and cons ?
I can launch an external Prolog interpreter generating the result in a file ? I can use a full Prolog Java Library (Prolog interpreter implemented in java) ? I can use a java library dedicated to the communication with an external Prolog interpreter ?
Thanks in advance for your help,
Manu
I would give GNU Prolog for Java a try. From the website:
GNU Prolog for Java is an implementation of ISO Prolog as a Java library
I'm using tuProlog Official Site, Code Repository on Android. They have a great embedded Prolog in the form on 1 Jar File. They are responsive too!
A quick google returns a list of options (alas not updated in 5 years).
As for pros/cons - as I see it
Native engine with bindings would be the worse option when it comes to distribution and integration, but may be faster than the native Java engines (but I would want proof first).
Java engine with API would lead to some awkwardness at integration points, but should be easy to distribute.
Prolog to bytecode compiler should handle integration between the two languages nicely, and would mean that you are not shipping prolog scripts with the binary (may be a disadvantage). Big disadvantage with this - none still seem to be a live.
Prolog-alike language to bytecode compiler, same as above, but some still seem to be floating about, also would require knowledge of a new language.
Java rules engine - I'd see this as the neatest solution. Rather than use two languages code the rules in a Java-y way, but it depends on how complicated the rules are to express in that way.
A second thing to consider is - is the project still being updated. From my quick google, few are. Prova and Mandarax are two exceptions from the latter options.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With