Talk:Comparison of Prolog implementations

Call libraries from common languages
It would be nice if we could include a table of common languages and whether a library is available to call between that language and prolog, in both directions. I'm aware that SWI-Prolog has a Java library for calling SWI-Prolog from Java, for example, but I'm sure there's lots more! — Preceding unsigned comment added by 49.183.168.157 (talk) 08:07, 18 November 2015 (UTC)

CLP Capabilities
A nice comparison between Prolog implementations is here:

http://www.complang.tuwien.ac.at/ulrich/prolog_misc/systems.html

For many users of interest are especially the CLP capabilities.


 * This is very useful. I added a link under the "external links" section. Cmungall (talk) 17:15, 6 October 2010 (UTC)

Suspended Goals
A typical prerequesite for CLP is that the Prolog has suspended goals. And one can also do other things than strictly CLP with suspended goals, i.e. more than only supporting a special domain.

Maybe we can have a column somewhere that shows the support of suspended goals. Pitty that multithreading is put under the heading "Web". I would like to see suspenended goals and multithreading as some application neutral fundamental properties somewhere.

Janburse (talk) 22:18, 30 July 2011 (UTC)

Amzi! Prolog
Can you include Amzi! Prolog, in the comparison table, please? —Preceding unsigned comment added by 190.82.131.79 (talk) 19:17, 27 August 2010 (UTC)

TCO
Yes I also feel that the comparison could be improved. The table with static and dynamic analysis is a good start. But the problem is that in my opinion the dynamic analysis is redundant to the column "Code Profiler" of the toolkit section. Since tail call optimization has a set of aspects, I would suggest to replace the current dynamic analysis columns by: - Choice Point Elimination - Environment Trimming - Last Call Optimization This would mean that dynamic analysis refers to optimizations done by the Prolog system at runtime. Often the WAM instructions are able to do these optimizations, but also non-WAM based Prologs can do it, i.e. for example Jekejeke Prolog. It is also sometimes possible to verifed whether some of the optimizations exist. See for example Benchmark Results

Janburse (talk) 10:52, 24 October 2010 (UTC)

It would be extremely useful to see which systems implement Tail call optimization. Is anyone aware of a comprehensive survey? I'm sure the main systems (XSB, SWI, Sicstus etc) all implement this, but some of the niche prologs may not. I'm particularly interested in which JVM prologs implement TCO - I did some informal testing a while ago and the results were disappointing. —Preceding unsigned comment added by Cmungall (talk • contribs) 16:59, 6 October 2010 (UTC)

My opinion has been requested, so here it is:

In Visual Prolog Tail call optimization is made as part of the static analysis. Some kind of stack optimization is very important, because without it even simple programs may suffer stack overflow. But there is also a quality question: How efficient is the TCO? Is it only effective for few cases, or is it effective for many cases?

The other kinds of optimization ("Choice Point Elimination" and "Environment Trimming") seem a bit arbitrary chosen? Is it well defined what it should mean?

What exactly is "Choice Point Elimination", and what exactly is required to say "yes" to this kind of optimization? Benchmark Results describes "Choice Point Elimination" as some dynamically determined "cutting". In Visual Prolog the mentioned backtrack points are not created at all: due to static analysis the generated code for the mentioned cases is completely procedural.

What exactly is "Environment Trimming", and what exactly is required to say "yes" to this kind of optimization? I am not sure this "optimization" at all have a meaning in Visual Prolog context.

So does it make sense to list optimizations (which even seem to relate to a "certain engine")? And is it really interesting: what good is it that you have used titanium and carbon if your bicycle have square wheels? It seems that the actually achieved performance is what matters.

Thomas Linder Puls (talk) 14:46, 24 October 2010 (UTC)

Well we should not force people to use the jet aircraft to go to the bakery. I agree that elaborated compilers are of course faster than interpreters. But interpreters also have their application domain. But the optimization techniques I have listed are not restricted to interpreters I guess. Since they are sometimes part of the compiled WAM repertoir. But for Jekejeke Prolog this is true, they apply only to interpreted mode since this Prolog system has only interpreter mode.

The dynamic optimizations archive significant performance improvements, this is documented in many places also in my document. But of course compared to static analysis they are either redudant or complementary. For example if determinancy analysis is based on determinancy declaration, i.e. some is det. Then if a nevertheless deterministic predicate is not declared as such, it will slip the static analysis. On the other hand a good dynamic analysis would determine it.

TCO Check
Here is a simple check whether your Prolog has choice point elimination and detection of some choice points remain in the top level. Simply pose the following query, if it reacts as follows, i.e. immediately returns to the top level after the first redo (via entering semicolon ;):

?- X=1; X=2. X=1 ; X=2 ?-

But if your Prolog reacts as follows, i.e. if you have to issue a sceond redo (via enterig a second semicolon ;), then it has either no choice point elimination or the top level cannot detect whether choice poinst remain:

?- X=1; X=2. X=1 ; X=2 ; Yes ?-

This check works for SWI Prolog and Jekejeke Prolog. Maybe it also works for other Prologs. Similar checks exist to determine whether a Prolog knows last call optimization or environment trimming. Janburse (talk) 17:58, 24 October 2010 (UTC)

I split the information in two tables, because I don't think it makes sense to see these optimizations as dynamic analysis, since it may as well take place statically.

--90.184.106.118 (talk) 21:59, 24 October 2010 (UTC)

Prova
Would it be appropriate to add Prova to the list? It's not strictly a prolog engine but has enough overlap to be relevant —Preceding unsigned comment added by Cmungall (talk • contribs) 17:07, 6 October 2010 (UTC)


 * Doesn't seem like a good idea. Not at least with the current title. 72.228.177.92 (talk) 14:02, 28 January 2012 (UTC)


 * Prova stands for PROlog jaVA. It IS a prolog engine though not strictly iso prolog conform. There are several other features that make prova reactive, functional etc. It is possible to call Java (objects, classes, methods) from inside of Prova.Bejahend (talk) 06:43, 20 April 2018 (UTC)

JIT Indexing
Dear All,

I have added an additional optimization criteria. I made a yes for those Prolog systems that I know for sure that they have JIT indexing. YAP has it already for long. Jekejeke Prolog since release 0.9.0, and SWI Prolog since release 3.11.32. But for the other Prolog systems I am not clear about. Help appreciated.

Best Regards

Janburse (talk) 10:22, 21 November 2011 (UTC)

Conformity assessment I: Syntax Link
Dear All,

I think the above link is not a good link. The test cases are not easy verifiable. Each test case should have a reference to the source SECTION where it is taken from. For example we find a test case as follows:

#26	'\  ' '.

And it says syntax error. The author expects the Prolog system to bail out during readterm if there is a newline in a string, instead of continuing reading. Which SECTION of which standard is this assumption based on?

In rare cases we find a reference, but strangely this reference refers to a draft proposal that has even not yet been confirmed as a draft and is still in discussion:

#34	write_canonical([a]). '.'(a,[]) 8.14.2.4 ex2

But under 8.14.2.4 in the draft technical corrigendum 2 we find:

Annex A  (informative) Issues still to be resolved 8.14.2.4 Examples

Janburse (talk) 10:08, 8 December 2011 (UTC)

Performance Comparison
Since there are quite substantial differences in performance and benchmarks available quantifying same, suggest a column be added to the appropriate table reflecting same. 72.228.177.92 (talk) 14:01, 28 January 2012 (UTC)

Link M. Zeisig
It seems that the following link is broken and I couldn't find a substitute on the net:

Benchmarking results: Survey of java prolog engines by Michael Zeising

Any ideas? Jan Burse (talk) 13:32, 13 May 2012 (UTC)

Unicode vs. UTF-8 support
The entry Unicode yes/no seems to be a bit coarse: There are systems that


 * read UTF-8 encoded files


 * permit Unicode characters in quoted or double quoted tokens. E.g. writeq('œuvre'). produces 'œuvre'


 * permit Unicode characters as part of names. E.g. writeq(œuvre). produces œuvre — Preceding unsigned comment added by Vvrq (talk • contribs) 19:41, 11 October 2012 (UTC)

Modules
Dear All,

How about a new criteria modules?

There is already a criteria OO. But a couple of Prolog systems such as GNU Prolog, Jekejeke Prolog, .. will introduces modules in the time to come.

Bye Jan Burse (talk) 16:16, 30 July 2013 (UTC)

Fuzzy Prolog
why does not mentioned? (Idot (talk) 15:54, 28 March 2015 (UTC))

Multi threading
To the best of my knowledge, SICStus is not multi threaded. They can have multiple completely independent runtime systems in the same process that may run concurrently when managed from an external language. See https://sicstus.sics.se/sicstus/docs/latest4/html/sicstus.html/ and search for thread. — Preceding unsigned comment added by 80.57.42.134 (talk) 13:44, 20 April 2016 (UTC)

(Atom) garbage collection
Would it make sense to add columns on memory management, e.g., is heap garbage collection provided? Atom garbage collection? Can memory areas be expanded at runtime? — Preceding unsigned comment added by 80.57.42.134 (talk) 13:49, 20 April 2016 (UTC)

Erlog
https://github.com/rvirding/erlog — Preceding unsigned comment added by ShalokShalom (talk • contribs) 12:22, 10 August 2017 (UTC)

BinProlog
How about BinProlog. https://github.com/mndrix/binprolog BinProlog is a C-based Prolog compiler and runtime system written by Paul Tarau. — Preceding unsigned comment added by Sebhaase (talk • contribs) 17:09, 3 January 2020 (UTC)

Release version numbers and dates
It seems to me that the release versions and dates are hopeless to maintain. Their main advantage is to see at a glance whether a system is under active dvelopment, but even that relies on keeping them up to date. I would suggest removing them unless someone is committed to them. Felix QW (talk) 08:21, 3 November 2023 (UTC)