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

SWI-Prolog Changelog from version 9.3.24 to 9.3.25

[Jun 25 2025]

  • PORT: Discontinue 32-bit windows builds.

[Jun 23 2025]

  • PORT: Support library(editline) (libedit) on Windows. This provides cross-platform commandline editing with Prolog-sensitive completion.

[Jun 25 2025]

  • ADDED: Windows: tty_size/2 to also work on Windows consoles.

[Jun 23 2025]

  • WASM: Deal with new PL_prompt_string() API

[Jun 22 2025]

  • MODIFIED: Signature for PL_promot_string() and PL_prompt_next() These API functions now use the Prolog stream as argument to facilitate better support for Windows.

[Jun 19 2025]

  • ADDED: IOSTREAM* control message to get the Windows HANDLE
  • FIXED: wait_for_input/3: use Swinsock() from pl-stream.c rather than a local macro This ensures proper error messages if the input is not a socket.
  • MODIFIED: PL_dispatch() and friends now use IOSTREAM* instead of int. This is a first step to merge simultaneous handling of console outout and GUI dispatching for POSIX systems and Windows to a common design.

[Jun 18 2025]

  • WINE: Waiting for windows console input now works for wine.
  • PORT: Make installing INDEX.pl files work on Windows. Concurrency may cause sharing violations. This patch retries renaming the index file several times.

[Jun 17 2025]

  • FIXED: Possible early reclaim of closure blob after unwrapping a predicate. PL_unregister_atom() was called twice.

[Jun 11 2025]

  • ADDED: Incorporate epilog into the toplevel. These patches prepare for the XPCE based swipl-win. May be started by using the sdl branch of xpce and run as
    swipl -Depilog [arg ...]

[Jun 7 2025]

  • ADDED: '$run_state'/1 to query the current run state Can be used to detect code is running as part of the cleanup hooks.

[May 28 2025]

  • BUILD: Use SDL_VIDEODRIVER=dummy for running Prolog steps This makes sure the new SDL based xpce does not try to open graphics and is harmless on other targets.

[May 27 2025]

  • FIXED: Move swipl-win history support to library(win_menu). This library is loaded as source and thus conditional compilation applies. library(prolog_history) is compiled to .qlf. Now the code is also where it belongs.
  • FIXED: When generating _X variable names, avoid query variable names. Consider the below example by Jan Burse. Using _A in the answer is at least confusing. We must not only skip variable names that appear in the projection, but also variable names from the query that are not in the projection.
    ?- length(L,2), f(L) = R, S = [_A].
    L = [_A, _B],
    R = f([_A, _B]),
    S = [_A].

[May 24 2025]

  • FIXED: Terminal REPL loop using thread_exit(io_error) on an io_error during read.
  • FIXED: Termination of a REPL loop due to error state of the streams This did not properly close the query, crashing the system in the thread cleanup.
  • FIXED: thread_join/2: could leave L_THREAD mutex locked on error.

[May 23 2025]

  • ADDED: Allow thread_signal/2 to raise native signals by number. This can be used to raise e.g. SIGINT in a thread to debug it.

[May 22 2025]

[May 17 2025]

  • FIXED: write/1,2 to take rational number syntax from module user. Before, only write_term/2,3 supported "natural" rational number syntax.

[May 16 2025]

  • FIXED: Make the stream macros Suser_input safe when called from a non-Prolog thread Called from a non-Prolog thread caused these macros to crash. They now return NULL. The main-thread I/O can be obtained using Sinput, Soutput or Serror.

[May 2 2025]

  • ADDED: Allow hooking into the terminal link generation.
  • FIXED: Various details for the sys app
  • ADDED: Prolog flag linux
  • FIXED: QLF format to store references to predicates in the current module by functor. Otherwise, if a predicate is imported the clause will point at the import location, bypassing the predicate resolution that happens when loading the source.

[May 1 2025]

  • BUILD: Avoid cmake warnings.

[Apr 30 2025]

  • ENHANCED: jiti_list/0,1 - Provide collision stats - Order predicates alphabetically - Use tty hyperlinks when supported to allow jumping to the definition
  • FIXED: ansi_hyperlink/3: Fix position logic Make sure the column admin is not updated when writing the escape sequences. This allows mixing with format/1-3 tag specifiers.

[May 1 2025]

  • ENHANCED: Make sure that small clause index tables have no collisions.
  • ENHANCED: Use Fibonacci hashing for clause indexes.

[Apr 30 2025]

  • ENHANCED: Index performance on common arguments. Given a predicate with many clauses that has one or more arguments with only a few possible values and (thus) many clauses in the hash buckets for each of these values force fast failure when using a query with a value that does not appear in that argument.

    For example, suppose we have a business database that records the legal status in one of the columns (arguments). A query with a non-existing lega status should fail quickly. In the old system, the small number of values could easily lead to a hash colission, causing the system to try all clauses with the legal status of the collision.

    This issue was reported by Abramo Bagnara

  • FIXED: #1364 nb_set_to_list/2 could skip elements.

[Apr 29 2025]

[Apr 28 2025]

Package clib

[Jun 19 2025]

  • COMPAT: Use new PL_dispatch() API.

[May 23 2025]

Package cpp

[Jun 22 2025]

  • PORT: Deal with new PL_prompt_string() and PL_prompt_next() API.

[Jun 19 2025]

  • COMPAT: Use new PL_dispatch() API.

Package http

[Jun 15 2025]

  • ENHANCED: Use url(URL) for HTTP startup message.

[Jun 13 2025]

[May 2 2025]

  • FIXED: json_skip_ws/3: Pass exception.
  • FIXED: http_open/3: when applying a transfer filter, do not close the output Instead, create a new stream pair from the transfer filter stream and the output stream.

[Apr 29 2025]

  • SECURITY: Make http handlers read remaining request data for Keep-alive When using a Keep-alive connection the core HTTP infrastructure now ensures that, if the request has a request body (Content-length) exactly this number of bytes is read from the input before returning the stream to the Keep-alive mechanism.

    This prevents crafted content to generate additional HTTP requests.

  • FIXED: http_open/3: only catch error(Formal, Context).
  • FIXED: Multipart reader to update stream position data of parent stream. This is a tentative fix, lacking a test case. It still looses the line count/pos. That could be fixed by calling S__fupdatefilepos_getc() on all processed data.

    See https://swi-prolog.discourse.group/t/multipart-open-does-not-advance-the-streams-pointer/8965/3

Package libedit

[Jun 22 2025]

  • PORT: Support Windows

[Jun 23 2025]

  • COMPAT: Update for new signature for PL_prompt_string() and PL_prompt_next()

[Jun 19 2025]

  • COMPAT: Use new PL_dispatch() API.

[Jun 17 2025]

  • ENHANCED: el_wrap/4 to raise an error if the stream is already wrapped.
  • FIXED: Avoid memory leak on FILE structs created by fdopen()
  • FIXED: el_history/2: handling of setsize() was undefined.

[May 28 2025]

  • ADDED: Allow using the (integer) fd to specify the editline instance This allows accessing the history of other threads.

[May 26 2025]

  • ENHANCED: Sync the positions of the terminal streams.

Package readline

[Jun 22 2025]

  • PORT: Deal with new PL_promot_string() and PL_prompt_next() APIs

[Jun 19 2025]

  • COMPAT: Use new PL_dispatch() API.

Package xpce

[Jun 19 2025]

  • COMPAT: Changed dispatch handling to pass an IOSTREAM that must be watched.