Ann: SWI-Prolog 9.1.9

Dear SWI-Prolog user,

SWI-Prolog 9.1.9 is ready for download. This is mostly a bugfix and
portability release. Highlghts:

  • @peter.ludemann has done a lot of work on the
    second incarnation of the C++ interface, mostly making exception
    handling more C++ friendly. There are still some open issue wrt
    representing the exception and support for character encodings.

  • Some more fixes to Windows file handling.

  • Fix to abolish/1 followed immediately by asserting new facts
    could lead to a permission error due to a race condition between
    the GC thread and the abolishing thread.

  • print_term/2: better handling of compound terms with long functors.

    Enjoy — Jan

SWI-Prolog Changelog since version 9.1.8

  • DOC: limitation of PL_record_external() with blobs

  • ADDED: library(main) cli flag processing for debugging.
    See cli_debug_opt_type/3 and friends.

  • ADDED: argv_options/4: typed directory and directory(+Access).

  • ADDED: print_term/2: option auto_indent_arguments(Int) With this option
    (defaults to 4), dicts and compounds that are too wide ands whose
    funtor is at least twice this width, have their arguments printed on
    the next line.

  • PORT: When using -DSTATIC_EXTENSIONS=ON, drop usage of dlopen()
    This is required for recent versions of Emscripten that give a runtime
    error on the usage of dladdr().

  • TEST: Added test for #1168

  • FIXED: Issue#1168: race condition betweem abolish and CGC Clause
    Garbage Collection concurrent with abolish/1 could leave the predicate
    with erased clauses while it was not marked dirty. As a result,
    a subsequent attempt to assert/1 to this predicate results in an
    error trying to amodify a static predicate. Reported by Paulo Moura.

  • TEST: Create a new test directory to improve concurrency while testing.

  • ADDED: Issue#1019: PL_put_wchars().

  • TEST: Fix and disable some tests when running under Wine.

  • PORT: Demand C11 early

  • DOC: Document issues with standard order on rational trees.

  • DOC: Issue#1164: clarify answer_write_options flag.

  • DOC: Prolog flag toplevel_residue_vars.

  • FIXED: Addresses #1160, residual constraints in tuples_in/2 from
    clp(fd). Patch by @triska for Scryer Prolog.

  • FIXED: Windows exists_file/1 and exists_directory/1 domain error.
    Avoid Domain error: `foreign_return_value' expected, found `-1'.
    Document that invalid names cause silent failure.

  • MODIFIED: statistics/2 cputime and infereneces to include completed
    “child threads”. This patch causes threads to keep track of their
    “creator” thread. If the creator still exists when a thread dies,
    the time and inferences are recorded with the creator and reflected in
    the statistics keys. The new keys self_cputime and self_inferences
    provide the original.

  • BUILD: When using -DSTATIC_EXTENSIONS=ON, do not install the
    libraries. This implies plugins are not installed as *.a files
    and libswipl.a is not installed. Only bin/swipl and the Prolog
    libraries and support files are installed.

  • FIXED: swipl.cmake syntax error

Package archive

  • TEST: Disable write tests under Wine. These tests work fine under
    Windows.

Package clib

  • ENHANCED: prolog_server/2: if tcp_host_to_address/2 raises an exception
    or fails, just use the Peer in the thread alias, rather than having
    the server thread die

Package cpp

  • DOC: Fixed LaTeX errors and duplicate conclusion section.

  • ENHANCED: C+±compatible exception handling + more wrapper functions
    and classes SWI-cpp2-plx.h contains wrapper functions (imported
    from SWI-cpp2.h) - throw PlException for Prolog errors - most
    SWI-Prolog.h functions have a wrapper. verify() methods removed from
    PlAtom, PlTerm, etc. - the wrapper functions do the checking. Some
    executable code has been moved to SWI-cpp2.cpp - can be inlined,
    if desired. PlException is now a subclass of std::exception,
    not a subclass of PlTerm. PlTypeError, PlDomainError, etc. are no
    longer subclasses of PlTerm, but are functions for creating suitable
    PlException objects. The string comparison operators are deprecated;
    use as_string() and std::string comparison instead, which allows
    specifying the encoding. Added PlRecord, PlRecordExternal, PlControl
    (used by PREDICATE_NONDET), PlStream. Fixed numerous bugs and
    misfeatures; added tests.

  • TEST: Do not build and link the tests when building with
    STATIC_EXTENSIONS

Package http

  • MODIFIED: reply_json_dict/2 to explicitly use UTF-8 by default.
    Where the other reply_json variants used application/json; charset=UTF-8, reply_json_dict/2 used only application/json.
    This is fine according to the standards, but some clients insist on
    the charset. Ths patch makes all versions compatible.

  • FIXED: library(http/http_log): exception when logging was disabled.
    Harmless as the exception was printed but otherwise ignored.

Package semweb

  • ADDED: rdfe_load/2: accept .nt (N-Triples) files.

Package sgml

  • ADDED: the atom transformation to the attribute value in xpath.
    The content attributes provided with load_structure/3 can be atoms
    or strings depending on the attribute_value/1 option. So adding
    a transformation of attribute values to an atom in xpath/3 should
    be a useful feature, such as string transflation.

Package swipl-win

  • PORT: Changes for SWI-cpp2.h version 2

Package xpce

  • PORT: Add function prototypes.

  • PORT: migration of regex library to ANSI C prototypes

  • PORT: Convert gitwrite.c code to ANSI C.

  • FIXED: directory->scan existence checking.

3 Likes