Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embedded Prolog Interpreter/Compiler for Java

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 some other logic/constraint programming language, instead of Java, as I believe the resulting code will be significantly simpler and more maintainable.

I googled for embedded Java implementations on Prolog, and found number of them, each with very little documentation. My (modest) selection criteria are:

  • should be embeddable in Java (e.g. can be bundled up with my java package instead of requiring any native installations on external programs)
  • simple interface to use from Java (for initiating deductions, inspecting results, and adding rules)
  • come with at least a few examples on how to use it
  • doesn't necessarily have to be Prolog, but other logic/constraint programming languages with the above criteria would suit my needs, too.

What choices do I have and what are their advantages and disadvantages?

like image 838
Sami Avatar asked Nov 29 '09 22:11

Sami


People also ask

Does Prolog use interpreter or compiler?

Prolog: a compiled or interpreted language or both? The Prolog language can be compiled and can be interpreted so the answer is both.

Is Prolog still used in 2020?

Yes, as mentioned in other answers, Prolog is actually used in IBM Watson. Prolog doesn't get much "hype" and "buzz" these days, but it is absolutely still used.

Is Prolog programming still used?

Who's Actually Using Prolog? Trust me, Prolog is still being used — just not as extensively as some of the most commonly used languages in our industry, and there is a very good reason for that.

What is Prolog used for?

Prolog has been used largely for logic programming, and its applications include natural language understanding and expert systems such as MYCIN. Prolog is notably a so-called nonprocedural, or declarative, language in the sense that the programmer specifies what goals are to be accomplished but not…


1 Answers

According to Wikipedia, the following versions of Prolog have Java interfaces. I've linked to the main pages for them:

  • BProlog
  • Ciao Prolog
  • SICStus Prolog
  • SWI Prolog
  • TuProlog (implemented in Java)
  • LPA Prolog

Good luck with your search!

like image 67
Chip Uni Avatar answered Sep 30 '22 10:09

Chip Uni