Comparison of Prolog implementations

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Template:Short description

File:Early Prolog timeline.svg
Timeline of some early Prolog systems, up to the ISO Standard

The following Comparison of Prolog implementations provides a reference for the relative feature sets and performance of different implementations of the Prolog computer programming language. A comprehensive discussion of the most significant Prolog systems is presented in an article published in the 50-years of Prolog anniversary issue of the journal Theory and Practice of Logic Programming (TPLP).[1]

Portability

File:Prolog systems.svg
Prolog Heritage.
Systems with a dark gray background are not supported any more. Arrows denote influences and inspiration of systems. Quick legend: JIT = "Just in Time Compiler", JVM = "Java Virtual Machine", TOAM = "Tree-Oriented Abstract Machine"

There are Prolog implementations that are radically different, with different syntax and different semantics (e.g. Visual Prolog)[2] and sub-communities have developed around different implementations.[2]

Code that strictly conforms to the ISO-Prolog core language is portable across ISO-compliant implementations. However, the ISO standard for modules is an extension which was not fully adopted in most Prolog systems.[2][1]

Factors that can adversely affect portability include: use of bounded vs. unbounded integer arithmetic, additional types such as string objects, advanced numeric types (rationals, complex), feature extensions such as Unicode, threads, and tabling.[3] Use of libraries unavailable in other implementations and library organisation:[2]

Currently, the way predicates are spread over the libraries and system built-ins differs enormously. [...] Fortunately, there are only few cases where we find predicates with the same name but different semantics (e.g. delete/3)

Main features

Platform Features Toolkit Prolog Mechanics
Name OS Licence Template:Verth Template:Verth Template:Verth Template:Verth Template:Verth Template:Verth Template:Verth Template:Verth Template:Verth Template:Verth Template:Verth Syntax
AllegroProlog[4] Unix, Windows, Mac OS X Proprietary (limited free edition available) Yes Yes Yes Yes, via Lisp Yes Yes, via Lisp Yes, via Lisp Yes Yes Yes, via Lisp S-expressions. Full Common Lisp integration.
Template:Rh|BProlog Unix, Windows, Mac OS X Proprietary (free for non-commercial uses) Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes ISO-Prolog, plus event-handling, CLP(FD), and tabling
Template:Rh|Ciao Unix, Windows, Mac OS X Template:Open source Yes Yes Yes Yes Yes Yes Yes Yes Yes ISO-Prolog, plus extensions
Template:Rh|DOS-Prolog[5] MS-DOS Proprietary Yes Yes Yes Yes Yes Yes Edinburgh Prolog
Template:Rh|ECLiPSe Linux, Windows, Solaris, macOS Template:Open source Yes Yes Yes Yes Yes Yes Yes Extended Prolog, Multi-dialect, including ISO
Template:Rh|GNU Prolog Unix, Windows, Mac OS X Template:Open source Yes Yes Yes Yes Yes Yes ISO-Prolog
Template:Rh|JIProlog[6] JVM, Android Template:Open source Yes Yes Yes via Java Yes Yes via Java Yes Yes Yes ISO-Prolog
Template:Rh|JLog[7] JVM Template:Open source Yes Yes Yes Yes ISO-Prolog
Template:Rh|JScriptLog[7] Web Browser Template:Open source Yes ISO-Prolog
Template:Rh|jTrolog[8] JVM Template:Open source Yes Yes Yes Yes ISO-Prolog
Template:Rh|WIN-Prolog[9] Windows Proprietary Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Edinburgh Prolog with extensions
Template:Rh|Open Prolog[10] Mac OS System 7 Freeware Yes
Template:Rh|Poplog Prolog Linux (32- and 64-bit), Unix, Windows Template:Open source Only through POP-11, on Linux Yes Yes Yes Yes Yes Yes Edinburgh Prolog, with interfaces to Poplog Common Lisp and Pop-11
Template:Rh|Scryer Prolog[11] Linux, Windows, macOS Template:Open source Yes Yes ISO-Prolog
Template:Rh class="table-rh" |SICStus Prolog Unix, Linux, Windows, macOS Proprietary Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes ISO-Prolog
Template:Rh|Strawberry Prolog[12] Unix, Windows Freeware Yes Yes Yes Yes Yes Not ISO-Prolog + extensions
Template:Rh|SWI-Prolog Unix, Linux, Windows, macOS Template:Open source Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes ISO-Prolog, Edinburgh Prolog
Template:Rh|tuProlog[13] JVM, Android Template:Open source Yes Yes Yes Yes Yes Yes ISO-Prolog
Template:Rh|Visual Prolog Windows Freeware Yes Yes Yes Yes Yes Yes Yes Yes Yes
Template:Rh|XSB Prolog Linux, Windows, Solaris, macOS Template:Open source Yes Yes Yes Yes Yes Yes Yes Yes Yes ISO-Prolog, tabled WFS
Template:Rh|YAP-Prolog Linux, Windows, Solaris, Mac OS X, HP-UX Template:Open source Yes Yes Yes Yes Yes Yes Yes Yes ISO-Prolog, Edinburgh Prolog, Quintus and SICStus Prolog compatible

Operating system and web-related features

OS-related Web-related
Name Conditional compilation Sockets Multi-threading Tabling HTTP client HTTP server HTML Parser RDF Triple store
Template:Rh|BProlog Yes
Template:Rh|Ciao Yes Yes Yes Yes Yes Yes Yes
Template:Rh|ECLiPSe Yes Yes Yes Yes Yes
Template:Rh|GNU Prolog Yes
Template:Rh|WIN-Prolog Yes Yes Yes Yes
Template:Rh|Scryer Prolog Yes Yes Yes Yes Yes
Template:Rh|SICStus Prolog Yes Yes Yes
Template:Rh|SWI-Prolog Yes Yes Yes Yes Yes Yes Yes Yes
Template:Rh|Visual Prolog Yes Yes Yes Yes Yes Yes
Template:Rh|XSB Yes Yes Yes Yes Yes
Template:Rh|YAP-Prolog Yes Yes Yes Yes

Static analysis

Name Type checker Determinacy checker Call-pattern checker
Template:Rh|Ciao Yes Yes Yes
Template:Rh|GNU Prolog
Template:Rh|SICStus Prolog Yes
Template:Rh|SWI-Prolog Yes
Template:Rh|Visual Prolog Yes Yes Yes
Template:Rh|XSB
Template:Rh|YAP-Prolog

Optimizations

Name Tail-Call Optimization Choice Point Elimination Environment Trimming Just-in-Time Indexing
Template:Rh|Ciao Yes Yes Yes ?
Template:Rh|ECLiPSe Yes Yes Yes multi-argument (compile time)
Template:Rh|GNU Prolog Yes Yes Yes
Template:Rh|SICStus Prolog Yes Yes Yes
Template:Rh|SWI-Prolog Yes Yes Yes Yes
Template:Rh|Visual Prolog Yes (compile time) Yes (compile time) N/A N/A (compile time)
Template:Rh|XSB Yes Yes Yes ?
Template:Rh|YAP-Prolog Yes Yes Yes Yes

Release

Name Version Date
Template:Rh class="table-rh" | AllegroProlog 1.1.2 2018-12-12
Template:Rh class="table-rh" |BProlog 8.1 2014-02-23
Template:Rh class="table-rh" |JIProlog 4.1.7.1 2021-08-26
Template:Rh class="table-rh" |Ciao 1.22 2022-09-28
Template:Rh class="table-rh" |DOS-Prolog 8.0
Template:Rh class="table-rh" |ECLiPSe 7.1 2023-01-01
Template:Rh class="table-rh" |GNU Prolog 1.5.0 2023-02-21
Template:Rh class="table-rh" |JLog 1.3.6 2007-09-13
Template:Rh class="table-rh" |JScriptLog 0.7.5 beta 2007-09-10
Template:Rh class="table-rh" |jTrolog
Template:Rh class="table-rh" |WIN-Prolog 8.0 2022-07-14
Template:Rh class="table-rh" |Open Prolog
Template:Rh class="table-rh" |Poplog Prolog V16 2020-01-06
Template:Rh class="table-rh" |Scryer Prolog 0.9.3 2023-11-02
Template:Rh class="table-rh" |SICStus Prolog 4.9.0 2023-12-18
Template:Rh class="table-rh" |Strawberry Prolog 6.1 2023-08-23
Template:Rh class="table-rh" |SWI-Prolog 9.1.18 2023-11-01
Template:Rh class="table-rh" |tuProlog 2P-Kt 0.31.18 2023-10-24
Template:Rh class="table-rh" |Visual Prolog 10, Build 1000 2021-04-15
Template:Rh class="table-rh" |XSB Prolog 5.0 2022-05-15
Template:Rh class="table-rh" |YAProlog 7.1.0 2020-12-19

Benchmarks

Notes

Template:Notelist

References

<templatestyles src="Reflist/styles.css" />

  1. a b Script error: No such module "citation/CS1".
  2. a b c d Script error: No such module "citation/CS1".
  3. Jan Wielemaker and Vıtor Santos Costa: Portability of Prolog programs: theory and case-studies. CICLOPS-WLPE Workshop 2010 Template:Webarchive.
  4. Allegro Prolog
  5. Script error: No such module "citation/CS1".
  6. JIProlog
  7. a b Script error: No such module "citation/CS1".
  8. Script error: No such module "citation/CS1".
  9. Script error: No such module "citation/CS1".
  10. Open Prolog Home Page
  11. Scryer Prolog
  12. Strawberry Prolog
  13. tuProlog
  14. B. Demoen, and P. Nguyen, About unnecessary performance differences between Prolog implementations, Proceedings of the Colloquium on Implementation of Constraint and Logic Programming Systems (CICLOPS 2001)
  15. Script error: No such module "Citation/CS1".
  16. A Summary of XSB Performance (1993)
  17. Script error: No such module "citation/CS1".

Script error: No such module "Check for unknown parameters".

External links