Ann: SWI-Prolog 8.1.24

Dear SWI-Prolog user,

I’m happy to announce SWI-Prolog 8.1.24. This is mostly a stability
release. Highlights:

  • Build Win64 version against OpenJDK 13 instead of an ancient Oracle
    SDK (more recent SDKs do not install under Wine and can thus not be
    used for cross-compilation). Win32 version is still compiled with
    the Oracle SDK as OpenJDK does not exist for Win32 (AFAIK).
    Also updated finding Java from the Windows registry, looking both
    for new and old keys.

    The might relate to Issues using JPL on Windows and JDK > 8 on Windows. Java-in-Prolog seems
    to work again out-of-the-box.

  • More Windows: avoid a 15 second delay opening the GUI debugger if
    the built-in editor was not used before.

  • Fixed a garbage collection crash related to atomic rationals as
    reported by Jos de Roo and Peter Ludemann.

  • Fixed a crash handling rationals in recorded terms, used by recorda/2,
    findall/3, thread_send_message/2, etc.

  • Get new a implementation for rationalize/1 from ECLiPSe (Joachim) that
    satisfies X =:= rationalize(X) for every float. Thanks!

  • Fixed JSON writing when rational numbers are encountered (writing as
    floats; this can be hooked to produce a string, object or whatever).

  • Rick Workman fixed a few more issues in the new IEEE 754 float support
    and added many more tests.

  • Support new autoloading in many more of the packages and fixed several
    issues in the old migration.

Release built with the new machine donated by DataChemist! This machine
also facilitated debugging the Windows 10 issues as Windows 10 was
barely usable inside a VM on the old development machine.

Enjoy --- Jan

SWI-Prolog Changelog since version 8.1.23

  • BUILD: Build Win64 version against OpenJDK 13 instead of the latest
    (Java 7) version that installs under Wine.

  • FIXED: Get foreign search setup better to reduce search on Windows
    and search the directory holding swipl.exe in the build environment.

  • FIXED: handling rational numbers in records could result in wrong value
    or a crash. Records are used (for example) in recorda/2, findall/3,
    thread_send_message/2.

  • ENHANCED: Avoid predicate_property(+Head, built_in) trying to define
    the predicate.

  • FIXED: Avoid :- expects_dialect/1 from depending on autoloading
    library(dialect).

  • FIXED: XSB library(increval), incr_table_update/0 call to reeval/1
    fixed to reeval/3.

  • FIXED: XSB library(tables), get_returns/2 to use new answer subsumption
    representation.

  • DOC: Updated instructions for cross-compiling SWI-Prolog for Windows
    using Linux.

  • TEST: Additional fixes and test for rational and IEEE 754 tests.

    1. Rounding tests fixed to test mode. Requires imprecise test, e.g.,
      not cos(-π), with results within 1ULP. 2. Added tests for generating
      exceptions (not on all functions). 3. Fixed ** tests for current
      operator priorities.
  • PORT: lgamma fix for sign of inf on some platforms.

  • ADDED: ‘$portray_text_enabled’/1 to allow the GUI tracer to inspect
    text portray mode without cross-module calls.

  • FIXED: prolog_program_clause/2: allow filtering on a specific module
    as the docs says is possible.

  • TEST: Added roundtrip tests for rational/1 and rationalize/1 functions.

  • PORT: Replace deprecated finite() with isfinite(). Paulo Moura.

  • PORT: Added test for HAVE_IP_MREQN to Sockets.cmake

  • FIXED: Copied new rationalize/1 implementation from ECLiPSe by
    Joachim Schimpf. Thanks!

  • ADDED: library(prolog_code): is_control_goal/1.

  • FIXED: Garbage collection handling for walking remaining clauses for
    the *+MPQ instructions. Reported by Jos de Roo and Peter Ludemann.

  • ADDED: function lcm/2. This patch also FIXES gcd(X,0) to evaluate
    to X rather than to 0.

  • FIXED: print_term/2: handle write_options(…)

Package clib

  • PORT: UDP multicasting detection of HAVE_IP_MREQN instead of hard
    coded test.

Package http

  • ADDED: json_write/2,3 and variations: emit rational numbers as
    floating point numbers. Applications can redefine this behaviour
    using json_write_hook/4.

  • ENHANCED: atom_json_dict/3: use open_string/2 instead of memory
    files for better performance, more flexible input handling and error
    generation.

  • FIXED: http_open/3 undefined http_header:http_post_data/3 for POST
    requests.

  • AUTOLOAD: Support new autoloading for the client libraries and some
    of the server parts.

  • CLEANUP: Make dict code no longer conditional.

Package jpl

  • PORT: Resolved JPL loading on Windows. This implies (1) using (again)
    foreign(jpl) to find the library (2), get the proper Java location from
    the Windows registry, (3) clarify win_add_dll_directory/2 issues and
    (4) properly setup the foreign search path in the Windows build
    environment.

  • PORT: Updated Windows Java registry locations for recent versions of
    Java (still also looks at the old places).

  • PORT: Make loading library(jpl) work again on Windows.

Package odbc

  • AUTOLOAD: Support autoloading.

Package pcre

  • AUTOLOAD: Support new autoloading.

Package pldoc

  • FIXED: Avoid dependency on old manual index.

Package semweb

  • AUTOLOAD: Support new autloading for the semweb (RDF) library.

Package ssl

  • ADDED: export ssl_upgrade_legacy_options/2 from library(ssl) to
    cleanup dependency handling.

Package xpce

  • FIXED: Windows: avoid a 15 seconds wait for opening the GUI debugger
    if the editor was not used before.

  • ADDED: PceEmacs ->insert_line_comment: process numerical argument
    to set the comment column. Default: use nearby, 4: use setting,
    else use value.

  • ENHANCED: PceEmacs: ->insert_line_comment to find the column from a
    nearby line comment and align with that if possible.

3 Likes

I really do like this change. :yum:

It is a bit weird nobody complained. This bug was for quite a while in the development version, since message queues changed from using MS Event objects to MS condition variables for synchronization. These do not process Windows events and as a result registering the editor DDE service had to wait for the 15 seconds DDE timeout. Maybe I should use Windows a bit more often :frowning:

On my mac, I get an error when using make.
See screenshot attached.

![Screenshot 2020-03-05 at 16.39.17|690x250]

It seems that in some cases when compiling with swipl --undefined=error -o ... -c ..., some dynamic directives are needed that weren’t necessary before. This appears to be a bug-fix that isn’t mentioned in the readme. (For me the warnings are legitimate.)

make seems to do something similar … for some reason, there’s no message when the program is initially consulted but there’s a message when a subsequent make is done.

Also, I noticed that when loading a .qlf file, the message is 0 clauses. I don’t remember if this was different in the past. (Loading a .pl file gives the correct number of clauses.)

Thanks. Fixed,

Please copy/paste output as text. That is better indexed by search engines and save rather precious space on our free Discourse plan.

Possible. Eventually the migration to the new autoload system will change best practices to build stand-alone applications. Until then, things are a bit in flux (but typically getting more robust).

The initial program load doesn’t call list_undefined/0. That would slow down startup and might result in unwanted messages for just running an application. make/0 is executed by a developer, so we have a human in the loop and spending a little time is fine. The developer is most likely also interested in these messages while a user of the application may not be.

There is no reliable way to generate these messages in the current version and therefore they are silenced by default. Make/0 still prints messages as developers probably want to see that the system is indeed reloading the expected (edited) files. Might be better to remove clause counts as well here …

1 Like

Fixed: May Be. Released: No