Ann: SWI-Prolog 8.3.10

Dear SWI-Prolog user,

I’m happy to annouce SWI-Prolog 8.3.10. This versions comes with a couple
of serious fixes, some minor ones and notably getting Redis support to the
next level. Highlights:

  • Serious fixes

    • Fixed possible crash in sort/2 (yip, pretty unlikely, but possible).
    • Possibly infinite loop when handling a stack overflow.
    • Possibly recursive error when handling a stck overflow involving a
      list that ends in a huge compound term.
  • Nice to have

    • Fixed process handling in XPCE, making PceEmacs M-x grep and
      M-x git grep work again (as well as running a shell, etc.)
    • Fix to library(prolog_deps) for computing dependencies used by
      the PceEmacs command C-c C-d to update the file dependencies.
    • Fixes to SPARQL client and RDF literal matching
  • Redis status

    • Support Redis 6 RESP3 protocol
    • Allow keys to be written as k1:k2:…
    • Provide redis(Server, Command, Reply as Type) to avoid additional
      type translation
    • Modified and simplified Redis SUB support.
    • Lots of new stuff, docs, etc.

    Enjoy — Jan

SWI-Prolog Changelog since version 8.3.9

  • PORT: Windows: Install libswipl.dll.a as libswipl.lib. The MinGW.dll.a
    is supposed to be accepted by MSVC.

  • ENHANCED: Go more to the limit extending the stacks when we are
    printing a message, avoiding loosing messages due to resource
    exceptions.

  • FIXED: Exception term for running out of stack could be huge if the
    large term is a list ending in a huge compound term.

  • FIXED: globalize_term_ref() didn’t properly handling stack overflows,
    possibly leading to an infinite loop.

  • DOC: Fix typos

  • FIXED: library(prolog_deps): file_autoload_directives/3: fix minimizing
    updates to use_module/2 and autoload/2.

  • PORT: Issue#690: WASM: Remove outdated -s BINARYEN_TRAP_MODE=clamp
    Jacob Friendman.

  • ADDED: call_time/2 and call_time/3 to get timing info in a Prolog term.

  • DOC: Use imperative in man page

  • DOC: Add missing options to man page

  • DOC: Fix typos in manual

  • DOC: Fix typo in CMAKE.md

  • FIXED: sort/2 and related predicates: possible crash.

Package http

  • CLEANUP: Simplify redis based session handling using improved redis
    library.

  • MODIFIED: New Redis plugin for HTTP sessions now uses by default the
    key swipl:http:session

  • ADDED: library(http_unix_daemon): broadcast
    http(pre_server_start(Port)) and http(post_server_start(Port))
    around starting the individual servers.

Package pldoc

  • FIXED: help/1: avoid ERROR: http_handler_id `pldoc_man' does not exist on certain pages.

Package redis

  • FIXED: redis/2,3 to fail if the return is nil while using X as Type

  • ADDED: as types pairs, dict and auto and various refinements
    to the basic types.

  • ADDED: Reply as Type syntax. Incomplete.

  • ADDED: Convert A:B:C into a key.

  • MODIFIED: PUB/SUB interface. Easier to understand, more consistent
    and the implementation can now deal with a temporary loss of the
    connection to the Redis server.

  • FIXED: Listening on multiple streams. XREADGROUP only adds streams
    that have messages to its reply.

  • FIXED: We also need to claim our own pending messages. Otherwise,
    a failure to deliver when we are alone will keep processing the
    same message.

  • ADDED: Predicate option declarations. Further documentation.

  • ADDED: Support redis pipelines and transactions.

  • FIXED: Stream messages can have nil content.

  • FIXED: xlisten_group/5: listening on multiple streams caused the loop
    to fail.

  • ENHANCED: Better handling and documentation for messages that cannot
    be handled. After comments on the forum.

  • ENHANCED: Timeout management, allow setting the max retries and max
    wait time.

  • ADDED: library(redis_streams).

  • MODIFIED: Renamed redis_cli/1 to redis/1 and changed redis/2 to mean
    redis(Connection, Request, _). This avoids ambiguity of redis/2.

  • ADDED: Allow unix(File) as server address to connect to a Unix
    domain socket.

  • FIXED: ServerName based connections were not reused (slow, running
    out of file handles).

  • MODIFIED: Locking policy. See docs.

  • MODIFIED: redis_connect/2: deleted the alias(Alias) option. This is
    superseeded by redis_server/3.

  • ADDED: reconnect(true) option to make connections automatically
    reconnect.

  • ADDED: redis_array_dict/3 to simplify building new predicates that
    wish to exchange Redis hashes as dicts.

  • CLEANUP: Avoid compiler warning. Also signalled as PR#1 by Francisco
    Demartino.

  • ADDED: Redis protocol version 3 support on the Prolog side, updated
    tests, server info, more documentation.

  • ADDED: Redis RESP3 protocol support.

Package semweb

  • FIXED: Lexical representation of xsd:decimal numbers

  • MODIFIED: sparql_query/3: drop option to accept any SSL certificate.
    Code that insists loading silently from insecure systems should
    provide their own certificate checking. See ssl_context/3, option
    cert_verify_hook(:Goal).

  • DOC: New option handling

  • FIXED: Issue#91: allow specifying the accept header.

  • FIXED: Issue#99: preserve white space in SPARQL XML results.

  • FIXED: rdf11: compare untyped literals equal to xsd:string typed
    literals. Joost Geurts.

Package ssl

  • TEST: OpenSSL 1.1.1h seems to avoid duplicate calls to the
    cacert_verify hook. We now only test for unique results passed to
    this hook and no longer for duplicates. Unfortunately we do not
    really know the root of this change.

  • FIXED: ssl_context/4: Failure to report an error if the the certificate
    file does not exists.

Package xpce

  • FIXED: PceEmacs: M-x git-grep: disable color output.

  • PORT: class process: make pseudo terminal handling work again on linux.

1 Like