Ann: SWI-Prolog 8.1.4

Dear SWI-Prolog user,

I have uploaded SWI-Prolog 8.1.4. Most of the changes are relatively
minor. A couple of bugs are flagged with SECURITY, but this shouldn’t be
taken too seriously. Using the address sanitizer toolkit on the test
suite I found a couple of places where code could be reading outside the
allocated buffer. That might theoretically allow for accessing data one
is not supposed to access (I doubt it really can) and might lead to
crashes (also unlikely).

Most serious changes are in tabling, notably providing dynamically
stratified negation and adding lots of tabling tests from XSB to our test suite.

There are several outstanding issues, notably wrt. packaging on MacOS and
Windows.

Enjoy --- Jan

SWI-Prolog Changelog since version 8.1.3

  • ENHANCED: Avoid deep mutual recursion in trie node deallocation and
    fixed a memory leak in trie destruction.

  • SECURITY: utf8_strlen() on non-null terminated input may read beyond
    the buffer.

  • FIXED: Using a thread_local predicate inside a temporary module could
    crash the system.

  • ENHANCED: Do not setup colors if $TERM == dumb. Also, when
    library(ansi_term) is loaded, it will setup its default according to
    the same rules as the toplevel uses to load this library: I/O must
    be associated with a tty and $TERM may not be dumb. Peter Ludemann.

  • DOC: Migrate documentation of library(readutil) from LaTeX to
    PlDoc. Deals with missing documentation for read_line_to_string/2.

  • FIXED: library(ansi_term): loading should not set the color_term
    flag to true if it is already defined.

  • FIXED: Make loaded C++ foreign libraries visible through
    current_foreign_library/2. Arthur Wang.

  • FIXED: print_term/2 to print zero-argument compounds. Peter Ludemann.

  • FIXED: Drop the program from the Prolog flag argv for a saved state.
    Peter Ludemann.

  • MODIFIED: Delay determining the associated files on the command line
    til after loading the user ~/.swiplrc as well as the explicit
    script files. This allows for defining alternative extensions
    to be loaded as Prolog files from the commandline. See e.g.,
    library/dialect/xsb/source.pl

  • XSB: Fixed module context for :- table/1 when loading .P modules.

  • TEST: Actually make CTest fail on failing XSB tests.

  • TEST: Added XSB negation tests

  • DOC: tnot/1 and new table scheduling.

  • ADDED: tnot/1: tabled negation.

  • ADDED: C support for negative tabled nodes: marking is negative,
    resume negations after completion with failure.

  • XSB: Added get_returns_for_call/2.

  • MAINTENANCE: Improve debugging support for tabling.

  • ENHANCED: Colour :- table/1 declaration.

  • PORT: PGO optimization using Clang to be flexible on the profile file
    name. Paulo Moura.

  • ADDED: issue#447: tmp_file_stream/3 sets the file_name property of
    the created file. Peter Ludemann.

  • FIXED: re-enable file consult messages when a file is consulted from
    the Windows menu.

  • PORT: Support profile guided optimization for clang.

Package clib

  • ADDED: udp_term_string_hook/3 may throw udp(invalid_message) to make
    the UDP library ignore some message. This can be used together with
    encryption to create a safe UDP cluster.

  • FIXED: timer thread should not be created as detached as it is joined.
    Matt Lilley.

  • DOC: Typo and link for ptmalloc() details.

  • FIXED: library(udp_broadcast): keep the inbound thread running on
    exceptions during broadcast.

Package ltx2htm

  • SECURITY: Possibly reading beyond stack buffer. Note that the ltx2htm
    package is typically only used to build the documentation.

Package paxos

  • ADDED: paxos_property/1 to query the status of the cluster.

  • ADDED: paxos_quorum_ask/4 to ask questions to the forum outside the
    paxos protocol.

  • ADDED: hook paxos:paxos_ledger_hook/5, allowing (some keys of) the
    ledger to be stored elsewhere.

  • FIXED: Avoid deadlock assembling the dead node admin when starting
    with an explicit node id.

  • FIXED: Avoid deadlock for last node disappearing.

Package pldoc

  • FIXED: PlDoc.sty macro definition.

  • ENHANCED: PlDoc issue#11: restrict \tag to the \tags environment to
    avoid conflicts with LaTeX amsmath package.

Package sgml

  • FIXED: SGML/HTML/XML parser: possible memory leak and reading an
    out-of-scope automatic variable.

  • MODIFIED: Change data handling from XSD 1.0 to XSD 1.1. In XSD 1.2,
    the value 0 is allowed for xsd:gYear. Note that all negative (before
    BC) are interpreted differently. Updated the tests accordingly.

    The old behaviour can be activated by defining the C preprocessor flag
    XSD_VERSION_1_0.

Package table

  • FIXED: new_order_table/2: accept strings for character sets for
    compatibility with SWI7.