I'm looking for research paper or any other publication that compare different abstract machines (more than one) for execution of Prolog with prolog interpreters not based on abstact machines. What I've seen so far is that majority of implementations seems to base their prolog interpreters on Warren Abstract Machine although other abstract machines were proposed (eg. Vienna Abstract Machine, Tree-Oriented Abstract Machine) and there is no any general comparision. I'm interested in comparision of efficiency (not features), although all compared interpreters should allow for constraint-logic programming.
-
2See http://stackoverflow.com/questions/4478615/alternatives-to-the-wam/4504325 It is not clear what else you could mean by a comparison. What you mean by "execution of Prolog with Prolog interpreters not based on abstract machines" is not clear to me: Any implementation is based on some abstract machine. – false May 17 '14 at 16:03
-
1@false, I can write Prolog interpreter using C++ and then it won't be based on any abstract machine. And by comparision I mean for example testing how efficiently (in terms of computational time, memory consumptionm) each interpreter works. – Grzegorz Adam Kowalski May 17 '14 at 17:48
-
1Even then you are using an abstract machine. There are still a lot of decisions to be made. Think of backtracking/trailing. – false May 17 '14 at 18:10
-
2Comparisons in efficiency was a minefield in Prolog in the 1980s since systems practically sold by the KLips. However, please refer to above mentioned answer that contains a very detailed comparison of some aspects of efficiency. – false May 17 '14 at 18:12
1 Answers
You can build constraint logic programming on top of ordinary prolog if you introduce some primitives for a trailed constraint store and some primitives for unification hooks. E.g.:
SICStus Prolog: Attributed Variables
http://sicstus.sics.se/sicstus/docs/3.7.1/html/sicstus_17.html
Jekejeke Minlog: Little Solver
http://www.jekejeke.ch/idatab/doclet/prod/en/docs/15_min/10_docu/02_reference/04_examples/05_solver.html
http://www.jekejeke.ch/idatab/doclet/prod/en/docs/15_min/15_stdy/06_bench/10_examples/02_addensure/01_referensure.p.html
Of course you can view the additional primitives as new instructions in the abstract machine. But in both cases above the primitives are added on the predicate level, so that it begs the question whether there is really a need for an abstract machine for constraint logic programming.
Of course you will find a couple of suggestions of constraint logic programming abstract machines as well through google.
Bye