Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
Comparison of Prolog implementations
List article

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).

Portability

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.3

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.45

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.6 Use of libraries unavailable in other implementations and library organisation:7

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

PlatformFeaturesToolkitProlog Mechanics
NameOSLicenceNative GraphicsCompiled CodeUnicodeObject OrientedNative OS ControlStand Alone ExecutableC Interface8Java Interface9Interactive InterpreterDebuggerCode ProfilerSyntax
AllegroProlog10Unix, Windows, Mac OS XProprietary (limited free edition available)YesYesYesYes, via LispYesYes, via LispYes, via LispYesYesYes, via LispS-expressions. Full Common Lisp integration.
BPrologUnix, Windows, Mac OS XProprietary (free for non-commercial uses)YesYesYesYesYesYesYesYesYesYesISO-Prolog, plus event-handling, CLP(FD), and tabling
CiaoUnix, Windows, Mac OS XGPL, LGPLYesYesYesYesYesYesYesYesYesISO-Prolog, plus extensions
DOS-Prolog11MS-DOSProprietaryYesYesYesYesYesYesEdinburgh Prolog
ECLiPSeLinux, Windows, Solaris, macOSMPLYesYesYesYesYesYesYesExtended Prolog, Multi-dialect, including ISO
GNU PrologUnix, Windows, Mac OS XGPL, LGPLYesYesYesYesYesYesISO-Prolog
JIProlog12JVM, AndroidAGPL (commercial support available)YesYesYes via JavaYesYes via JavaYesYesYesISO-Prolog
JLog13JVMGPLYesYesYesYesISO-Prolog
JScriptLog14Web BrowserGPLYesISO-Prolog
jTrolog15JVMLGPLYesYesYesYesISO-Prolog
WIN-Prolog16WindowsProprietaryYesYesYesYesYesYesYesYesYesYesYesEdinburgh Prolog with extensions
Open Prolog17Mac OS System 7FreewareYes
Poplog PrologLinux (32- and 64-bit), Unix, WindowsFree Open SourceOnly through POP-11, on LinuxYesYesYesYesYesYesEdinburgh Prolog, with interfaces to Poplog Common Lisp and Pop-11
Scryer Prolog18Linux, Windows, macOSBSD LicenseYesYesISO-Prolog
SICStus PrologUnix, Linux, Windows, macOSProprietaryYesYesYesYesYesYesYesYesYesYesYesISO-Prolog
Strawberry Prolog19Unix, WindowsFreewareYesYesYesYesYesNot ISO-Prolog + extensions
SWI-PrologUnix, Linux, Windows, macOSBSD LicenseYesYesYesYesYesYesYesYesYesYesISO-Prolog, Edinburgh Prolog
tuProlog20JVM, AndroidLGPLYesYesYesYesYesYesISO-Prolog
Visual PrologWindowsFreewareYesYesYesYesYesYesYesYesYes
XSB PrologLinux, Windows, Solaris, macOSLGPLYesYesYesYesYesYesYesYesYesISO-Prolog, tabled WFS
YAP-PrologLinux, Windows, Solaris, Mac OS X, HP-UXGPL or Artistic (user choice)YesYesYesYesYesYesYesYesISO-Prolog, Edinburgh Prolog, Quintus and SICStus Prolog compatible
OS-relatedWeb-related
NameConditional compilationSocketsMulti-threadingTablingHTTP clientHTTP serverHTML ParserRDF Triple store
BPrologYes
CiaoYesYesYesYesYesYesYes
ECLiPSeYesYesYesYesYes
GNU PrologYes
WIN-PrologYesYesYesYes
Scryer PrologYesYesYesYesYes
SICStus PrologYesYesYes
SWI-PrologYesYesYesYesYesYesYesYes
Visual PrologYesYesYesYesYesYes
XSBYesYesYesYesYes
YAP-PrologYesYesYesYes

Static analysis

NameType checkerDeterminacy checkerCall-pattern checker
CiaoYesYesYes
GNU Prolog
SICStus PrologYes
SWI-PrologYes
Visual PrologYesYesYes
XSB
YAP-Prolog

Optimizations

NameTail-Call OptimizationChoice Point EliminationEnvironment TrimmingJust-in-Time Indexing
CiaoYesYesYes?
ECLiPSeYesYesYesmulti-argument (compile time)
GNU PrologYesYesYes
SICStus PrologYesYesYes
SWI-PrologYesYesYesYes
Visual PrologYes (compile time)Yes (compile time)N/AN/A (compile time)
XSBYesYesYes?
YAP-PrologYesYesYesYes

Release

NameVersionDate
AllegroProlog1.1.22018-12-12
BProlog8.12014-02-23
JIProlog4.1.7.12021-08-26
Ciao1.222022-09-28
DOS-Prolog8.0
ECLiPSe7.12023-01-01
GNU Prolog1.5.02023-02-21
JLog1.3.62007-09-13
JScriptLog0.7.5 beta2007-09-10
jTrolog
WIN-Prolog8.02022-07-14
Open Prolog
Poplog PrologV162020-01-06
Scryer Prolog0.9.32023-11-02
SICStus Prolog4.9.02023-12-18
Strawberry Prolog6.12023-08-23
SWI-Prolog9.1.182023-11-01
tuProlog2P-Kt 0.31.182023-10-24
Visual Prolog10, Build 10002021-04-15
XSB Prolog5.02022-05-15
YAProlog7.1.02020-12-19

Benchmarks

Notes

References

  1. Philipp Körner; Michael Leuschel; João Barbosa; Vítor Santos Costa; Verónica Dahl; Manuel V. Hermenegildo; Jose F. Morales; Jan Wielemaker; Daniel Diaz; Salvador Abreu; Giovanni Ciatto (November 2022), "Fifty Years of Prolog and Beyond", Theory and Practice of Logic Programming, 22 (6): 776–858, doi:10.1017/S1471068422000102, hdl:10174/33387 /wiki/Doi_(identifier)

  2. Wielemaker, J.; Costa, V. T. S. (2011). "On the Portability of Prolog Applications". Practical Aspects of Declarative Languages. Lecture Notes in Computer Science. Vol. 6539. pp. 69–83. CiteSeerX 10.1.1.1030.9396. doi:10.1007/978-3-642-18378-2_8. ISBN 978-3-642-18377-5. 978-3-642-18377-5

  3. Wielemaker, J.; Costa, V. T. S. (2011). "On the Portability of Prolog Applications". Practical Aspects of Declarative Languages. Lecture Notes in Computer Science. Vol. 6539. pp. 69–83. CiteSeerX 10.1.1.1030.9396. doi:10.1007/978-3-642-18378-2_8. ISBN 978-3-642-18377-5. 978-3-642-18377-5

  4. Wielemaker, J.; Costa, V. T. S. (2011). "On the Portability of Prolog Applications". Practical Aspects of Declarative Languages. Lecture Notes in Computer Science. Vol. 6539. pp. 69–83. CiteSeerX 10.1.1.1030.9396. doi:10.1007/978-3-642-18378-2_8. ISBN 978-3-642-18377-5. 978-3-642-18377-5

  5. Philipp Körner; Michael Leuschel; João Barbosa; Vítor Santos Costa; Verónica Dahl; Manuel V. Hermenegildo; Jose F. Morales; Jan Wielemaker; Daniel Diaz; Salvador Abreu; Giovanni Ciatto (November 2022), "Fifty Years of Prolog and Beyond", Theory and Practice of Logic Programming, 22 (6): 776–858, doi:10.1017/S1471068422000102, hdl:10174/33387 /wiki/Doi_(identifier)

  6. Jan Wielemaker and Vıtor Santos Costa: Portability of Prolog programs: theory and case-studies. CICLOPS-WLPE Workshop 2010 Archived 2010-07-16 at the Wayback Machine. http://www.swi-prolog.org/download/publications/porting.pdf

  7. Wielemaker, J.; Costa, V. T. S. (2011). "On the Portability of Prolog Applications". Practical Aspects of Declarative Languages. Lecture Notes in Computer Science. Vol. 6539. pp. 69–83. CiteSeerX 10.1.1.1030.9396. doi:10.1007/978-3-642-18378-2_8. ISBN 978-3-642-18377-5. 978-3-642-18377-5

  8. C/Java interface can also be used for graphics and OS control.

  9. C/Java interface can also be used for graphics and OS control.

  10. Allegro Prolog https://franz.com/products/allegro-common-lisp/acl_prolog.lhtml

  11. "DOS-Prolog 8.0". Logic Programming Associates. 5 November 2023. https://www.lpa.co.uk/dos.htm

  12. JIProlog http://www.jiprolog.com

  13. "JLog Homepage". jlogic.sourceforge.net. Retrieved 2023-11-03. https://jlogic.sourceforge.net/

  14. "JLog Homepage". jlogic.sourceforge.net. Retrieved 2023-11-03. https://jlogic.sourceforge.net/

  15. "Jtrolog — Java.net". 2012-11-13. Archived from the original on 2012-11-13. Retrieved 2023-11-03. https://web.archive.org/web/20121113023104/http://java.net/projects/jTrolog

  16. "WIN-Prolog 8.0". Logic Programming Associates. 5 November 2023. https://www.lpa.co.uk/win.htm

  17. Open Prolog Home Page https://web.archive.org/web/20050203201646/http://www.cs.tcd.ie/open-prolog/

  18. Scryer Prolog https://www.scryer.pl

  19. Strawberry Prolog https://dobrev.com

  20. tuProlog http://tuprolog.unibo.it

  21. 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)

  22. Bothe, K. (1990). "A prolog space benchmark suite". ACM SIGPLAN Notices. 25 (12): 54–60. doi:10.1145/122193.122197. https://doi.org/10.1145%2F122193.122197

  23. A Summary of XSB Performance (1993) http://citeseer.ist.psu.edu/swift93summary.html

  24. Demoen, B.; Nguyen, P. L.; Vandeginste, R. (2002). "Copying Garbage Collection for the WAM: to Mark or Not to Mark?". Logic Programming. Lecture Notes in Computer Science. Vol. 2401. pp. 194–208. CiteSeerX 10.1.1.13.2586. doi:10.1007/3-540-45619-8_14. ISBN 978-3-540-43930-1. 978-3-540-43930-1