Ann: SWI-Prolog 9.2.9 (stable)

Dear SWI-Prolog user,

SWI-Prolog 9.2.9 (stable) is ready for download. This update
deals mostly with portability issues, some usability issues
and a few minor fixes.

Enjoy --- Jan

SWI-Prolog Changelog since version 9.2.8

  • ADDED: trap/1: aliases for e.g. type_error → type_error(,) So one
    does not need to remember the number of arguments.

  • FIXED: Preserve incremental property when creating a saved state.

  • BUILD: Add CMake option -DSWIPL_SO_VERSIONS to remove SOVERSION
    properties.

  • DOC: statistics/2 lost the keys globallimit, locallimit and
    traillimit. Reported by Jelmer Jellema.

  • FIXED: print_term/2: proper handling of operators(Ops) Needs to be kept
    consistent with write_options([… ignore_ops(IgnOps)]). Implemented
    consistency and deprecated the option. Reported by Mike Elston.

  • ADDED: library(prolog_colour): track CHR declaration locations

  • ENHANCED: pack_info/1: use colours and indicate autoload status.

  • MODIFIED: pack_install/2 option autoload(true) If present, the pack
    is installed as autoload pack regardless of autoload option in the
    meta-data. If the option is not present, the system asks the user to
    install as autoload library if the meta-data contains autoload(true).

    If autoloading is not enabled, the INDEX.pl file that may appear
    in the pack is removed.

    This patch also adds swipl pack install --autoload ...

  • FIXED: Make packs that provide an autoload library work again.

  • FIXED: cmake/TestSignalType.c for C++

  • PORT: Make cmake test for signal handler compatible with c23

  • FIXED: explain/1 to report the same predicate multiple times.
    This happens if the predicate is imported into multiple modules.

  • PORT: read_pending_input/3 and friends: make 16 bit encodings work
    on Windows.

  • FIXED: Pass command line arguments in class Prolog.

  • DOC: gcd/2 and lcm/2 are not operators.

  • FIXED: Use of undefined options in the toplevel. This makes the
    toplevel unusable if the Prolog flag iso is set to true.

  • PORT: WASM: Get rid of deprecated allocate, ALLOC_NORMAL and
    ALLOC_STACK

  • FIXED: WASM: Query.next() to set done to true on last answer.
    This must be false when used as iterator.

  • FIXED: WASM: for(x of prolog.query(…)) lost last answer

  • FIXED: prolog_trace_interception/4: setting up the hook good crash
    Backported from c1ce6d36d4e228536522ee49bad067c53a7f3b4b

  • FIXED: library(main): superfluous choice point in argv_options/3

  • ADDED: format/2: support ~:D The colon modifier for D forces
    the use of Prolog digit grouping using _.

  • TEST: Added ISO ambiguous operator tests. Marked two tests as blocked
    as these currently fail.

  • FIXED: #1331 Module issue in SICStus block/1 emulation. This patch
    also reformats the file, removes some dead code and remove the outdated
    restriction that it does not work on dynamic or foreign predicates.

  • FIXED: libary(prolog_pack): detection of valid download URLs.

  • FIXED: Installing a pack should attach the pack itself. This
    incorrectly registered the directory of the pack as a directory that
    provides packs instead.

  • ENHANCED: explain/1 to enumerate all instances of a non-qualified
    predicate.

  • BUILD: plunit requires clib package.

  • DOC: Update library(shlib) documentation.

  • BUILD: Make sure to clear DISPLAY when running xpce steps
    (one more)

Package bench

  • FIXED: Avoid division by zero if no tests are executed.

Package cpp

  • DEPRECATED: Officially deprecate version 1 of the C++ interface.
    For now, we will keep SWI-cpp.h in the distribution. We do not plan
    any updates to keep it in sync with changes to SWI-Prolog or the
    C++ standard. Users of this old interface are strongly encouraged
    to update their program.

  • DOC: removed all “(version 2)”

  • DOC: Delete documentation for version 1 of the C++ interface

Package http

  • ADDED: htmx_oob//2 to simplify emitting OOB data

  • DOC: Fixed example code for apropos with HTML output.

Package jpl

  • TEST: #104 prolog_in_java test fails if multiple copies of junit*.jar
    are found. Now first search for junit4.jar. On success, use first,
    else search for junit.jar. On success, use first.

  • TEST: Cache JUNIT_JAR in CMake. This provides better cmake performance
    and easier inspecting the configuration result.

  • TEST: Fix finding hamcrest on Fedora 41

Package mqi

  • TEST: Specify encoding in test_prologserver.py

  • TEST: Specify encoding in test_prologserver.py Fixes a problem for
    MSYS2. I hope my ad hoc fix is harmless.

(test_prologserver.TestPrologMQI.test_variable_attributes)

Traceback (most recent call last): File
“c:/msys64/home/c7201178/swipl-devel/packages/mqi/python/test_prologserver.py”,
line 95, in setUp
self.initialProcessCount = self.process_count(“swipl”)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
“c:/msys64/home/c7201178/swipl-devel/packages/mqi/python/test_prologserver.py”,
line 123, in process_count output =
subprocess.check_output(call).decode()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError:
‘utf-8’ codec can’t decode byte 0xff in position 237: invalid start
byte ````

  • COMPAT: Support both old and new abort exception

Package plunit

  • ENHANCED: PlUnit message for tests that succeed with a choicepoint.

  • FIXED: Report generator state on failing forall(Generator) test.
    This was completely broken. Format has been changed to print the
    generator goal rather than just the variables.

Package ssl

  • PORT: Extended our BIO_ctrl() callback. In Fedora 41, OpenSSL
    3.2.2, it appears we need to implement the BIO_ctrl() methods
    BIO_C_FILE_TELL and BIO_C_FILE_SEEK for properly loading keys
    from files.

  • COMPAT: Support both old and new abort exception

Package swipy

  • FIXED: Allow using the janus module from Prolog when loaded as
    Python module.

  • FIXED: When loading janus_swi into Python, use janus.pl from Python
    package.

  • BUILD: Honour environment variable SWIPL for pip install .

  • DOC: Document creating the Windows binary wheel in scripts/README.md