Did you know ... Search Documentation:
Title for pldoc(default)
Branch: development (switch to stable),
version to version

SWI-Prolog Changelog from version 9.3.31 to 9.3.32

[Oct 7 2025]

  • ADDED: Implement read_term/1: implement reading attributed and labeled terms. This patch supports Var{Attr: Value, ...} if the Prolog flag var_tag is set to attvar. This allows reading terms with attributes. It also supports labeled subterms that allows to read terms that are directed graphs rather than trees. This includes cyclic terms. For this we reserve the attributed =. For example
    ?- A = X{= : f(X)}.

    Binds A to a cyclic term equivalent to executing X = f(X). This is part of ongoing discussions in the PIP working group. It is currently implemented by ECLiPSe and SWI-Prolog.

[Oct 6 2025]

  • DOC: Updates documentation for using of # anonymous dicts.
  • TEST: Update tests for use of # anonymous dicts
  • MODIFIED: Dict.put(Path, Value): create new dicts as #{...}.
  • MODIFIED: select_dict/3 handling of # tag The # tag matches any tag at the other end and the dict holding the remainder has the # tag.

[Oct 3 2025]

  • MODIFIED: write_term/2 using attributes(write) This now writes Var{Att1: Value1, Att2: Value2, ...}, which is valid syntax for read_term/2 if the Prolog flag var_tag is attvar.

[Oct 2 2025]

  • ADDED: read_term/2 and friends to respect the new var_tag flag.
  • ADDED: Prolog flag var_tag Defines how Var{...} terms are interpreted. This commit only implements setting and getting the flag.

[Oct 1 2025]

  • MODIFIED: :</2 and >:</2: match # tag The tag # matches any tag on the other side without instantiating the tag.

[Oct 8 2025]

[Oct 2 2025]

  • FIXED: Exception details from '$tmp_file_stream'/4

[Oct 1 2025]

  • ERROR: Domain error: `encoding' expected, found `txt' The txt does not make sense * CLEANUP: Fixed more compilation warnings when using -O3

[Sep 30 2025]

  • BUILD: Fix PGO building for AppleClang
  • BUILD: Fix PGO build for Clang. This now does optimize.
  • BUILD: Changed default optimization for gcc to -O3 Earlier tests showed no noticeable difference, but using gcc-15 and setjmp()/longjmp out of the way we get about 15% improvement.
  • SANDBOX: Declare string quasi quotation syntax as safe.

[Sep 29 2025]

  • TEST: Fix format_time/3 tests by setting correct timezone.
  • WASM: Set defaults for best performant build.
  • ENHANCED: Move setjmp() out of the VM main function Using setjmp() harms register allocation, which slows down the VM. Some data points: Clang: 6% (Clang-17 on Apple M1 as well as Clang-20 on AMD3950X), GCC: 13% (GCC-15 on AMD3950X), WASM: 35% (Emscripten 4.0.15 on Node.js 22.19 on AMD3950X). MinGW-14: 18% (Windows binary running on AMD3950X under Wine).
  • TEST: Fixed ration number writing test to work regardless of flags. Test failed when run with rational_syntax set to natural.

[Sep 28 2025]

  • ENHANCED: Get rid of setjmp/longjmp() in PL_next_solutions() This improves performance by about 12%. It does make a couple of scenarios for stack overflow handling impossible though. This patch merely introduces O_THROW as C macro to enable/disable this.

[Sep 26 2025]

  • WASM: Make setting CFLAGS and LDFLAGS in BuildType.cmake work The if/elseif/... selection triggered on Clang.
  • WASM: Compile VM using -O2 This produces a smaller binary with slightly better performance.
  • WASM: When using a monolithic PL_next_solution(), use -O1 in Debug mode Otherwise local variables with non-overlapping scope are not merge, causing an Emscripten compiler error
  • WASM: Do not build swipl-win Also cleanup handling platform-dependent cmake options

[Sep 25 2025]

[Sep 24 2025]

  • FIXED: When a REPL loop receives the halt/0,1 exception, make it return. Before, if non-threaded or the REPL loop runs in the main thread, terminate the process. Otherwise halt/0 was ignored. The behaviour for the main thread is still the same, but prolog/0 succeeds in other threads if the thread calls halt/0.

    Possibly we should add a flag to control this behaviour, i.e. whether or not halt/0 inside prolog/0 terminates the process or merely the REPL loop.

Package archive

[Sep 30 2025]

  • CLEANUP: Avoid undefined warnings for gcc -O3

Package bdb

[Sep 30 2025]

  • CLEANUP: Avoid undefined warnings for gcc -O3

Package clib

[Oct 10 2025]

  • FIXED: crypt/2 on Windows using bsd-crypt.c: possible memory corruption.

[Oct 9 2025]

  • FIXED: urn-schema URIs can have a query and fragment field.

[Oct 8 2025]

  • MODIFIED: library(uri) to raise more exceptions and support URNs.

[Jun 9 2023]

[Sep 30 2025]

  • CLEANUP: Avoid undefined warnings for gcc -O3

Package http

[Sep 30 2025]

  • FIXED: Possible uninitialized variable (in error case)
  • SANDBOX: Declare Quasi Quotations for json, html and javascript as safe.

[Sep 28 2025]

  • ADDED: json quasiquotation syntax This allows for embedding JSON documents represented as a Prolog dict using e.g.
    ?- X = 10, D = {|json(X)||{"x": X}|}
    D = _{x:10}.

Package libedit

[Sep 30 2025]

  • CLEANUP: Avoid undefined warnings for gcc -O3

Package mqi

[Sep 27 2025]

  • PORT: Search for python3 executable to try python3 and then python. Modern systems are beginning to install only python, which is Python3.

    There isn't any support for python2 anymore, since 2020, and the windows installer does not install a python3.exe.

Package odbc

[Sep 30 2025]

  • CLEANUP: Avoid undefined warnings for gcc -O3 Also replaces local error functions with calls to PL_*_error()

Package semweb

[Sep 30 2025]

  • CLEANUP: Avoid undefined warnings for gcc -O3

Package sgml

[Sep 30 2025]

  • CLEANUP: Avoid undefined warnings for gcc -O3

Package ssl

[Sep 30 2025]

  • CLEANUP: Avoid undefined warnings for gcc -O3

Package table

[Sep 30 2025]

  • CLEANUP: Avoid undefined warnings for gcc -O3

Package tipc

[Sep 30 2025]

  • CLEANUP: Avoid undefined warnings for gcc -O3

Package xpce

[Oct 7 2025]

  • FIXED: Lazy binding of Prolog methods was not thread-safe.

[Oct 1 2025]

  • FIXED: Make double and triple click in Epilog copy the selection properly. This set the selection twice from an event, which apparently causes SDL3 to reset the selection.
  • FIXED: Incremental search backspace handling

[Sep 30 2025]

  • CLEANUP: Avoid undefined warnings for gcc -O3

[Sep 26 2025]

  • FIXED: Emacs mark+move cursor to maintain an active selection.

[Sep 24 2025]

  • FIXED: Correctly handle UTF-8 console output if the buffer ends with an incomplete UTF-8 character.

[Sep 23 2025]

  • FIXED: PceEmacs: make shift-caret movement extend the selection. Selection is now deactivated without shift.
  • FIXED: Resizing the thread monitor too small leads to a type error. Reported by @mike.elston