Loading AI tools
Implementation of the programming language Prolog From Wikipedia, the free encyclopedia
SWI-Prolog is a free implementation of the programming language Prolog, commonly used for teaching and semantic web applications. It has a rich set of features, libraries for constraint logic programming, multithreading, unit testing, GUI, interfacing to Java, ODBC and others, literate programming, a web server, SGML, RDF, RDFS, developer tools (including an IDE with a GUI debugger and GUI profiler), and extensive documentation.
This article may rely excessively on sources too closely associated with the subject, potentially preventing the article from being verifiable and neutral. (June 2014) |
Original author(s) | Jan Wielemaker |
---|---|
Developer(s) | Jan Wielemaker, Anjo Anjewierden, etc |
Initial release | 1987 |
Stable release | |
Preview release | 9.3.2
/ 29 February 2024 |
Repository | |
Written in | C, Prolog |
Operating system | Cross-platform |
Available in | English |
Type | Logic programming |
License | Simplified BSD, LGPL prior to version 7.3.33 |
Website | swi-prolog |
SWI-Prolog runs on Unix, Windows, Macintosh and Linux platforms.
SWI-Prolog has been under continuous development since 1987. Its main author is Jan Wielemaker.
The name SWI is derived from Sociaal-Wetenschappelijke Informatica ("Social Science Informatics"), the former name of the group at the University of Amsterdam, where Wielemaker was employed when he initiated the development of SWI-Prolog.[2]
SWI-Prolog is not based on the Warren Abstract Machine execution model of Prolog.
Instead, it is based on an extended version of the ZIP virtual machine, a minimal virtual machine for Prolog implementing a simple language consisting of only seven instructions. SWI-Prolog-specific extensions aim at improving performance in several ways: ad hoc instructions are introduced to support unification, predicate invocation, some frequently used built-in predicates, arithmetic, control flow, and negation as failure. Prolog can easily be compiled into this language, and the abstract machine code is easily decompiled back into Prolog. This feature is often exploited to interleave compiled and interpreted code execution.[3]
Constraint logic programming functionality came rather late in the lifetime of SWI-Prolog, because it lacked the basic support.[4] This changed early in 2004, when attributed variables were added to the language. The Leuven CHR library was then the first CLP library to be ported to SWI-Prolog. We mention SWI-Prolog's INCLP(R) library (De Koninck et al. 2006), which provides non-linear constraints over the reals and was implemented on top of CHR. Later came a port of Christian Holzbaur's CLP(QR) library and a finite-domain CLP(FD) solver. Finally, a boolean CLP(B) solver was added.[5]
SWI-Prolog installs with a web framework based on definite clause grammars.[6] SWI-Prolog queries may be distributed over several servers and web pages through the Pengines system.[7]
XPCE is a platform-independent object-oriented[8] GUI toolkit for SWI-Prolog, Lisp and other interactive and dynamically typed languages. Although XPCE was designed to be language-independent, it has gained popularity mostly with Prolog. The development XPCE graphic toolkit started in 1987, together with SWI-Prolog. It supports buttons, menus, sliders, tabs and other basic GUI widgets. XPCE is available for all platforms supported by SWI-Prolog.
PceEmacs is a SWI-Prolog builtin editor. PceEmacs is an Emacs clone implemented in Prolog (and XPCE). It supports proper indentation, syntax highlighting, full syntax checking by calling the SWI-Prolog parser, warning for singleton variables and finding predicate definitions based on the source information from the Prolog database.
JPL is a bidirectional interface between Java and Prolog.[9] It requires both SWI-Prolog and Java SDK.[10] It is installed as a part of SWI-Prolog.
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.