Embedded Prolog Interpreter/Compiler for Java

2019-01-13 04:11发布

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?

13条回答
Anthone
2楼-- · 2019-01-13 04:55

Prova 3.0 http://www.prova.ws is nearing completion. It is, however, not just another Prolog but a mix of programming styles, particularly, useful for easy bi-directional Java integration, reactive agent programming, integration with ESB's, workflow logic, and event processing. This version is a complete rewrite from zero so some older features, like OWL integration, are missing, but are bound to return in the next revision.

查看更多
何必那么认真
3楼-- · 2019-01-13 04:58

You can also take a look at the Prol engine that I created. It allows you to embed Prolog into your Java programs (but it is not very fast one)

查看更多
手持菜刀,她持情操
4楼-- · 2019-01-13 04:59

Two commercial Prologs written in Java: Minerva by IF Computer Japan and Jekejeke. Both are very close to ISO.

查看更多
叼着烟拽天下
5楼-- · 2019-01-13 05:01

There are a number of Prolog implementations in Java. They are not terribly fast, but convenient to use from within Java. Examples are: TuProlog or PrologCafe You can also have a look at the following Bachelor's thesis on the subject of Execution and Analysis of Prolog Programs in Java.

查看更多
冷血范
6楼-- · 2019-01-13 05:06

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.

查看更多
戒情不戒烟
7楼-- · 2019-01-13 05:06

LPA does offer the LPA Intelligence Server as a way of embedding its Prolog engine within a whole variety of mainstream languages including Java, .Net etc

Clive

http://www.lpa.co.uk/int.htm

查看更多
登录 后发表回答