Ann:: SWI-Prolog 10.0.2 (stable)

Dear SWI-Prolog user,

SWI-Prolog 10.0.2 (stable) is ready for download. This simply merges
the development tree. This comes with some very small changes that
could be considered modifications. It is so unlikely this affects
applications that I think it is better than diverting from the
development at this point. Highlights:

  • IDE fixes: scrolling speed on trackpads. Fixed file dialog and
    pullright arrow in menus for Windows. Fixed possible unresponsive
    PceEmacs on Alt-/ completion (loop). Added Spy to PceEmacs
    head and goal popup menus.
  • IDE enhancements: command line (TAB) completion on files, Prolog
    libraries and variables. Introduction of thread classes supports
    more easy and reliable debugging of threads, such as the HTTP
    server threads. Enhanced GUI thread inspector, threads/0, tdebug/1
    and tnodebug/1 to use thread classes.
  • Added library(tableutil), providing commandline utilities for
    inspecting tables and table statistics.

Modifications:

  • thread_alias/2 has been changed to set_thread(TID,alias(Name)).
    The predicate thread_alias/2 has been added to library(threadutil)
    as deprecated. Has no effect if you rely on lazy loading.
  • create_prolog_flag/3 handling of already defined flags changed.
    Now, both the global and possible local copy of the flag are
    updated. Used to update only the local copy while if the flag
    did not exist at all, a global flag was created. This makes
    flag handling when loading Prolog files in a thread consistent
    on whether the flag existed or not. Note that if the flag was
    already localised in another thread than the thread calling
    create_prolog_flag/3, it is not updated.
  • The debugger now by default traces calls to !/0. This used
    to be only supported for the GUI tracer.

Other changes and fixes:

  • Cleanup of Google Protocol Buffer (protobufs) support by
    @Peter.Ludemann.

  • Better warnings and errors from swipl-ld by @Peter.Ludemann.

  • More MSVC patches by @EricGT. Including PGO build support.

  • Some fixes to tests to avoid spurious failures.

  • Provide PPA release for upcoming Ubuntu 26.04.

  • Code cleanup. More internal type cleanup (notably bool), cleanup of Prolog flag handling code and more.

    Enjoy — Jan

SWI-Prolog Changelog since version 10.0.1

  • PORT: Fix cmake SDL3 import handling for non-standard configurations
    (PGO)

  • ENHANCED: Messages to use DCG Name//Arity when applicable.

  • FIXED: QLF compilation: preserve non_terminal predicate_property/2.

  • ADDED: library(tableutil): toplevel utilities This library provides
    toplevel utilities to dump tables, their relations and statistics.

  • PORT: #1481 Removed RETSIGTYPE configuration The CMake config seems
    broken for gentoo using C23. As there are no systems that use
    int for signal handler return value, there is no need for this
    configuration.

  • FIXED: Make compile again for single threaded and WASM targets.

  • CLEANUP: Prolog flag handling. Cleanup the implementation, mostly
    by splitting too large functions. Clarified documentation with
    respect to thread interaction. Added an option local(true)
    to create_prolog_flag/3 which create a flag only for the calling
    thread. Clarified and fixed default behaviour, which is for
    create_prolog_flag/3 to set the flag globally, i.e., make it
    available with this value for any thread. This now updates both the
    local and global flag table (before it updated only the global table).

  • DOC: Use PlDoc for the documentation of library(threadutil)

  • CLEANUP: Move thread_alias/2 to library(thread_util). The core
    functionality is now provided by set_thread/2.

  • ADDED: thread_property/2: debug_mode(-Boolean) property

  • ADDED: Assign threads the notion of a class. This is notably
    intended to control debugging. Possibly this can be extended to
    other features such as memory management policies, termination, etc.
    Future versions may also allow for multiple classes. Related changes

    • Add class(Class) to options of thread_create/3
    • Add class(Class) to thread_property/2 and set_thread/2
    • Add thread_class to PL_thread_attributes_t
    • Allow tdebug/1 and tnodebug/1 to address a class of threads
    • Adapt debugging/0 and threads/0.
    • Adapt the GUI thread monitor.
    • Use classes in main system, Epilog and the HTTP server.

    Practical consequence:

    • Use ?- tdebug(http). to activate debugging in HTTP worker
      threads. This reliably activates spy points in the HTTP server.
  • ADDED: PL_current_prolog_flag(): type PL_BOOL

  • MODIFIED: visible/1: default to include cut_call This shows calls
    to ! in the tracer.

  • FIXED: thread_property/2: system_thread_id on Linux Failed to
    initialize this on systems with the getid() function (primarily Linux,
    but possibly other platforms using glibc).

  • FIXED: Make updateAlerted() thread-safe Could lead to race conditions
    when this function is called from multiple threads (usually the target
    and some external thread).

  • ADDED: prolog:complete_input/4: enhanced CLI TAB completion - Complete
    variables in the query using Emacs dabrev completion - Complete
    in $Var for saved toplevel variables.

  • BUILD: Fixed PGO compilation for non-MSVC

  • TEST: empty file position tests.

  • CMAKE: Add MSVC support for Profile-Guided Optimization

  • ENHANCED: Message when running the toplevel using initialization/1.

  • FIXED: #1478 LibBF mpz_import() emulation for leading zero-bytes.
    Lead to undefined behaviour in random number generation.

  • UBAN: #1478 Avoid undefined arithmetic on NULL pointer (benign).

  • FIXED: predicate_label/2: avoid importing targets into system.

  • PPA: Fixup generating PPAs for both SDL and non-SDL versions.

  • PORT: Exclude jvm.dll from CPack runtime dependencies

  • ENHANCED: Command line (tab) completion - Tag directories with a
    trailing / - Do file name completion on [prefix<tab> - Do
    library completion on library(prefix<tab>.

  • ENHANCED: error/warning messages for swipl-ld

  • BUILD: We no longer need cmake -E env ... to run Prolog This seems
    to cause a hang in the Windows build xpce steps. Quite unclear why.

  • FIXED: ansi_get_color/2: not supported on Windows.

  • PPA: Added Ubuntu 26.04 (Resolute Raccoon)

Package debian

  • PPA: Dropped libedit. Using bundled version.

Package clib

  • TEST: Raise timeout for UDP tests. Could fail.

Package http

  • ADDED: Set class property for created threads.

Package protobufs

  • CLEANUP: reformat with pprint:print_term (changed whitespace)

  • CLEANUP: fix some typos

  • CLEANUP: remove absolute path from generated _pb.pl, fix typos

  • TEST: fixed typo that prevent interop test from running

  • PORT: python3 might not be present and Python is not needed to build
    the package

  • TEST: ensure tests are run sequentially

  • ENHANCED: protoc 3.21.12 (unverified_lazy field)

Package xpce

  • FIXED: Windows: frame<-{open,save}_file work around for SDL3.4.0
    bug.

  • PORT: Windows: get rid of remaining XBM images. Fixes
    XopenImage(@ms_left_arrow_image/image)
    message and shows correct left arrow for pullright menus.

  • ENHANCED: Capture main thread messages to current Epilog using
    hyperlinks.

  • ADDED: PceEmacs Prolog mode: set spy point from goal and head popup.

  • PORT: Removed RETSIGTYPE config Outdates as any reasonable still
    alive system uses void.

  • FIXED: Epilog: Possible access to freed object when closing.

  • ENHANCED: Thread monitor Show more of the status of threads and improve
    popup menu actions. Improve disabling popup entries and add an entry
    to toggle debug mode for classes of threads.

  • ENCHANCED: GUI tracer control.

  • ADDED: Epilog: use thread classes.

  • FIXED: PceEmacs: possible infinite loop in dabbrev_expand.
    editor->dabbrev_expand can loop if a secondary or ternary search
    for candidates only results in candidates that are already rejected
    by the user from earlier candidate searches.

  • ENHANCED: Improve scroll wheel handling. Notably get more natural
    scroll speed on MacOS trackpads

  • FIX: Pass image (not surf) to my_cairo_check_surface in
    ws_load_image_file

  • BUILD: Build in headless mode.

1 Like