Ann: SWI-Prolog 8.3.17

Dear SWI-Prolog user,

SWI-Prolog 8.3.17 has been released. Highlights:

  • Fix a regression in absolute_file_name/3 that (notably) prevented
    installing packs when no pack directory had been created yet.

  • Fixed issue in unify_with_occurs_check/2 with constraints as
    reported here by Jan Burse.

  • Fix race in autoloading that could lead to undefined
    predicate errors for dependencies of the autoloaded predicate.
    Peter Ludemann found this.

  • Related, fixed signal handling during compilation. Aborting a
    compilation is unsafe and therefore signals are no longer
    processed. The user can forcefully interrupt this process and
    other signal atomic processes using a double Control-C.
    double Control-C now also works in the swipl-win.exe
    console.

  • Improved Control-C handling in swipl-win.exe when a lot of
    output is generated.

  • A couple of new library predicates (clumped/3, mapterm/3,
    same_functor/2-4, sub_term_shared_variables/3

  • More SICStus dialect additions by @dgelessus

    Enjoy โ€” Jan

SWI-Prolog Changelog since version 8.3.16

  • FIXED: Issue#763: Attempt to create cycle import module dependency
    exception was not handled correctly. Reported by David Tonhofer.

  • FIXED: thread_wait/2 handling of the timeout option.

  • FIXED: incr_is_invalid/1 from library(dialect/xsb/increval) to
    enumerate instances of the arguments that have invalidated tables.

  • ADDED: sumlist/2, transpose/2, partition/5, clumped/2 to SICStus 4
    library(lists) emulation.

  • ADDED: nonmember/2 to SICStus 4 emulation.

  • ADDED: [is_]mutable/1 to SICStus 3 and 4 emulation.

  • ADDED: More SICStus 4 library(terms) predicates, from SWI
    library(occurs).

  • FIXED: Windows swipl-win.exe console: check input messages before
    handling output such that e.g., Control-C works when the output
    is flooded.

  • MODIFIED: Allow processing interrupts in Windows when in critical
    state.

  • FIXED: Possible deadlock when passing Control-C from swipl-win.exe.

  • FIXED: possible race in swipl-win.exe output handling.

  • FIXED: sleep/1: interrupt processing for Windows.

  • MODIFIED: Run compilation of a file in signal atomic mode to avoid
    partial loads of a source file. Double Control-C allows (dangerous)
    abort of the load.

  • MODIFIED: Pass sigint on even when in critical mode. Allows for
    double Control-C to break out of blocked operations.

  • FIXED: detection that we are currently loading a library needed for
    autoloading, so we need to block.

  • COMPAT: clumped/4 in SICStus does not first sort the list, i.e.,
    it implements run length encoding rather than frequency counting.

  • DOC: Added library(terms) to the main documentation.

  • ADDED: library(terms): same_functor/2-4, mapterm/3

  • FIXED: Issue#758: unify_with_occurs_check/2: possible false success
    when attributed variables are involved. Possibly may also involve
    cases where no attributed variables are involved. Reported by
    Jan Burse.

  • CLEANUP: Issue#128: silence maybeUnregisterDirtyDefinition() message
    for release build. Fabrizio Riguzzi.

  • ADDED: clumped/2 to library(lists).

  • ADDED: sub_term_shared_variables/3 to library(occurs).

  • BUILD: Issue#704: skip building the HTML docs if some dependency
    is missing.

  • FIXED: absolute_file_name/3 regressing for creating config
    directories. Resulted in pack install issues reported by Nicholas
    Hubbard.

  • ENHANCED: cannot_create_dir message if there are no candidates.

Package http

  • ADDED: Define http_open/map_method/2 as multifile so we can support
    non-RFC HTTP methods.

Package sgml

  • COMPAT: xpath/3: allow specifying attribute values in selectors
    as strings.
2 Likes

Thanks Jan and first of all a healthy and happy 2021!

At least EYE is happy with the new SWI-Prolog 8.3.17
working with SWI-Prolog 8.3.17 ยท josd/eye@0de5bc5 (github.com)

Thanks and Keep Up The Good Work!

1 Like

It is cherry-picked into GitHub - SWI-Prolog/swipl: SWI-Prolog stable releases

There is no such thing as officially supported as yet. That is likely to change. I have not thought about how long old versions will be supported in that case. As is, bugs are typically fixed in the latest development release and they are often backported to the latest stable release. A a bug-fix is in the end a modification as well, the choice depends on how likely it is that either the bug or the fix breaks existing code. Fixes that are not easily backported due to conflicting changes between the stable and devel versions are less likely to be backported as it takes much more work and it is harder to proof the modified backport is correct.

As is, versions older than the latest stable are never patched. If you rely on these, get the source, backport the fix and recompile. That is what open source is for.

I remember some Indian programmers using some sophisticated diff tools, doing nothing else than backporting changes all day. Could be pretty boring.

Here something exciting. The new version of SWI-Prolog 8.3.17 is a gas! We can finally run Scheme Quine. And the astonishing thing is that occurs check is faster than manual unify_with_occurs_check/2:

/* explicit unify_with_occurs_check/2 */
?- time((dif(Q, []), quine(Q, 6, N))).
% 208,612,270 inferences, 11.344 CPU in 11.332 seconds (100% CPU, 18390062 Lips)

/* occurs_check=true */
?- time((dif(Q, []), quine(Q, 6, N))).
% 48,502,916 inferences, 2.859 CPU in 2.859 seconds (100% CPU, 16962768 Lips)

The result is possibly indicative the way we explicitly placed unify_with_occurs_check/2 was faulty. So an occurs check flag, letting the Prolog interpreter do things automatically, is quite useful.

Its a pitty that only a very few Prolog systems have this flag.

1 Like