Ann: SWI-Prolog 8.3.29

Dear SWI-Prolog user,

SWI-Prolog 8.3.29 is ready for download. This should be considered a
pre-release of 8.4.0. If you are on the stable branch, please test your
software with this version such that possible unnecessary regression on
the stable series can be avoided. Higlights:

  • Eric Zinda’s new network based interface to other languages has
    been renamed to mqi (Machine Query Interface) to avoid
    confusion with LSP (Language Server Protocol). This also
    renamed the git submodule, so to update a git tree do:

    • git pull
    • git submodule update --init
    • rm -r packages/language_server
  • By default, the toplevel now writes variable as _A, _B or just _
    if the variable appears only once. Setting the flag
    toplevel_name_variables to false disables this behaviour.
    Especially the anonymous variables simplify interpreting
    answers a lot :slight_smile:

  • Added trap/1 and gtrap/1 to trap the commandline (or graphical)
    debugger on an error exception whose formal part unifies with
    the given argument. Note that this traps the debugger, even if
    the exception is caught.

  • Various bug fixes for monotonic tabling, clause/2, format_time/3,
    etc. See below.

  • Avoid possibility of hanging in multi-threaded applications when
    compiling with some GCC versions (over aggressive optimization).

  • Ubuntu PPAs are now build using PGO optimization. Also added
    Hirsute (Ubuntu 21.04).

  • The troublesome library(uuid) now provides a pure Prolog replacement
    if the dependency on ossp-uuid cannot be found. In this case
    uuid/1 produces a random UUID.

  • Make CHR work again in SWISH (or, more generally, in temporary modules).

    Enjoy — Jan

SWI-Prolog Changelog since version 8.3.28

  • BUILD: Use PGO optimization for the Debian builds.

  • FIXED: clause/2 (and related predicates) on clauses where unifications
    are moved into the head failed in a saved state.

  • FIXED: clause/2 for unification that was migrated to the head and used
    nested in a term used as argument to some body call (using B_ARGVAR
    instead of B_VAR).

  • ADDED: format_time/3: handle '%P' on systems not using glibc.

  • FIXED: Adding missing newlines in tracer commands

  • TEST: Fixed answer tests for new toplevel output.

  • ADDED: Prolog flag toplevel_name_variables, which causes variables
    in toplevel answers to be named _A, _B, etc. Singleton variables
    are printed as _.

  • ADDED: current_temporary_module/1 to library(modules).

  • FIXED: Avoid optimizing memory load, causing an infinite loop when
    creating a new atom.

  • FIXED: =…/2 to avoid truncating to int (for arity > 2g).

  • ADDED: trap/1, notrap/1 as commandline utilities to trap exceptions.

  • CLEANUP: Move the command line debug utils such as spy/1 from the
    boot files into a new library(prolog_debug).

  • FIXED: make sure the monotonic propagation flag is only set during
    monotonic propagation and not while reevaluating non-monotonic nodes.

  • FIXED: Possibly loop adding a lazy monotonic dependency.

  • FIXED: date_time_stamp/2 was broken in timezone handling after

  • FIXED: Possibly crash in completion detecting for lazy monotonic

  • FIXED: format_time/3 using date/9 term computed the weekday and year
    day of the UTC time rather than the local time. Mike Elston.

  • TEST: one more test for lazy monotonic tabling.

  • FIXED: We must remove the queued answers or a recursive call will keep
    re-evaluating them. This triggered tabling_monotonic_lazy_14 after
    fixing the issues from tabling_monotonic_lazy_16. The disadvantage
    is that if we get an exception during the propagation we cannot retry.
    There are probably more troubles with that and we should probably
    just abolish the involved tables.

  • FIXED: If we call an invalid table we must re-evaluate the table
    immediately, also if this is a lazy table and we are inside lazy
    answer propagation.

  • ENHANCED: Avoid recording duplicate dependencies for lazy monotonic

  • ENHANCED: trace/1,2: add recursion depth to output to make it easier
    to understand.

  • FIXED: Inconsistent behavior of current_prolog_flag/2 and
    prolog_flag/2 in SICStus emulation. With SICStus emulation active,
    current_prolog_flag/2 and prolog_flag/2 now always give the same
    results, and always take priority over the autoloadable prolog_flag/2
    from library(quintus).

  • FIXED: write_term/2,3 numbervars for ‘$VAR’(N) terms where N is a
    GMP integer.

  • PPA: Groovy is no longer supported. Added Hirsute

Package archive

  • PORT: Support libarchive versions without raw or mtree formats.

Package chr

  • FIXED: Make chr work in temporary modules (Pengines, SWISH)

Package clib

  • ADDED: uuid_property/2 to get the version and (for 1 and 2) time
    stamp of the UUID.

  • ENHANCED: Always install library(uuid), providing (currently) a
    random UUID in case the OSSP-UUID dependency was not available for
    building SWI-Prolog.

Package xpce

  • FIXED: gtrap/1 is not a meta-predicate.

  • ADDED: gtrap/1 to call trap/1 with the graphical debugger.


Does not yet show a Mac version here as of 03.09.2021:

Should I wait some more 24 hours?

Oops, forgot to upload. Most of this stuff is scripted, but the MacOS version cannot be built in a Linux container (legally), so I have to login to my Macbook :frowning: Uploaded. Should be there in max two hours or immediately from one of the backend servers

Ok, I finally downloaded 8.3.29. There is a strange
irregularity if the dynamic/1 directive is missing, and if
the predicate is implicitly dynamic, like here:

?- assertz((foo2(X,Y) :- Y=1, bar=X)).

?- assertz((foo2(X,Y) :- Y=2, baz=X)).

?- listing(foo2/2).
:- dynamic foo2/2.

foo2(bar, 1).
foo2(A, B) :-

Looks like the first assertz/1 treats foo2/2 as static?

Looks like a bug. Requires some reorganization, so for now just use dynamic/1 :slight_smile: