Ann: SWI-Prolog 8.1.20

Dear SWI-Prolog user,

First of all, a good 2020! I’ve uploaded SWI-Prolog 8.1.20. This version
does not bring not a lot of novel stuff, but it does address many
important issues. Highlights:

  • Fixed a number of issues affecting Pengines and SWISH that boosts
    the stability of SWISH.

  • Avoid goal_failed(http_process/4) messages in the HTTP server. These
    were caused by the remote closing the connection before reading the
    entire document with a specific timing.

  • A number of patches deal with handling multiple interactive toplevel
    loops (in threads). This mostly concerns I/O and thread management
    from C. These support the new libssh pack that allows for secure login to a Prolog process, providing
    a full shell including command line editing, history, interrupt (^C),
    color support, and redirect of the output of shell commands.

  • Keri Harris found and fixed a possible asserting failure related to
    clause garbage collection.

  • There is a new library(intercept), resulting from the discussion on
    error handling on this forum. This is based on Ciao’s design.

  • The JPL .jar files now support Java 7 and up (used to depend on the
    Java version of the build machine, which varied between platforms).

  • pack_install/1 and friends can now deal with CMake based add-ons,
    running cmake if there is a CMakeLists.txt file in the toplevel of
    the pack. See the libssh pack for an example.

  • Several contributed patches to the docs and tests by Boris Vassilev
    and C. M. Sperberg-McQueen.

    Enjoy — Jan

SWI-Prolog Changelog since version 8.1.19

  • BUILD: Use -DJAVA_COMPATIBILITY=ON for building Windows and MacOS
    binaries

  • FIXED: clause_info/5 for x==X. @since
    d65c713cb2507a62b64d860a30246e05279bc522

  • FIXED: clause_info/5: avoid false binding if the arguments of =/2
    are reversed.

  • ADDED: library(intercept): provide Ciao compatible intercept/signal
    API.

  • ADDED: prolog_frame_attribute/3: attribute parent_goal(Next) to allow
    enumeration of parent goals. Needed for the new library(intercept).

  • TEST: tests for library(dcg/high_order)

  • DOC: Correct a few typos, supply leading zeroes in ISO 8601-style dates

  • FIXED: clause GC may mark indexes as dirty even though they do not
    include clauses being deleted

  • MODIFIED: The debug utility mutex_statistics/0 now prints its output
    to current_output such that it can be redirected and ends up in
    the new SSH consoles.

  • ADDED: thread_alias/1 to give a thread an alias name after creation.

  • FIXED: PL_thread_attach_engine() if this call fails, do not leave
    the thread-local variable pointing at the destroyed local data.

  • FIXED: Handle ‘e’ in the debugger from a thread. Now safely terminates
    the thread using abort/0.

  • ENHANCED: Properly handle console mode management if we are
    communicating with multiple TTY devices. This is needed to support
    the new libssh package.

  • FIXED: on_signal/3 not to fail if the signal is bound to a handler
    in a different module.

  • DOC: Updated and clarified documentation for on_signal/3.

  • MODIFIED: on_signal/2 now interprets debug as reserved handler name,
    triggering the default ^C handler.

  • ENHANCED: library(prolog_colour): qualified tabling declarations
    and avoid type error warnings on partially instantiated predicate
    indicators in declarations. The latter is a bit dubious as it will
    indicate variables in e.g. :- dynamic p/N just as singleton.
    It does however avoid a screaming warning when using dynamic in
    runtime calls from a computed arity.

  • ENHANCED: CMake based packs to run ctest if the project defines
    tests.

  • ADDED: Support configuration and building of foreign packs using
    CMake. This is triggered if the pack root directory contains
    CMakeLists.txt.

  • MODIFIED: shell/1,2: if the user_input, user_output and
    user_error streams are connected to a file descriptors, dup()
    these to the process’ standard streams. This allows running shell
    commands and get the output in the expected place using the upcoming
    embedded SSH server.

  • FIXED: set_prolog_IO/3: make sure the file_no(N) stream property is
    relayed properly.

Package clib

  • FIXED: process_create/3: stderr was sent to stdout. Reported by
    Jos Deroo. @since 9ea716e2c90fc359f03b1a838d9b764ca683608f

  • MODIFIED: process_create/3: std I/O now uses the file handles
    underlying user_input, user_output and user_error rather than
    the hard coded 0,1,2. This allows using process_create/3 with standard
    handles in secondary consoles.

Package http

  • ENHANCED: Do not print errors to the console for sending files where
    the client aborts the connection before completion.

  • FIXED: Avoid goal_failed(http_process/4 messages, possible if sending
    the main message results in a broken pipe error.

Package libedit

  • FIXED: el_wrapped/1: avoid ignoring a possible exception.

  • FIXED: el_unwrap/1: avoid ignoring a possible exception.

Package pengines

  • FIXED: Avoid a race condition between a terminating Pengine and
    using its module for reading the next event arriving through HTTP.
    Access to the temporary module being destroyed is illegal.
4 Likes