Ann: SWI-Prolog 8.5.4

Dear SWI-Prolog user,

SWI-Prolog 8.5.4 is ready for download. Highlights:

  • MODIFIED: the brace_terms option of write_term/2,3 now behaves
    as documented. Old behavior was the inverse of the documented
    behavior.

  • @peter.ludemann did a lot of work on library(rbtrees) to make
    it more robust using the => rules and det/1 declarations and
    extend the test suite.

  • Following the tip by @swi to show the last open choice point
    there is now print_last_choicepoint/0 as well as a new option
    to a toplevel answer: by typing * the system will print the
    details on the last choicepoint.

  • There is somewhat experimental support for terminal hyperlinks,
    also suggested by @swi. To use this, put
    :- set_prolog_flag(hyperlink_term, true). in your init file.

  • Most of the work is in updating the MacOS port

    • Avoid using tcmalloc as this crashes on MacOS 12 (Monterey)
    • Update most dependencies for the binary installer and compile
      them as universal (fat) binaries. This notably updates the Qt
      framework to 6.2.2. @CapelliC did most of the required updates
      to the swipl-win code. Thanks!
    • Add support to the binary distribution build to create a
      universal binary.

    This implies that the binary installer now runs natively on Intel
    and Apple Silicon (M1) Macs. It is now compiled using Clang 13.
    This version significantly reduced the gap with GCC, but is still
    about 20% slower than the old bundle on Intel. The other downside
    is that the bundle almost doubled in size (28Mb to 50Mb). Iā€™m not
    sure why this is.

    Enjoy ā€” Jan

SWI-Prolog Changelog since version 8.5.3

  • PORT: On MacOS fat executables, both try fat-darwin and the actual
    archirecture when searching foreign resources.

  • PORT: Set archirecture name of fat packages to fat.

  • PORT: Support generation of MacOS universal (fat) binaries.
    Also updates minimum supported MacOS version to 10.14.

  • PORT: Dynamically determine actual architecture on MacOS

  • PORT: Install openssl.cnf with MacOS dependencies
    (scripts/macos-deps.sh)

  • PORT: By default disable tcmalloc for MacOS as it causes a crash in
    setlocale() for Monterey.

  • ADDED: Support ā€˜*ā€™ to print the most last choicepoint when a toplevel
    goal succeeded deterministically.

  • ADDED: print_last_choicepoint/0,2.

  • ENHANCED: Make explain/1 use the message system and the new terminal
    hyperlinks.

  • ENHANCED: explain/1: hide system references.

  • PORT: Building an apple bundle using Qt6

  • PORT: Updated script for MacOS dependencies

  • DOC: return type for PL_put_variable(), PL_put_bool() and PL_put_atom()
    is int.

  • ENHANCED: ord_subtract/3: use => rules to trap wrong calls and stop
    when the list of elements to be subtracted is exhausted.

  • FIXED: Handle new terminal hyperlink elements in message_to_string/2

  • PORT: MacOS to deal with installation directory for libjpeg as
    installed by Macports. This patch also disables more Macports and
    Homebrew locations if we provide our own dependencies.

  • BUILD: By default use Macports gcc11 (gcc-mp-11)

  • EHNANCED: SICStus datime/2 emulation now supports mode datime(-When,
    +Datime).

  • ADDED: ansi_term:hyperlink/2 as a hook to adding hyperlinks.

  • ADDED: random_subseq/3 and random_numlist/4 to
    library(random). Compatible with SICStus.

  • ENHANCED: Use new url(Location) message line elements throughout.

  • ADDED: Introduce url(Location) and url(URL, Label) message line
    elements.

  • PORT: Fixed cmake issue for MacOS Homebrew dependencies.

  • DOC: edit/0.

  • FIXED: thread_update/2 when no change is made to the target module
    should still wakeup.

  • ADDED: prolog_choice_attribute/3: clause attribute to find the next
    candidate clause.

  • FIXED: Initial value for the Prolog flat on_warning must be print.

  • FIXED: Stack trace line-level location when parenthesis are used.

  • MODIFIED: write_term/3 option brace_terms behavior was the inverse
    of the documentation. As the docs describe what one would expect and
    is consistent with YAP, the implementation is fixed. We do not expect
    this option to be frequently used. Code using brace_terms(true) must
    be updated to use brace_terms(false). If you need to do a runtime
    check to beor conditional compilation compatible with older versions,
    one can use this condition to verify the correct new behavior.

    term_string({a}, S, [brace_terms(false)]), S == "{}(a)"
    
  • FIXED: gen_assoc/3. This patch also removes the ground tests for
    is_assoc/1 and updates documentation. By Peter Ludemann.

  • FIXED: Missing import into library(listing).

  • DOC: Added the rbtrees, statistics and fastrw libraries to the main
    documentation to make them available in help/1.

  • DOC: Added library(rbtrees) to main documentation to make it work
    in help/1.

  • REFACTOR: library(rbtrees) to use more => style rules and use det/1.
    This refactoring guards at practically zero overhead cost against
    errors such as passing variable rather than a Red-Black tree, passing
    an invalid Red-Black tree. This patch makes the library strictly
    stead-fast. Finally, many test cases are added.

    Fix is_rbtree/1 fail condition; use => in more places

  • ADDED: write_term/2: option quote_non_ascii. This option is enabled
    by default for write_canonical/1.

  • ADDED: PL_write_term(): PL_WRT_QUOTE_NON_ASCII flag

  • FIXED: write_canonical/1 to use the brace_terms option as false.

  • FIXED: Make write/1 and friends escape characters that the stream
    cannot represent.

  • FIXED: write/1 and friends: we must check that the first character
    can be represented by the stream.

  • ADDED: Server socket support to SICStus 4 library(sockets) emulation.

  • FIXED: If we abort in the tracer from a redo port that is on a foreign
    predicate we must discard this (foreign) frame.

  • ADDED: pack_install/1 to support pack_version(2). in pack.pl.
    Version 2 changes the names of the exported environment variables that
    control building the pack. This was necessary to avoid conflicts
    with build environments. As an incompatible change was required
    anyway we took the opportunity to rationalise all the variable names.

  • ADDED: pack_install/2: option test(Boolean) to skip the pack tests.

Package http

  • ADDED: Handle new console hyperlink message line items when converting
    error messages to plain text.

  • TEST: More debug messages for test_proxy.pl and avoid reporting
    expected errors.

Package jpl

  • TEST: Disable prolog-in-java test if hamcrest-core is not found
    (broken on Macports)

Package pengines

  • ADDED: Deal with new url message line element.

Package plunit

  • FIXED: Allow include/1 to include tests between begin_tests/1 and
    end_tests/1. This patch is incomplete because failing tests are
    reported with the source line of he included file but the file name
    of the main file.

Package swipl-win

  • PORT: Demand Qt 5.15 or 6.

  • FIXED: Simplied exit menu, working again, fixed QVariant type()
    usage warnings

Package xpce

  • ENHANCED: Avoid check/0 to report autoload/2 to be redefined.

  • ADDED: pceemacs_client.pl, replacing edit.sh and client.c.

2 Likes