Ann: SWI-Prolog 8.0.2 (stable)

Dear SWI-Prolog user,

I’m happy to announce the stable version 8.0.2. This version fixes a
number of important issues:

  • Windows installer failing to install menu and desktop shortcuts
  • MacOS binary failing to run X11 (xpce, developmen tools)
  • JPL (Java interface) crash when using threads
  • Fix large performance degradation in exception recovery.
  • Fix possibly huge memory usage for programs using retract(all)
    intensively on predicates that are rarely inactive.
  • Fixed memory leak in trie_gen/3 (tabling)
  • Fix possible buffer overrun handling buffer memory > 2Gb

See below for details and various other additions and minor fixes.

Enjoy --- Jan

SWI-Prolog Changelog since version 8.0.1

  • FIXED: convert ‘annotated’ stack_limit command line option
    to an integer when qcompiling a toplevel Backport for
    ab243f50cd7c6ee42ad4cef85d81d11f21f2a8a3

  • ENHANCED: Windows: Updated swipl.ico for higher resolutions, so we
    no longer have to simplify it.

  • INSTALL: Windows: properly install shortcuts.

  • FIXED: trie_gen/3: memory leak

  • ENHANCED: Use a buffer rather than a linked list for trie enumeration
    choice points. Reduces memory and provides a small speedup.

  • ENHANCED: Avoid GET_LD for internal _PL_unify_atomic()

  • SECURITY: possible buffer overrun when dealing with very large strings

  • BUILD: Update CMAKE.md and enhanced cmake/CheckEnv.cmake, checking
    the environment for things that may break the build.

  • ENHANCED: allow plain integer values to be passed to --stack_limit
    command line option

  • ENHANCED: Avoid trapping debug hooks for setup_call_cleanup/3 and
    friends. This avoids about doubling the overhead when the development
    environment is used (PceEmacs and/or SWISH).

  • ADDED: Sandbox declarations for nb_linkval/2 and
    nth_integer_root_and_remainder/4

  • PORT: Remove -s BINARYEN_METHOD='native-wasm'
    as this is no longer supported. See
    https://www.google.com/url?q=https%3A%2F%2Fkripken.github.io%2Femscripten-site%2Fdocs%2Fcompiling%2FWebAssembly.html%23debugging&sa=D&sntz=1&usg=AFQjCNHxLe2QvzskaC58CouZdjzaqCW9Dw

  • PORT: Make sure to include CMAKE_CROSSCOMPILING_EMULATOR when setting
    the PROG_SWIPL

  • PORT: Make alignment detection work for Emscripten.

  • FIXED: library(prolog_colour): Avoid an exception on :- meta_predicate
    p().

  • FIXED: pack_remove/1 if the pack exists but was not attached due to
    a lacking foreign library. If the pack is really missing it now just
    prints a message instead of raising an exception. Paulo Moura.

  • PORT: Avoid dependency on C99 for alignment check.

  • FIXED: PL_thread_attach_engine(NULL) crashed. Stisko.

  • FIXED: Declare dynamic/1, multifile/1 and discontiguous/1 as iso.
    This avoids accidental redefinition.

  • BUILD: Allow scripts/pgo-compile.sh to run from any build dir, also
    if this is not an immediate subdir of the source. Paulo Moura.

  • PORT: Allow building in Haiku

  • PORT: Force compiling and linking against XQuartz on MacOS when
    creating a bundle.

  • ENHANCED: delete lingering clause indexes older than the oldest active
    predicate access

  • ENHANCED: Do not request a garbage collection after an exception
    unless we ran out of stack on a stack that is subject to GC.

  • ENHANCED: No longer perform forced GC before calling the user exception
    hook. GC is allowed inside the hook, so there is no reason to do so.

  • MODIFIED: No longer use print_message/2 for trace_gc. If GC happens
    in some parts inside the VM we cannot handle calls to Prolog safely.

  • FIXED: Make sure closing a zipper twice does not open the stream twice.

  • TEST: Avoid name clash in tabling tests.

  • ENHANCED: Verify a predicate has no clauses when :- table is declared.

  • FIXED: Issue#82: Throw a floating point exception when NaN/Inf floats
    need to be converted to an integer.

  • FIXED: Moved setting the SIGINT handler from resetTracer() to
    initTracer() so it won’t reinstall the default SIGINT handler on
    abort if the user changed the binding.

  • FIXED: on_signal/3 handling of throw. Peter Ludemann.

  • FIXED: qsave_program/2: deal with prolog and default
    toplevels. Keri Harris.

Package archive

  • ADDED: archive_foldl/4

Package clib

  • DOC: Fixed a small typo in chmod/2 documentation.

Package http

  • DOC: Use new [[library(http/json)]] notation to get proper
    paths for the source files included by json.md. Also updated the
    documentation intro for JSON a bit.

Package jpl

  • FIXED: Install env.sh into the Java examples and update it to deal
    with both the installed version and version from the build environment.

Package pengines

  • FIXED: in pengines:output_result for CORS and write_result hook
    1. Currently CORS support is only implemented for the json
      format. It really should be applied to all output when the http:cors
      setting is enabled (including any error responses generated by
      the http server libraries). The same philosophy should apply to
      disable_client_cache/0.

    2. The write_result/3 hook is not called when the format type is
      prolog due to clause ordering of output_result/3. The clause that
      calls the hook should be first (analogous to the event_to_json hook in
      event_term_to_json_data/3). A benefit is that attributed variables
      can by returned in response data via the hook.

Package pldoc

  • ADDED: Allow for [[Alias(Segments)]] to reference to files in markdown.

  • FIXED: Documentation search should find perfect matches on
    identifiers. Nicos Angelopoulos.

  • FIXED: Avoid duplicating documentation for PlDoc comment blocks that
    document multiple predicates.

Package sgml

  • ADDED: xpath/3: text(string) to get the DOM text as a string rather
    than an atom.

  • FIXED: xpath/3: make extraction work if the document was parsed
    using cdata(string).

Package swipl-win

  • DEBUG: Add debug messages to find the preferences path and track the
    font dialog.

  • FIXED: Issue#83: Qt console menu handling. This issue was due to
    omitted resources in the cmake build. Note that this does not fix
    the X11 problems of the MacOS bundle reported in the same issue.

Any idea when the Mac bundles for this (8.0.2) release and the 8.1.2 development release might be available on the “Download” page? (Linux and Windows versions are there.)

Release management problem. In fact the current versions are close to the *.2 versions. Uploaded the real releases for MacOS. Available from eu.swi-prolog.org and in max 2 hours from www.swi-prolog.org.