Fact-checked by Grok 2 weeks ago

SWI-Prolog

SWI-Prolog is a free, open-source implementation of the logic programming language, providing a comprehensive and portable environment for developing robust, scalable applications in areas such as , , and . It emphasizes practical usability with features like multi-threading, , and extensive interfaces to other languages including C, , , and , making it suitable for both educational purposes and real-world deployment. Development of SWI-Prolog began in 1986 at the under Jan Wielemaker, initially motivated by the need for a system capable of recursive interaction with C code for building knowledge-intensive applications. The initial version (0.0.0) was based on the Portable Compiler by D.L. Bowen, L.M. Byrd, and W.F. Clocksin, evolving over decades into a mature system with ongoing enhancements driven by community needs. By 2003, it had already established itself as a popular option, with tools for interactive development, , and tailored to both novice students and professional developers handling large-scale projects. Key strengths of SWI-Prolog include its fast and memory-efficient engine, which compiles large knowledge bases like 3.0 in seconds while maintaining a small footprint (core kernel around 1.6 MB), and support for advanced capabilities such as tabling with well-founded semantics, unbounded integers, and delimited continuations. It adheres closely to ISO and Prolog standards while extending them with modern features like handling, dictionary data structures, and a built-in HTTP framework for web applications, enabling scalable server-side processing with up to 80-fold speedup on multi-core systems. The environment integrates graphical tools like PceEmacs for editing and a source-level , alongside command-line utilities for tasks such as autoloading modules and make facilities, fostering an efficient edit-reload cycle. Widely adopted in academia for teaching and in for applications involving rule-based reasoning, SWI-Prolog powers tools like the SWISH web-based for collaborative development and supports to databases (via ODBC), RDF for semantic data, and robotics frameworks like ROS2. Its portability across Unix, Windows, macOS, and , combined with over a million downloads, underscores its role as a for implementation in research and practical settings.

History and Development

Origins and Early Development

Development of SWI-Prolog began in 1986 by Jan Wielemaker at the University of Amsterdam's SWI (Sociaal-Wetenschappelijke Informatieverwerking) department, initially as a research tool to support projects involving and database applications, such as analyzing textual data from interview transcripts. The development was motivated by the need for a more practical extension of beyond pure academic , addressing limitations in commercial systems like Prolog by emphasizing rapid prototyping for interactive, knowledge-intensive applications. Early efforts included integrating with via a bi-directional to enhance performance and enable graphical user interfaces using the PCE library, marking a shift toward real-world . The first public release occurred in 1987 as an open-source dialect under an , designed with a strong emphasis on portability across Unix systems to facilitate distribution via anonymous FTP. Inspired by earlier work on portable compilers, such as Bowen et al. (1983), Wielemaker's initial implementation started as a modest "" system but quickly evolved during projects like (1990), where it replaced commercial alternatives due to its superior integration capabilities and responsiveness. Over the late and , SWI-Prolog transitioned from a specialized tool to a robust , gaining early adoption in European academic circles for and , particularly in owing to its free licensing, ease of installation, and compatibility with standard Prolog textbooks. This period also saw ports to platforms like MS-Windows, broadening its accessibility, and initial steps toward compliance with the emerging ISO Prolog standard to ensure interoperability.

Key Milestones and Releases

SWI-Prolog transitioned to the GNU Lesser General Public License (LGPL) in version 5.0, released in 2006, unifying its licensing from a previous dual GPL/proprietary model to promote wider open-source adoption. This change facilitated integration with external libraries and tools while maintaining copyleft protections for derivative works. In 2017, starting with version 7.3.33, the license shifted to the more permissive Simplified BSD license, further encouraging commercial and embedded use by reducing restrictions on binary distributions. A major advancement came in version 5.0 with the introduction of multithreading support, initially as an alpha feature for , enabling concurrent execution of goals across multiple threads and improving performance on multi-core systems. This laid the groundwork for scalable applications in environments. Building on this, version 5.11, released in 2009, added built-in web server capabilities through the HTTP library, which became essential for developing applications and server-side . More recent developments include version 9.0, released on November 24, 2022, which introduced enhanced (WASM) support, allowing SWI-Prolog to run directly in web browsers and facilitating . The 9.3.x development series, starting in March 2024 and continuing through 2025 with releases up to version 9.3.30 in September 2025, brought improvements to pack management for easier dependency handling and refined processing for better integration with modern web APIs and data interchange formats. By 2025, SWI-Prolog had surpassed one million downloads, underscoring its growing adoption in research, education, and commercial domains.

Core Features

Language Implementation and Standards

SWI-Prolog is largely compliant with the ISO/IEC 13211-1:1995 standard, supporting core elements such as the for terms (including atoms, variables, numbers, and compound terms), the unification for matching and variables, and the mechanism for search and failure handling. This compatibility ensures that standard programs can typically run with minimal adjustments, while SWI-Prolog's implementation choices prioritize practical usability and performance within the Prolog tradition. Beyond the base ISO standard, SWI-Prolog introduces extensions for modern requirements, including full support for international text handling in source code, atoms, and strings, which extends the ASCII-limited defined in the standard. It also provides rational numbers as a native type (when compiled with the GMP ), enabling exact fractional without floating-point approximations, and arbitrary-precision integers for computations exceeding fixed-size limits. Dialect-specific features in SWI-Prolog enhance expressiveness for common tasks like and manipulation; for instance, quasi-quotations allow embedding of external language snippets (such as HTML or SQL) directly in code using syntax like `Syntax(Prolog terms)`, facilitating syntax-aware interpolation without manual escaping. Additionally, support for Definite Clause Grammars (DCGs) is provided through the built-in phrase/2 predicate, which processes input lists against rules expanded into difference list operations, streamlining the implementation of parsers and generators. For portability, SWI-Prolog runs on a wide range of platforms, including systems (such as and BSD), Windows, macOS, and architectures (including and ), ensuring cross-environment deployment. Efficiency is achieved through compilation to executed by the ZIP , which optimizes invocation and indexing while maintaining the interpreted nature of .

Built-in Libraries and Tools

SWI-Prolog includes a rich set of built-in libraries that extend its core functionality for practical programming tasks, emphasizing modularity and ease of use. The package provides comprehensive support for building web applications, featuring an HTTP server infrastructure composed of modular components such as http_server, http_dispatch, and http_json. This enables developers to create RESTful services and endpoints, with the server handling request dispatching, JSON serialization, and reply formulation from terms. Introduced in version 5.11, this library facilitates dynamic web content generation directly in , supporting features like multipart form data parsing and secure connections via . The library(semweb) offers robust tools for processing, including an efficient in-memory RDF store for loading, querying, and manipulating ontologies in formats like , , and . It supports RDFS and inferences, as well as 1.1 querying through predicates like sparql/3, allowing complex graph and federated queries across endpoints. This library forms the foundation for the ClioPatria framework, a server that builds upon semweb and http packages to provide endpoints, linked integration, and faceted browsing interfaces. To enhance extensibility, SWI-Prolog incorporates the pack system, a introduced in version 6.3.0 in 2012, which allows users to install, update, and manage third-party libraries from a central registry using the pack_install/1 predicate. This system supports Git-based repositories and handles dependencies, enabling seamless integration of extensions like additional parsers or interfaces without manual compilation. Complementing this, developer tools include PceEmacs, an integrated Emacs-like editor for source code editing with , indentation, and cross-referencing capabilities. For browser-based development, SWISH serves as an online , providing a interface for editing, executing, and sharing programs with real-time visualization of traces and outputs. Additionally, the plunit library implements a framework compatible with standards, offering predicates for defining test suites, assertions, and coverage reporting to ensure code reliability. Debugging is supported by a native tracer that integrates with the XPCE graphical toolkit, providing a source-level with step-by-step execution, inspection, and spy points. Activated via predicates like trace/0 or gtrace/0 for the graphical variant, it displays call stacks, goals, and bindings in a windowed interface, facilitating efficient program analysis and error detection. These tools collectively promote productive development workflows while adhering to ISO standards for compatibility.

Technical Architecture

Execution Model

SWI-Prolog executes programs using an extended version of the virtual machine, a minimal originally defining only seven instructions for stack-based operations, which facilitates efficient compilation of code into readable VM instructions. This design diverges from the more complex (WAM) used in many other implementations, enabling SWI-Prolog to support dynamic loading of pre-compiled Quick Load Files (.qlf) alongside on-the-fly compilation of source files (.pl) into VM code, allowing seamless integration of mixed code sources during runtime without requiring full program recompilation. The extension in SWI-Prolog incorporates additional instructions for features like multithreading and foreign language interfaces, maintaining portability across platforms while optimizing for server-side and embedded applications. The core unification process in SWI-Prolog performs pattern matching to bind variables and structures, employing first-argument indexing to select candidate clauses efficiently before attempting full unification. By default, the built-in predicate =/2 omits the occurs check during unification, permitting the creation of cyclic terms (rational trees) for efficiency in applications involving infinite data representations, as in:
?- X = f(X).
X = f(X).
However, to prevent infinite structures and ensure logical soundness, the unify_with_occurs_check/2 explicitly performs the occurs check, failing unification if a variable would bind to a term containing itself, such as:
?- unify_with_occurs_check(X, f(X)).
false.
Unification failures propagate through , where the system restores prior bindings and explores alternative clauses or goals, supporting the non-deterministic search inherent to . Predicate invocation occurs through VM instructions that manage stack frames for calls, returns, and choice points, with SWI-Prolog implementing last-call optimization (LCO) to reuse the current stack frame for tail-recursive predicates, avoiding stack growth in deep recursions and enabling efficient iterative-style programming. For example, in an accumulator-based tail-recursive :
factorial(N, F) :- factorial_acc(N, 1, F).
factorial_acc(0, F, F).
factorial_acc(N, A, F) :- N > 0, N1 is N-1, A1 is A * N, factorial_acc(N1, A1, F).
The recursive call to factorial_acc/3 is in tail position, qualifying for LCO and consuming constant stack space regardless of recursion depth. This optimization, combined with support, enhances performance in non-deterministic searches by minimizing overhead while preserving for multiple solutions. in SWI-Prolog relies on a segmented with dedicated stacks for s (terms and atoms), locals ( frames), (bindings), and choice points ( frames). The stack records variable bindings made during forward execution, allowing their undoing upon or failure, which is essential for maintaining purity in search processes. collection operates incrementally on the and stacks, reclaiming unreferenced automatically when usage thresholds are exceeded or manually via garbage_collect/0, with tunable limits to balance performance and footprint; for instance, the gc Prolog flag controls automatic invocation frequency. This model supports large-scale applications by efficiently handling dynamic and destruction without manual intervention.

Constraint Logic Programming

SWI-Prolog supports constraint logic programming (CLP) through attributed variables, which enable delaying constraint evaluation until necessary for propagation during unification or labeling. These variables were introduced in 2004 to extend the core unification mechanism, allowing constraints to be attached to variables and propagated incrementally. This foundation facilitates declarative modeling of combinatorial problems by suspending unification until domains are sufficiently reduced, integrating seamlessly with Prolog's backtracking search. The system provides multiple CLP solvers tailored to different domains. CLP(FD) handles finite domain constraints over integers, supporting propagation techniques like arc consistency to prune inconsistent values efficiently. It is accessed via the library(clpfd), offering predicates such as labeling/2 for enumerating solutions from remaining domains, ins/2 for inserting variables into finite domains (e.g., X [ins](/page/INS) 1..10), and all_different/1 for ensuring distinct values among a list of variables. For instance, solving a simple might involve:
?- use_module(library(clpfd)).
?- [X, Y] ins 1..3, X #\= Y, all_different([X, Y]), labeling([X, Y]).
X = 1, Y = 2 ;
X = 1, Y = 3 ;
X = 2, Y = 1 ;
X = 2, Y = 3 ;
X = 3, Y = 1 ;
X = 3, Y = 2.
This example demonstrates propagation: after posting all_different/1, domains are reduced without immediate binding, and labeling/2 explores valid assignments. CLP(Q,R), implemented in library(clpqr), solves linear constraints over rational numbers (CLP(Q)) and reals (CLP(R)), including optimization via branch-and-bound. CLP(B), via library(clpb), manages boolean constraints using binary decision diagrams for tasks like satisfiability checking. Additionally, the inclpr package provides INCLP(R) for nonlinear interval constraints over reals, using interval arithmetic for enclosure and propagation. These solvers excel in applications such as scheduling and optimization, where CLP(FD) models and timetabling by posting constraints on variables representing tasks or times, then using and search to find feasible solutions. For example, in , predicates like cumulative/2 enforce resource limits, enabling efficient solving of NP-hard problems through domain reduction and . The integration via dedicated libraries ensures CLP paradigms enhance Prolog's declarative style without altering the core execution model.

Extensions and Integrations

Graphical and User Interface Extensions

SWI-Prolog provides several extensions for graphical user interfaces (GUIs) and visualizations, enabling developers to create interactive applications directly within the Prolog environment. The primary GUI toolkit is XPCE (Prolog Common Objects Environment), which integrates object-oriented programming with Prolog to support widget-based interfaces and event-driven interactions. XPCE originated from the PCE project initiated in 1985 by Anjo Anjewierden to develop a high-level UI environment for Prolog, and it has been closely integrated with SWI-Prolog since its redesign during the Esprit P1098 (KADS) project in the late 1980s. The toolkit features an object-oriented engine where methods can be defined in Prolog or C, providing native support for Prolog data types, exception handling, and high-level abstractions for event processing, layout management, and redrawing. It includes a class library for standard widgets such as buttons, menus, sliders, and dialogs, allowing for the rapid prototyping of cross-platform GUIs on X11 and Windows systems. Built on XPCE, PceEmacs serves as an integrated, Emacs-like editor tailored for Prolog development, offering syntax highlighting, indentation, and debugging tools within the SWI-Prolog environment. It emulates key GNU Emacs commands while incorporating modern editor features for accessibility, and can be activated via the emacs/0 or emacs/1 predicates, or set as the default editor through the editor Prolog flag. PceEmacs includes a dedicated Prolog mode that performs real-time syntax checking by consulting the loaded file, indexes predicates for navigation, and supports cross-referencing to facilitate debugging and code exploration. For web-based interaction, SWISH (SWI-Prolog for SHaring) offers a browser-based interface launched in , allowing users to execute code online, share notebooks, and visualize execution traces collaboratively. SWISH runs in a sandboxed environment on a public server, supporting query execution, data rendering, and integration with libraries for tasks like RDF handling, while providing features such as version history and TogetherJS for real-time collaboration. It can also be installed locally for private use, extending its utility beyond the online demo. Additional visualization capabilities include the library(graphviz) pack, which enables the generation of graph diagrams from terms using the DOT language, supporting output to files or viewers for rendering directed graphs, trees, and networks. Console-based GUIs are facilitated through XPCE's classes and readline integration, allowing text-mode interfaces with basic interactivity like menus and prompts without full graphical support. The pack system further extends these options by distributing community-contributed GUI packs, such as those for additional widgets or plotting tools.

Interoperability Interfaces

SWI-Prolog provides several mechanisms for integrating with other programming languages and systems, enabling it to serve as a component in hybrid applications. These interfaces leverage the system's capabilities to facilitate bidirectional communication, data exchange, and , allowing developers to combine Prolog's declarative strengths with imperative or object-oriented paradigms. One prominent interface is JPL, a bidirectional Java-Prolog bridge developed since 2001 that uses the (JNI) and SWI-Prolog's foreign interface. JPL allows applications to embed and query engines, while code can access objects and methods seamlessly, supporting reentrant calls and term mapping between the languages without wrappers. This enables scenarios such as rule-based reasoning in Java-based enterprise systems. For lower-level integrations, SWI-Prolog's foreign language interface supports embedding and code, allowing custom s to be defined and registered using PL_register_foreign/2. This links a name to a C function, enabling high-performance extensions for tasks like numerical computations or interactions that exceed Prolog's native capabilities. The interface emphasizes flexibility and performance, with C++ wrappers providing a more natural syntax for object-oriented extensions. Additional bindings include the Janus library for Python integration, which offers bidirectional embedding of SWI-Prolog in runtimes and vice versa, supporting features like thread-safe calls, dicts, and unbounded integers via the C embedding APIs of both languages. SWI-Prolog also provides interfaces to through external libraries like swipl-rs, which utilize the foreign interface to embed in applications or write -based extensions for . Database connectivity is handled through the ODBC package, which implements the standard to query and manipulate data in relational databases like or using parameterized SQL statements. Networked communication is facilitated by the library, providing and support for client-server interactions, including broadcasting and stream-based connections. SWI-Prolog also supports server mode through the Machine Query Interface (MQI), allowing embedding in external applications such as rule engines by launching a JSON-based query that other languages can interact with programmatically. This mode enables SWI-Prolog to act as a backend without direct process . For web interoperability, the HTTP provides a lightweight for RESTful and dynamic content generation.

Applications and Community

Notable Use Cases

SWI-Prolog powers the ClioPatria toolkit, which provides an RDF store, inference engine, and endpoint for building applications, particularly in domains. ClioPatria integrates SWI-Prolog's semweb libraries to enable efficient querying and reasoning over large RDF datasets in memory. It has been deployed in projects like EuropeanaConnect, where it supports automation for aggregating and enriching across institutions. In , SWI-Prolog facilitates applications such as chatbots and basic text analysis through its package, which includes routines for , , and . Historically, implementations like SWI-Prolog have supported systems by leveraging logic-based parsing and unification for syntactic and semantic analysis. Integration with Python-based tools like NLTK is enabled via the bidirectional interface, allowing to call Python NLP functions for tasks like or in hybrid systems. Commercially, SWI-Prolog supports rule-based expert systems in sectors requiring logical , such as and healthcare. It excels in formal domains like business rules and semi-formal domains like medical guidelines. These applications benefit from SWI-Prolog's ability to handle uncertain knowledge and integrate with external data sources for real-time reasoning. SWI-Prolog is a staple in education, particularly in courses on and , due to its robust tutorial ecosystem and accessibility. The SWISH web-based interface allows students to experiment with code in browsers without local installation, supporting interactive notebooks for topics like search algorithms and knowledge representation. It features prominently in textbooks such as "Logic Programming with Prolog" by Max Bramer, which uses SWI-Prolog examples for teaching unification, , and design. SWISH-based tutorials have been adopted in university curricula for hands-on , enabling and immediate feedback on queries. Recent developments include SWI-Prolog's (WASM) port, introduced around 2019 and matured by 2023, which enables running code directly in web browsers for client-side tools. This port supports browser-based applications like logic solvers and engines, with integrations such as the SWI-Prolog MCP Server allowing agents to query knowledge bases securely for tasks in and decision support.

Development Community and Ecosystem

SWI-Prolog is primarily maintained by Jan Wielemaker, who serves as the lead developer and oversees much of its evolution through his role at SWI-Prolog Solutions b.v. and affiliations with institutions like VU University Amsterdam. Contributions from the community are facilitated via the official repository at https://github.com/SWI-Prolog/swipl, which by 2025 has garnered over 1,000 stars and involves 95 contributors submitting patches, extensions, and bug fixes. Additionally, discussions and announcements occur through the SWI-Prolog forum, which functions as the primary for users and developers to collaborate on issues and share insights. The ecosystem is bolstered by the SWI-Prolog pack registry, a centralized repository hosting approximately 400 community-contributed packages as of 2025, enabling easy installation and management via the built-in pack_install/1 . These packages extend functionality across diverse domains; for instance, the swipy provides a bi-directional interface between SWI-Prolog and , facilitating integration with Python-based tools like or . In cryptography, the crypto offers bindings to for tasks such as hashing, encryption, and digital signatures, supporting secure data handling in applications. SWI-Prolog actively engages with the broader community through events like the International Conference on (ICLP), where it has been featured in presentations, workshops, and tutorials on its extensions, such as constraint solving and tools. For example, ICLP sessions have highlighted SWI-Prolog's role in advancing implementations, including clean-room derivations of its execution model. Documentation forms a cornerstone of the ecosystem, with the comprehensive reference manual spanning detailed coverage of predicates, libraries, and extensions—exceeding 1,000 pages in its compiled form across sections. Online resources are accessible via PLDOC (Prolog Documentation), a dynamic system that generates browsable documentation for the core library and installed packs, promoting ease of learning and reference. From its origins in academic projects at the in 1986, SWI-Prolog has grown to serve over 1 million users worldwide, driven by its open-source model and adoption in research, education, and industry. Corporate support, including sponsorships from entities like Kyndi for integrating semantic technologies, alongside compatibility testing efforts with systems like SICStus Prolog, ensures ongoing robustness and interoperability.

References

  1. [1]
    SWI-Prolog
    SWI-Prolog offers a comprehensive free Prolog environment. Since its start in 1987, SWI-Prolog development has been driven by the needs of real world ...DownloadSWISHDownload pageHome download documentation2.1 Getting started quickly
  2. [2]
    SWI-Prolog's features
    SWI-Prolog features include a rich interface, scalability, multi-threading, JITI, various development tools, and a fast, robust engine.Prolog As Unifying Language · Feature List · EngineMissing: 2025 | Show results with:2025
  3. [3]
    [PDF] An Overview of the SWI-Prolog Programming Environment
    – Command line history. SWI-Prolog provides a history facility that resembles the Unix csh and bash shells. Especially viewing the list of executed commands is ...
  4. [4]
    Publications about SWI-Prolog
    SWI-Prolog's origin. SWI-Prolog 0.0.0 was based on A Portable Prolog Compiler by D.L. Bowen, L.H. Byrd and W.F. Clocksin. Papers using SWI- ...
  5. [5]
    [1011.5332] SWI-Prolog - arXiv
    Nov 24, 2010 · Abstract:SWI-Prolog is neither a commercial Prolog system nor a purely academic enterprise, but increasingly a community project.Missing: origins motivations natural language processing
  6. [6]
    SWI-Prolog: history and focus for the future
    Jun 30, 2012 · After my studies, in 1985, I became a researcher at the SWI department of the University of Amsterdam. SWI was led by Bob Wielinga and SWI ...Missing: 1987 | Show results with:1987
  7. [7]
    SWI-Prolog 5.1.4 Reference Manual: Section 1.6
    Finally, an alpha version of a multi-threaded SWI-Prolog for Linux is added. ... Version 5.0 marks a breakpoint in the phylosophy, where SWI-Prolog moves ...<|separator|>
  8. [8]
    SWI-Prolog License Conditions (prior to 7.3.33)
    This file describes the license conditions up to SWI-Prolog 7.3.32. Later versions are distributed under the permissive Simplified BSD license. See license.
  9. [9]
    Possible additional license requirements - SWI-Prolog
    SWI-Prolog is covered by the Simplified BSD license. Redistribution and use in source and binary forms, with or without modification, are permitted.Missing: history | Show results with:history
  10. [10]
    [PDF] SWI-Prolog 5.0
    This manual describes version 5.0 of SWI-Prolog. SWI-Prolog has been used ... Finally, an alpha version of a multi-threaded SWI-Prolog for Linux is added.
  11. [11]
    section('packages/http.html') - SWI-Prolog
    This article documents the package HTTP, a series of libraries for accessing data on HTTP servers as well as providing HTTP server capabilities from SWI-Prolog.
  12. [12]
    News -- SWI-Prolog 9 has arrived
    Nov 24, 2022 · A port to WASM WebAssembly allows running SWI-Prolog in the browser. The high level bi-directional interfaces to JavaScript allows for ...Missing: 2023 | Show results with:2023<|separator|>
  13. [13]
    Ann: SWI-Prolog 9.2.0 (stable) and 9.3.0 (new devel series)
    Feb 1, 2024 · Version 9.0.0 was released November 24, 2022, about 14 months ago. The number of changes is large and would not have been possible without the ...
  14. [14]
    The SWI-Prolog syntax
    SWI-Prolog syntax is close to ISO-Prolog, based on Edinburgh Prolog, with extensions. It uses Unicode for character classification and has nested comments.
  15. [15]
    [PDF] Reference Manual - SWI-Prolog
    In addition to the ISO Prolog stan- dard it is largely compatible to Quintus, SICStus and YAP Prolog. SWI-Prolog provides a compatibility framework developed in ...
  16. [16]
    Unicode Prolog source
    Jan 17, 2020 · The ISO standard specifies the Prolog syntax in ASCII characters. As SWI-Prolog supports Unicode in source files we must extend the syntax.
  17. [17]
    SWI-Prolog -- Rational number syntax
    As of version 8.1.22, SWI-Prolog supports rational numbers as a primary citizen atomic data type if SWI-Prolog is compiled with the GMP library.
  18. [18]
    SWI-Prolog -- Arithmetic types
    Without GMP, SWI-Prolog integers are 64-bits, regardless of the native integer size of the platform. The type of integer support can be detected using the ...Missing: infinite | Show results with:infinite
  19. [19]
    quasi_quotations.pl -- Define Quasi Quotation syntax - SWI-Prolog
    Quasi quotation allows for embedding (long) strings using the syntax of an external language (e.g., HTML, SQL) in Prolog text and syntax-aware embedding of ...
  20. [20]
    SWI-Prolog -- phrase/2
    Availability:built-in. Source phrase( :DCGBody, ?List ): Equivalent to phrase( DCGBody , InputList , []) . Tags are associated to your profile if you are ...
  21. [21]
    SWI-Prolog -- Implementation history
    1.5 Implementation history​​ SWI-Prolog started back in 1986 with the requirement for a Prolog that could handle recursive interaction with the C-language: ...
  22. [22]
    3 The HTTP server libraries - SWI-Prolog
    The HTTP server infra structure consists of a number of small modular libraries that are combined into library(http/http_server).
  23. [23]
    SWI-Prolog -- library(http/http_json): HTTP JSON Plugin module
    Typically JSON is used by Prolog HTTP servers. This module supports two JSON representations: the classical representation and the new representation supported ...Missing: RPC | Show results with:RPC
  24. [24]
    section('packages/semweb.html') - SWI-Prolog
    This document describes the SWI-Prolog semweb package. The core of this package is an efficient main-memory based RDF store that is tightly connected to Prolog.
  25. [25]
    library(semweb/sparql_client): SPARQL client library - SWI-Prolog
    This module provides a SPARQL client. For example: sparql_query('select * where { ?x rdfs:label "Amsterdam" }', Row, [ host('dbpedia.org'), path('/sparql/')]).
  26. [26]
    ClioPatria: the SWI-Prolog Semantic Web Server
    SWI-Prolog offers an extensive library for loading, saving and querying Semantic Web documents called the semweb package. Internally, the query language is ...
  27. [27]
    SWI-Prolog -- Manual
    **Summary of Pack System from https://www.swi-prolog.org/pldoc/man?section=prolog-pack:**
  28. [28]
    SWI-Prolog packages
    You can search for packages from the Prolog command line using pack_list/1. This contacts the pack server for packs that match by name or title.Missing: 2024 2025
  29. [29]
    SWI-Prolog 6.3.4 Reference Manual: Section A.21 - SakaLab
    A.21 library(prolog_pack): A package manager for Prolog. To be done: - Version logic - Find and resolve conflicts - Upgrade git packages
  30. [30]
    2.10 Overview of the Debugger - SWI-Prolog
    Note: If the native graphics plugin (XPCE) is available, the commands gtrace/0 and gspy/1 activate the graphical debugger while tdebug/0 and tspy/1 allow ...
  31. [31]
    XPCE: the SWI-Prolog native GUI library
    XPCE is a toolkit for developing graphical applications in Prolog and other interactive and dynamically typed languages. XPCE follows a rather unique approach ...
  32. [32]
    3.4 Using the PceEmacs built-in editor - SWI-Prolog
    PceEmacs closely mimics Richard Stallman's GNU-Emacs commands, adding features from modern window-based editors to make it more acceptable for beginners.Missing: SWISH plunit
  33. [33]
    SWISH -- SWI-Prolog for SHaring
    SWISH. File. Save ... Info & history ... Reload; Open recent ... Editor; Chat; Login extras; Limitations; Caveats; Background; Privacy statement ? users online.Prolog-family-treeFile
  34. [34]
    section('packages/plunit.html') - SWI-Prolog
    This document describes a Prolog unit-test framework. This framework was initially developed for SWI-Prolog. The current version also runs on SICStus Prolog.Missing: SWISH | Show results with:SWISH
  35. [35]
  36. [36]
    unify_with_occurs_check/2 - SWI-Prolog
    The SWI-Prolog implementation of unify_with_occurs_check/2 is cycle-safe and only guards against creating cycles, not against cycles that may already be present ...
  37. [37]
    2.19 System limits - SWI-Prolog
    The trail stack is used to store assignments during execution. Entries on this stack remain alive until backtracking before the point of creation or the garbage ...Missing: management | Show results with:management
  38. [38]
    4.43 Memory Management - SWI-Prolog
    1 Garbage collection. garbage_collect: Invoke the global and trail stack garbage collector. Normally the garbage collector is invoked automatically if necessary ...
  39. [39]
    SWI-Prolog -- Attributed variables
    Attributed variables provide a technique for extending the Prolog unification algorithm Holzbaur, 1992 by hooking the binding of attributed variables.Missing: date | Show results with:date
  40. [40]
    8 Constraint Logic Programming - SWI-Prolog
    This chapter describes the extensions primarily designed to support constraint logic programming (CLP), an important declarative programming paradigm.
  41. [41]
    CLP(FD): Constraint Logic Programming over Finite Domains
    This library provides CLP(FD): Constraint Logic Programming over Finite Domains. This is an instance of the general CLP(X) scheme (section 8), extending logic ...
  42. [42]
    [PDF] The Finite Domain Constraint Solver of SWI-Prolog - Markus Triska
    Jan 22, 2009 · CLP(FD), constraint logic programming over finite domains, is a declarative formalism for describing combinatorial problems such as ...
  43. [43]
  44. [44]
    library(clpb): CLP(B): Constraint Logic Programming over Boolean ...
    In the following, each CLP(B) predicate is described in more detail. We recommend the following link to refer to this manual: http://eu.swi-prolog.org/man/clpb.
  45. [45]
    SWI-Prolog/packages-inclpr: Constraint solver for nonlinear ... - GitHub
    This software is a Constraint Logic Programming library, capable of solving nonlinear (polynomial) constraints over the real numbers. It is based on interval ...
  46. [46]
  47. [47]
    Programming in XPCE/Prolog: Section 1.6
    ### Summary of XPCE History
  48. [48]
    SWI-Prolog -- Prolog Mode
    After a short pause (2 seconds), PceEmacs opens the edit buffer and reads it as a whole, creating an index of defined, called, dynamic, imported and exported ...
  49. [49]
    SWI-Prolog/swish: SWI-Prolog for SHaring: a SWI-Prolog web IDE
    Dec 16, 2019 · A web based SWI-Prolog environment. There are three ways to use SWISH, which we list in increasing order of complexity.
  50. [50]
    "prolog_graphviz" pack for SWI-Prolog
    The basic feature of this library is that it allows you to write to a GraphViz output file or to a GraphViz viewer by simply writing to a Prolog output stream.
  51. [51]
    12 Foreign Language Interface - SWI-Prolog
    Compatibility with other Prolog dialects · Glossary of Terms · SWI-Prolog ... So we have two neglected issues by the ISO core standard, multi-threading ...
  52. [52]
    JPL: A bidirectional Prolog/Java interface
    JPL is a library using the SWI-Prolog foreign interface and the Java jni interface providing a bidirectional interface between Java and Prolog that can be ...
  53. [53]
    JPL - Introduction
    To provide a dynamic, bidirectional, interface between SWI-Prolog and Java runtimes, JPL offers two APIs: a Java API to access Prolog from Java and a Prolog API ...
  54. [54]
    1 A C++ interface to SWI-Prolog
    Prolog errors are now converted to C++ exceptions (which contain the exception term rather being a subclass of PlTerm as in version 1), where they can be caught ...
  55. [55]
    SWI-Prolog -- Introduction
    The API of Janus is the result of discussions between the SWI-Prolog, XSB and Ciao lang teams. It will be reflected in a PIP (Prolog Improvement Proposal).
  56. [56]
    section('packages/odbc.html') - SWI-Prolog
    This document describes the SWI-Prolog interface to ODBC, the Microsoft standard for Open DataBase Connectivity.
  57. [57]
    Network socket (TCP and UDP) library - SWI-Prolog
    The library(socket) provides TCP and UDP inet-domain sockets from SWI-Prolog, both client and server-side communication. The interface of this library is very ...
  58. [58]
    section('packages/mqi.html') - SWI-Prolog
    This package provides the library mqi.pl that enables embedding SWI Prolog into just about any programming language (Python, Go, C#, ...
  59. [59]
    Embedding SWI-Prolog in other applications
    Prolog itself only provides for embedding in the C language (compatible with C++). Embedding in Java is achieved using JPL using a C-glue between the Java and ...Missing: server | Show results with:server
  60. [60]
    [PDF] ClioPatria: A SWI-Prolog Infrastructure for the Semantic Web
    SWI-Prolog provides an efficient C-based main-memory RDF store that is designed to cooperate naturally and efficiently with Prolog, realizing a flexible. RDF- ...
  61. [61]
    ClioPatria: the SWI-Prolog RDF toolkit
    ClioPatria is a SWI-Prolog application that integrates SWI-Prolog's the SWI-Prolog libraries for RDF and HTTP services into a ready to use (semantic) web server ...
  62. [62]
    section('packages/nlp.html') - SWI-Prolog
    This package contains some well known basic routines for natural language processing and information retrieval. The current version of this package is very ...Missing: translation chatbots NLTK
  63. [63]
    An Introduction to Prolog - Applied AI Course
    Jan 30, 2025 · Prolog (Programming in Logic) is a logic programming language primarily used in artificial intelligence, natural language processing, and expert systems.
  64. [64]
    section('packages/janus.html') - SWI-Prolog
    Using janus allows the same Python code to be used from different Prolog systems, while using janus_swi allows the same code to be used both for embedding ...
  65. [65]
    Using SWI-Prolog commercially
    The Prolog code can be distributed as source or virtual machine code (similar to e.g., Java .class and .jar files). The virtual machine code may just be for ...Q&a · Q: What About All Reasons... · Q: Licenses, Open Source
  66. [66]
    Logic Programming with Prolog | SpringerLink
    In stockLogic programming, using Prolog, is a distinctive style for complex applications, especially in AI. This book is for beginners and is compatible with SWI- ...Missing: education SWISH
  67. [67]
    [PDF] Using SWISH to realise interactive web based tutorials for logic ...
    Apr 10, 2018 · SWISH consists of a web server written in SWI-Prolog and a client application written in JavaScript. In this sense the design is similar to that ...
  68. [68]
    13 Using SWI-Prolog in your browser (WASM)
    The SWI-Prolog WebAssembly (WASM) port lets you run SWI-Prolog directly in your browser. This is a fairly comprehensive version of SWI-Prolog that supports the ...
  69. [69]
    SWI-Prolog/swipl-wasm - GitHub
    Aug 29, 2022 · Run SWI-Prolog in your browser using WebAssemply. Contribute to SWI-Prolog/swipl-wasm development by creating an account on GitHub.Missing: 2023 | Show results with:2023
  70. [70]
    Jan Wielemaker JanWielemaker - GitHub
    SWI-Prolog lead developer, semantic web. Founder of SWI-Prolog Solutions b.v. Guest researcher at the VU, Amsterdam. - JanWielemaker.
  71. [71]
    SWI-Prolog stable releases - GitHub
    SWI-Prolog is an open source (BSD-2) implementation of the Prolog language with many extensions. It is implemented in C (version 11) and Prolog and is ...
  72. [72]
    Where is the community? - SWI-Prolog
    The forum and mailing list for SWI-Prolog is kindly hosted by Discourse. This list is used for announcements as well as questions and discussion among users.
  73. [73]
    SWI-Prolog/packages-swipy: Python interface for SWI-Prolog - GitHub
    A bi-directional interface between SWI-Prolog and Python. This code implements a ready-to-use bi-directional interface to Python.
  74. [74]
  75. [75]
    [ODF] 25 Years (SWI-)Prolog
    A brief history of SWI-Prolog. 1983 D. L. Bowen, L. M. Byrd, and WF. Clocksin ... Implementation. Maintenance. Progress. Shared API. Stable API. Independent ...
  76. [76]
    [PDF] A Hitchhiker's Guide to Reinventing a Prolog Machine - DROPS
    Jan 22, 2025 · As the cost of this operation is virtually 0, it is not worth making it a debug-only option. Note that we will ensure that the Java compiler ...Missing: Zero- | Show results with:Zero-
  77. [77]
    manual - SWI-Prolog
    This manual documents the SWI-Prolog system, intended for those familiar with Prolog, and covers topics like built-in predicates and extensions.Missing: features | Show results with:features
  78. [78]
    Contributors to SWI-Prolog
    Here we list the more frequent or significant contributions. Contact Jan Wielemaker if you want to be put on, removed from this list or you have other ...
  79. [79]
    SICStus 3 compatibility library - SWI-Prolog
    This library only provides compatibility with version 3 of SICStus Prolog. For SICStus Prolog 4 compatibility, use library(dialect/sicstus4) instead.