Ann: SWI-Prolog 9.1.18

Dear SWI-Prolog user,

SWI-Prolog 9.1.18 is ready for download. This version brings a
number of fixes as well as some new functionality. Highlights:

  • Fixed fatal issues in undo/1, upcase_atom/2, downcase_atom/2
    and name/2.

  • Fixed and small improvements to the Janus Python interface.
    Discussions with XSB and Ciao teams are ongoing. No major
    changes are to be expected.

  • Further cleanup of the C++ interface by @peter.ludemann.

  • Pack operations now verify TLS certificates by default.
    Add an insecure(true) option to bypass these checks.
    Packs now also allow installing in a particular directory
    without checking that the pack is already installed in
    some other directory.

  • First implementation of the new app support using the
    commandline

    swipl [prolog-option ...] app-name [arg ...]
    

    Two standard apps are provided: app to list apps and
    pack to manage packages. Apps may be installed as part of the SWI-Prolog
    system, as part of packs and in the user and system configuration directories.

    Please consider this a prototype, i.e., details may change depending
    on user comments. See SWI-Prolog -- SWI-Prolog app scripts

    Enjoy --- Jan
    

SWI-Prolog Changelog since version 9.1.17

  • ADDED: Start applications using swipl app-name [arg ...]

  • CLEANUP: Code and docs for ‘$initialise’/0 that starts the system

  • FIXED: Issues with name/2 and number_codes/2 high Unicode points
    on Windows. Also fixes issues with code strings holding 0 codes for
    these predicates.

  • FIXED: After converting text representation it may no longer be
    canonical. This causes name/2 on a string that starts with a digit
    and contains wide characters to re-interpret UTF-8 and wide characters.

  • ENHANCED: pack_install/2: duplicate handling Allow installing a
    package in a given directory if the package is already installed in
    some other directory.

  • MODIFIED: pack_install/1,2: enforce TLS certificates From this version
    the system by default verifies TLS certificates. For poorly configured
    servers there is an option insecure(true) to pack_install/2 to skip
    the verification.

  • FIXED: downcase_atom/2 and upcase_atom/2: error handling.

  • DOC: PrologScript and shell script usage

  • XSB: Reorganise dialect emulation libraries Make timed_call/2 and
    consult/1 available from the right modules.

  • FIXED: html to text translation float right This patch fixes handling
    of inline style float:right and dealing with multiple flush-right
    elements in a block.

  • FIXED: undo/1: calling hooks while backtracking could corrupt
    choicepoint. Reported by Fernando Saenz Perez.

  • FIXED: PL_get_size_ex() on 64 bit systems using LibBF based bignums.

  • ENHANCED: help/1: keep track of modules for user predicates Also show
    private predicate matches.

  • TEST: Disable shared tabling tests conditionally. This test requires
    threads and library(time).

  • MODIFIED: When using --no-signals, keep using the GC thread The
    communication with the garbage collection thread is not based on
    OS signals and thus there is no reason to stop using the dedicated
    GC thread when not using signals. Using a separate thread improved
    real-time behavior.

Package cpp

  • ENHANCED: added unwrap() method and PlUnwrapPtr()

  • PORT: Retain C++17 compatibility by removing designated initializer
    (a C++20 feature)

  • TEST: Ensure strict checking of C++17 standard on GCC.

Package jpl

  • COMPAT: Set Prolog flag gc_thread to false SWI-Prolog used to
    disable the garbage collection thread on --no-signals. This was
    for JPL and is removed in version 9.1.18. It is unclear why using
    a separate GC thread causes the prolog_in_java test to hang.

    This patch sets the GC thread explicitly.

Package odbc

  • ADDED: odbc_table_column/4: improved mapping to Prolog types.
    Maps 'TEXT' to longvarchar(Length).

  • ADDED: odbc_prepare/4: return derived parameter mapping This commit
    also improves debug messages on type mappings to use type names
    rather than integers and writes debug messages for the type mapping
    for prepared statement arguments.

Package pldoc

  • ADDED: man_pages//2 option qualified(always) This is used by help/1
    on the commandline to show documented private predicates when found
    in some module.

  • FIXED: Handle search if summary contains non-ASCII characters.

Package swipy

  • FIXED: Context module for janus.apply() and friends Set the context
    module for the “functional style” calling functions to user rather
    than usingt he target module.

  • DOC: Passing Python scopes to Prolog.

  • ENHANCED: Implement fallback when conversion fails It seems that after
    detecting e.g., a Python Sequence, actually retrieving then elements
    can still fail. This commit implements a graceful degradation by
    returning the object reference in this case.

  • ADDED: support Python locals() and globals() This patch
    also allows chaining to start with a global function, e.g.
    py_call(globals():myvar, Value).

  • FIXED: When used as a Python package, Python is already initialized.

  • FIXED: Possible crash printing Python object references.

4 Likes

Build failed on macOS Sonoma 14.1, Xcode 15.0.1

/Users/cantor/src/swipl-devel/packages/cpp/SWI-cpp2.cpp:914:3: note: expanded from macro '_SWI_CPP2_CPP_check_rc'
  check_rc(rc); \
  ^~~~~~~~
/Users/cantor/src/swipl-devel/packages/cpp/SWI-cpp2.cpp:885:11: note: candidate function
PlStream::check_rc(int32_t rc)
          ^
/Users/cantor/src/swipl-devel/packages/cpp/SWI-cpp2.cpp:894:11: note: candidate function
PlStream::check_rc(int64_t rc)
          ^
1 error generated.
[177/1855] Generating ../home/boot.prc
ninja: build stopped: subcommand failed.

That is not the release, but the current git. Pushed some fixes and it now cleanly compiles and tests on GCC, MinGW, Apple Clang and MSVC … C++ programming is a big challenge :frowning:

Thanks. Now succeeded.

% swipl --version 
SWI-Prolog version 9.1.18 for arm64-darwin

% swipl --version
SWI-Prolog version 9.1.18 for x86_64-darwin