Ann: SWI-Prolog 9.3.12

Dear SWI-Prolog user,

SWI-Prolog 9.3.12 is ready for download. This version comes with
several new features and bug fixes. Highlights:

  • Fixed bug in LibBF based big numbers used by default on the
    WASM and MacOS app versions. This could cause crashes as
    well as incorrect results on really big integers.

  • Several updated and fixes to the pack manager.

  • MODIFIED: argv_options/3 from library(main) for long options
    with optional arguments. A long option is now interpreted
    as boolean unless it uses the =value notation.

  • More C++ updates by @peter.ludemann

  • Added is_message_queue/1 as there was no way to check that
    a (named) message queue exists without possibly raising an
    exception.

  • IDE (xpce) updates:

    • sizing issue on hires fonts for the profiler
    • More flexible handling for dealing with other threads when
      in the GUI debugger. Now provides three modes when another
      thread hits a debug location: open a new debug window (this
      used to be the only option, cluttering your desktop), tell
      the other thread to continue in nodebug mode or block
      the other thread. The latter is now the default while the
      Tool/Settings allow changing this on the fly.
  • Clarified several license issues that were blocking a new
    release for Fedora. Co-operated with the Fedora package
    maintainer to sync the package names and contents.

    Enjoy — Jan

SWI-Prolog Changelog since version 9.3.11

  • ADDED: is_message_queue/1 to test the existence of a message queue.

  • ADDED: with_stopped_threads/2 to run a goal while other threads
    are stopped. This is a utility for supporting the debugger.

  • MODIFIED: interactor/0,1 to run thread in normal mode.

  • FIXED: pack_publish/2 reporting (claimed failure)

  • ADDED: swipl pack publish --server=URL ... Allows publishing at
    an alternative server.

  • ENHANCED: argv_usage/1 to put a newline before the footer section.

  • FIXED: Package manager, swipl pack publish . Broken detection of
    git directory and failure do deal with

     requires(prolog:flag(_Value)).
    

    to test for existence of a Prolog flag.

  • FIXED: Possibly memory leak in LibBF arithmetic A thread race condition
    may lead to loosing cache values from get_trig(). Fixed using C11
    atomics.

  • FIXED: Use stack variable after return for LibBF bignums This leads
    to incorrect results and crashes when using really big bignums.
    The LibBF bignum implementation is by default used for the WASM
    version and the MacOS binaries.

  • ENHANCED: install_pack/1,2 to prefer https over http for downloading.
    Unless insecure(true) or swipl pack install -k <pack> is given,
    possible HTTP links are automatically rewritten to HTTPS.

  • FIX: missing dot that one had interesting side effects :slight_smile:

  • ENHANCED: pack_install/1: warn if files are downloaded over HTTP

  • MODIFIED: argv_options/3: with type (bool|sometype) We now consider
    the option boolean unless written as --opt=value Before, the
    option was considered boolean if it was the last argument or the next
    argument started with a -.

  • FIXED: argv_options/3 handing of boolean|Type on last option

  • PORT: Add gettid() detection

  • PORT: Call gettid via its glibc wrapper if possible

  • ENHANCED: Arithmetic performance. This patch reverts
    18d5d539af0807808ba6fee6ec66394aaec589f1 except for clang as it does
    cause a significant slowdown on some systems.

  • LEGAL: Resolved license issues for dialect/xsb/basics.pl Hi Jan,
    As the coder of a number of (but by no means all) the predicates
    in XSB’s basics.P, I’m perfectly fine with you releasing under the
    BSD-2 license. Regarding the issues with XSB’s licenses, we’ll have
    to consider it and come to some decision. Best, -David

  • DOC: Updated limits section

Package debian

  • PORT: Added qtbase5-dev as alternative to support teh Qt compole for
    focal and bionic

Package cpp

  • DOC: Added C++ version of foreign.doc’s calc.c example

  • MODIFIED: Return type wrappers changed to bool, matching SWI-Prolog.h
    This matches the changes in SWI-Prolog.h with commit a1e914f

  • DOC: added blob example (wrapped pointer)

  • ENHANCED: PlTerm::get_file_name() returns std::string

Package http

  • ADDED: Allow for throw(http_reply(hangup)) to simply hangup the line.
    This is not a valid reply, but can be used to quickly terminate
    connections as well as for testing error scenarios.

Package sgml

  • DOC: xsd_time_string/3 XSD strings in table were wrong.

Package swipy

  • PORT: Avoid compiler warnings on 32 bit platforms

Package xpce

  • ADDED: Configure how the GUI tracer behaves if another threads hits it.
    The default now is to block such threads. Alternatively it may be
    set to nodebug, meaning the thread continues in nodebug mode or
    trace, meaning it opens a secondary trace window. The latter is
    how it used to work.

  • FIXED: Argument indentation on next line

  • ADDED: PceEmacs: Indent dict values relative to the key when on
    next line

  • FIXED: PceEmacs language_mode<-argument_indent Should fail if there
    is no argument.

  • ADDED: Allow disabling the message capturing popup for the session.

  • SCALE: Predicate browser of profile/1 GUI.

  • LEGAL: Resolved license issues wrt xdnd.[ch] by Paul Sheer (LGPL)
    This turns xpce on X11 effectively into LGPL. On Windows, this code
    is not used and thus BSD-2 is effective.

1 Like

I got the following error message on compiling the latest git source on macOS Sequoia with latest version of Xcode. I did not make any change on building script for long time.

/Users/cantor/src/swipl-devel/src/pl-thread.c:1203:22: error: no member named 'tv_nsec' in 'struct timeval'
 1203 |     timeout.it_value.tv_nsec = (long)(fp*1000000000.0);
      |     ~~~~~~~~~~~~~~~~ ^
1 error generated.
[21/2121] Building C object src/CMakeF...js-pgo-instrumented.dir/pl-tabling.c.o
ninja: build stopped: subcommand failed.

1 Like

Oops, should have been tv_usec (and adjust of multiplication). Pushed a fix.