Ann: SWI-Prolog 8.1.25

Dear SWI-Prolog user,

SWI-Prolog 8.1.25 is ready for download. This is mosly a bug fixing
release. Highlights:

  • Rick Workmans contributions for IEEE 754 float and rational number
    corner cases is getting near completion.
  • Enhancement to clause GC which can prevent memory leaks on dynamic
    predicates with old open choice points.
  • Fixed crash in deeply nested trie terms (tabling).
  • Fixed handling floats in completed tables.
  • Cory Cohen fixed a memory leak in clause indexing.
  • Matt Lilley extended support for XML canonicalization (for signing).
  • Several refinements and fixes to the new autoload support
  • Several portability issues as well as more graceful handling of
    missing dependencies, notable for building the documentation.

And a lot of smaller fixes …

Enjoy --- Jan

SWI-Prolog Changelog since version 8.1.24

  • TEST: Do not include source directories for dependent packages in
    the test library search path: these libraries are installed.

  • BUILD: Better handling of dependencies for building the docs.

  • FIXED: Make compile without GMP and fix detection of {-1,0,1}**X
    for overflow.

  • CLEANUP: Remove already defined predicates.

  • FIXED: silence autoload/2 if the predicate was already autoloaded
    from the same location.

  • FIXED: check/0: incorrect redefined messages for ‘$exported_op’/3 and
    ‘$autoload’/3. Paulo Moura.

  • ENHANCED: more work on integrating IEEE754 floats. Notably resolve
    division by zero issues.

  • FIXED: ./3: (Dict.Func): allow built-in dict functions get/1, put/1
    and put/2 to work on association lists.

  • FIXED: Memory leak in hash assessment keys allocated during
    assess_scan_clauses.

  • MODIFIED: module_property/2: if module exports no operators, succeed
    with an empty list. Paulo Moura.

  • TEST: Omit equivalence rounding check on Rz.

  • FIXED: pow/2 function: integer corner cases Some integer special cases
    weren’t consistent with C11 pow() semantics - fixed. Includes 0**nan
    => nan.

  • FIXED: dealing with floats in compiled tries.

  • FIXED: Do not set encoding when including from a stream. This is
    needed for SWISH to include a Unicode document from an ISO Latin
    1 document.

  • FIXED: writef/2 handling of justification using e.g., %Nl resulted
    in a format error.

  • ENHANCED: Cover more pow/2 cases and add tests.

  • TEST: Avoid failure when IEEE 754 rounding test for to_negative is
    the same as to_positive. Should (probably) not happen, but does on
    some platforms.

  • FIXED: Possible crash on deeply nested terms in tries.

  • MODIFIED: Functions rational/1 and rationalize/1 errors. Sync with
    ECLiPSe.

  • DOC: Deprecate epsilon/0 in favour of nexttoward/2.

  • FIXED: Raise a float underflow exception when converting a subnormal
    float to an MPQ number. This patch moves C header info from several
    .h files into a new pl-arith.h header.

  • ENHANCED: More subtle tracking of generations that access a (dynamic)
    predicate. This avoids old open choice points on dynamic predicates
    blocking effective clause GC. In some scenarios this can drastically
    reduce memory usage.

  • ADDED: bounded_number/3

  • FIXED: Removed unused and incorrect open_html/1 from library(win_menu).

  • ADDED: library(prolog_code): extend_goal/3.

  • PORT: environ detection for older MacOS versions (missing
    declarations for config.h.cmake).

Package RDF

  • CLEANUP: Support autoloading. Renamed too ambiguous library(rewrite)
    into library(rewrite_term)

Package http

  • TEST: Omit HTTPS tests of library(ssl) is not provided.

  • BUILD: No longer need SSL for building the docs

  • ENHANCED: json_read/2,3 and json_read_dict/2,3: if the input stream
    is binary switch it to use UTF-8 encoding for reading the dict.

  • ENHANCED: http_open/3 to autoload library(gzip) if the content encoding
    is gzip.

Package pengines

  • FIXED: Pengine ID generation if UUIDs nor GMP numbers are provided.

  • ENHANCED: Term -> HTML rendering to take care of SWISH preferences.

Package pldoc

  • FIXED: Property read the manual index regardless of the double_quotes
    flag in module user.

  • FIXED: link Alias(File) also when rendering a single object and not
    only a complete file. Peter Ludemann and Nicos Angelopoulos.

  • FIXED: ?- help(format).: pass options further down, add an option
    server(false) and thus avoid trying to rewrite HTML href fields
    for the command line manual. This is work in progress. Still far
    too much of the HTTP infrastructure is involved for showing the HTML
    manual pages.

Package semweb

  • FIXED: library(semweb/rdf11) handling of time related data
    structures. Reported and diagnosed by Joost Geurts.

  • TEST: Disable tests that require SSL if this is not present

  • ADDED: Turtle writer to understand RDF11 literal notation.

Package sgml

  • FIXED: When sorting namespaces in the element attributes, the critical
    thing is that the prefix is sorted, not the URI

  • ENHANCED: Handle ns/2 in xml_ns/3. Also properly handle the case
    where two different prefixes refer to the same URL now that we have
    the prefix available. This fixes canonicalization of attributes if
    there are two namespaces that expand to the same URI

  • MODIFIED: Respect keep_prefix option for attributes, as well.
    Required to compute XML signatures

Package xpce

  • BUILD: do not build xpce if Xpm, FreeType or Fontconfig are missing.

  • PORT: Build if X11/extensions/Xinerama.h is not present. Cory Cohen.

3 Likes

There is a quite serious mistake in the package in the sense that it drops xpce on Unix-like systems even if all prerequisites are present. This version will be replaced shortly by 8.1.26 :frowning: If you don’t use the graphics tools or use Windows you should be fine. Otherwise use the GIT version or wait for 8.1.26.

Sorry for messing up.

You’re one of the brightest software developers I have seen; a dose of humility is not a bad thing :grin:

3 Likes

I get a warning when I start swipl:

matthias@classking:~/swipl-devel/build$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.1.25-13-g275b7a6b7-DIRTY)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

Warning: /usr/local/lib/swipl/library/editline.pl:58:
Warning: editline:use_foreign_library/1 is a built-in predicate
?-

And another one when I consult a program:

?- [baseline].
Warning: /usr/local/lib/swipl/library/time.pl:50:
Warning: time:use_foreign_library/1 is a built-in predicate
true.

Thank you for considering.

Best wishes,

Matthias

Doesn’t reproduce for me. Most likely issues are something conflicting in your personal init file (try swipl -f none) or some environment variable (like SWIPL_HOME_DIR) pointing at an old installation. You may also like to run

?- check_installation.

to self-check possible issues.

Whatever it was, it has disappeard after a “fresh” git clone. Sorry for the false positive.

Best wishes,

Matthias

Thanks for clearing thus up. Note that “fresh clones” are nearly always unnecessary. First of all CMake can build the binary without any modifications to the source tree. Just make a directory. A typical choice is build below the top source dir, but it can even be outside the build tree. Than run cmake giving this directory. If you messed up too badly, just delete the build directory and start again.

On the git side, there is

git clean -xfd
git submodule foreach git clean -xfd

and anything that may accidentally have ended up in the source tree is gone. Use n instead of f to see what it would delete.

If you fear a version mixup, it is wise to delete <prefix>/lib/swipl before installing the new version. Without this, files that are removed from the system are not removed in your installed version. Typically that is not really an issue as nothing should refer to these old files.

2 Likes