Ann: SWI-Prolog 9.1.8

Dear SWI-Prolog user,

SWI-Prolog 9.1.8 is ready for download. Highlights:

  • Profiler to provide accurate port counts using ports(true) by @ridgeworks.
    Default is (still) the old classic mode. This got correct port counts
    for many predicates, but not for those involved in mutual recursion.

  • More support functions for save/load of arbitrary blobs to .qlf files
    and saved states, including use of these to save/load PCRE regular
    expressions. This allows compiling regular expressions and saving
    the result in .qlf files and saved states. By @peter.ludemann

  • Proof of concept to provide engines in the single threaded version.
    This could provide proper async support for the WASM version in the
    future. As it, it mostly proofs engines and threads could be untangled
    fairly easily without implementing the rest of the requirements.

  • Fixed to Windows UNC (\\host\path) file handling.

  • Fix to recorded/3 which could return an erased record if this was the
    first.

  • Improve recovery from stack overflows.

  • Various build enhancements.

  • Various tests enhancements.

    Enjoy — Jan

SWI-Prolog Changelog since version 9.1.7

  • BUILD: Only setup CMake rpath stuff if the Prolog core is a shared
    library. This allows building a completely static executable without
    RPATH/RUNPATH.

  • ENHANCED: Better error if process argv cannot be processed in current
    locale.

  • FIXED: Using PL_new_atom() before PL_initialise() Lazy initialization
    of the atom infrastructure must initialize threads.

  • ADDED: PL_new_blob()

  • PORT: Msys2 & Win, static build dependencies

  • FIXED: recorded/2,3: If the first record was marked erased it is
    still reported.

  • PORT: Do not link to dladdr() if not available.

  • BUILD: Allow for CMake to provide list of packages explictly as e.g.
    -DSWIPL_PACKAGE_LIST=“clib;plunit”

  • MODIFIED: PL_qlf_* functions to use the normal public API function
    naming and calling conventions.

  • ADDED: PL_qlf_put_atom() and PL_qlf_get_atom(). Both functions may
    only be used from callbacks to blobs save/load hooks.

  • MODIFIED: names for integer exchange functions to qlf files.

  • MODIFIED: Stop exporting PL_qlf_getInt32() and its put version.
    They are not needed and easily implemented.

  • MODIFIED: Stop exporting PL_qlf_getString() and
    PL_qlf_putString(). These functions are too simple to write using
    e.g. Sfwrite() and Sfread() while the interface regarding lifetime
    if PL_qlf_getString() is not suitable for public use.

  • FIXED: Qlf save/load of Unicode text on Windows. Also makes the Qlf
    format portable between POSIX and Windows for wide strings using
    Unicode plane 1.

  • TEST: Test load/save .qlf files. Current test deals with Unicode.

  • ADDED: profile/2: options sample_rate(+Rate) and ports(+Ports).

  • FIXED: Prevent callbacks to Prolog from a thread running the atom
    garbage collector. Such callbacks may be initiated from blob
    release handlers.

  • FIXED: Windows: handle UNC paths properly.

  • MODIFIED: engine_next_reified/2 to return an exception as
    throw(Exception) rather than exception(Exception). Compatibile
    with e.g. call_time/3.

  • FIXED: When using single threaded engines we must scan all engines
    during atom and clause GC

  • ADDED: Allow building using -DMULTI_THREADED=OFF -DENGINES=ON This
    provides engines without threads. This is merely a proof of concept.
    It proofs that the code changes are quite minimal. A full version
    requires more work:

    • Probably we should also remove message queues and thread signals.
    • Do we want thread-local predicates in engines? Actually that is
      also a question for the multi threaded version. Probably we need
      an option to engine_create/4.

    This spreads a lot more #ifdef in the code. Luckily mostly
    limited to pl-thread.h and pl-thread.c. Requires further cleanup
    by moving more functions and declarations under the same conditonals
    together and possibly split some stuff to a new file, e.g. move
    mutexes and possibly later message queues and signals to their
    own file.

  • CLEANUP: There is no need for using the lingering structures to delay
    unallocation for some usage in single threaded mode. Split into
    linger_always() and linger().

  • FIXED: Possible error getting stack trace.

  • TEST: Disable pipe test when running under Wine.

  • TEST: Prevent test from failing of concurrent threads are active.

  • ENHANCED: sleep/1: sleep(0) just does sched_yield() if possible.

  • CLEANUP: Use new style foreign language interface for predicates
    from pl-sys.c.

  • ENHANCED: If we fail to print an exception message through
    print_message/2, print the raw exception.

  • FIXED: Make last resort stack resize work and (also) apply it if an
    exception is being processed.

Package cpp

  • TEST: Updated for new qlf integer exchange functions.

  • TEST: Add some PL_qlf_*() tests

  • TEST: Fix C++ allocation tests

Package http

  • FIXED: When stream garbage collection is enabled we cannot make a
    callback from the CGI context stream in case a context was lost and
    reclaimed through AGC.

Package mqi

  • TEST: Do not run tests if Pythin cannot be found.

Package pcre

  • ADDED: added save/load functionality to pcre blob

Package plunit

  • PORT: Make library(plunit) without timeout support.

Package semweb

  • FIXED: rdf_literal/1 should not succeed on IRIs in object position

Package xpce

  • ADDED: Deal with new port option of the profiler.
1 Like

To check how the release is trickling down into release packages for other platforms

As of today 03/31/2023 only see 2.
Remeber that this is a development release as opposed to a stable release, e.g. 9.0.4, so would not expect it to be released everywhere.


For the stable release 9.0.4

Arch package Arch Linux ARM aarch64 package Arch Linux ARM armv7h package Chocolatey package Debian 12 package Debian Unstable package Devuan Unstable package Homebrew package Kali Linux Rolling package MacPorts package Manjaro Testing package Manjaro Unstable package MSYS2 mingw package Parabola package Raspbian Testing package Ubuntu 23.04 package Void Linux x86_64 package winget package