Ann: SWI-Prolog 8.4.0

Dear SWI-Prolog user,

A new stable version of SWI-Prolog is ready. 8.2.0 saw daylight on
May 27 2020. Since then, almost 1,400 changes have been committed. The
ChangeLog is very long. There are no changes that are likely to affect
many programs. Nevertheless, there are a few incompatible changes that
may affect your code. Please search for MODIFIED: below.

The major new additions deal with Redis and STOMP based micro services integration. Transactions and extended thread syncronization facilities greatly improve support for concurrent programming in a changing world. The det/1 and $/1 primitives make deterministic and functional programming much more reliable. Tabling support has improved a lot.

First, an executive summary. Note that there are many additions and
fixes, most of which are relevant to only a minority of the users.

Core

  • Added single sided unification (SSU) rules using =>/2.

  • Added det/1 to declare predicates deterministic and
    $/0 to tell the system that the remainder of the clause
    shall not fail.

  • Explicit unifications immediately after the head to head
    arguments are compiled more efficiently and such clauses
    are subject to clause indexing.

  • Added transaction/1,2,3 and snapshot/1, providing transactions
    with isolation and rollback.

  • Added thread_wait/2 to wait for database changes. This allows
    for scenarios that are normally implemented using POSIX
    condition variables.

  • Added monotonic tabling. This processes the consequences
    of assert/1 without recomputing affected tables, provided
    the program is monotonic, i.e., asserting a clause does
    not invalidate an already computed answer.

  • Many fixes to tabling, notably incremental tabling.

  • Several fixes to temporary module handling, notably safe
    reclaiming of registered source files and safe enumeration of
    modules. The issues notably crashed SWISH under heavy load.

  • @dgelessus added a dialect library for emulating a lot of
    SICStus 4.

  • frozen/2 has been modified considerably. It now works on
    any constraint rather than only on freeze/2 and is largely
    SICStus compliant.

Internal

  • Avoid reference pointers in the environments. This greatly
    simplifies last call optimization and avoids a lot of internal
    tests. It costs a little amount of additional global stack.
    Also implements fast LCO for “simple” cases.

  • @dmchurch modified the VM such that it is possible to compile
    the VM to a set of functions as well as to GCC threaded code
    or a C switch.

  • @dmchurch modified passing the notion of the current engine
    between internal functions for better readability and slightly
    better performance.

  • @dmchurch improved the tool-chain for creating a PGO optimized
    version on all platforms.

  • @dmchurch enhanced the internal debug message handling by
    including source locations in the messages and support
    wildcards to specify multiple debug channals.

  • @dmchurch changed the visibility of libswipl.so functions to
    hidden, so only the exported PL_* functions are accessible
    from the outside. Safer and improves performance.

Packages

The packages are mostly unchanged. Some notes:

  • The Google protobufs package that now has much more comprehensive
    coverage of protobufs thanks to the work by @peter.ludemann.
  • HTTP support now includes Unix domain sockets (AF_UNIX).
  • The clib package library(uuid) has a fallback implementation
    in pure Prolog if the ossp-uuid is not present.
  • A new package redis provides access to the Redis memory database
    and message broker.
  • A new package mqi by @eric.zinda allows querying Prolog from
    Python as it it were a library though a network interface. Can
    also work for other languages.
  • A new package redis provides a high level and efficient interface to the Redis distributed database and message brokering system.
  • A new package stomp allows communication with many message
    brokering systems, e.g., rabbitMQ.

SWI-Prolog Changelog since version 8.2.4

  • FIXED: possible failure to propagate changes in lazy monotonic
    tabling. This happens because answers added during lazy reevaluation
    are propagated eagerly, but ‘$idg_mono_affects_eager’/3 didn’t find
    dependencies to non-lazy tables.

  • ADDED: pack_install/1 and friends: pass a prefix flag to CMake or
    configure that follows the same conventions as the installed Prolog
    system.

  • ADDED: dcg_translate_rule/2 is now declared safe for use in sandboxes.

  • ADDED: notraceall/0.

  • ADDED: Allow authors of packs to not have an email address or URL.

  • ADDED: PL_cvt_i_schar() for explicit signed character handling.

  • ENHANCED: dict_options/2 in mode (-,+) to remove duplicate options,
    keeping the first.

  • ENHANCED: Cleanup code for format/2,3. Allow callback’s to cooperate
    with ansi_format/3.

  • ADDED: prolog_listen/2,3: listen to thread create events.

  • ENHANCED: ord_intersection/2 to raise errors of the input is not a
    proper powerset.

  • FIXED: Possible crash enumerating a trie holding indirect values
    against instantiated data. Reported by Eric Zinda.

  • FIXED: VMI_FUNCTIONS build now works with LDFUNC changes

  • FIXED: Issue#883: Decompiler to preserve order of arguments to
    optimized +/2 and -/2 functions.

  • FIXED: Issue#882: Test failure if xpce is not added to the build.
    Reported by David Tonhofer.

  • BUILD: Make building the docs works if X11 is not included.

  • FIXED: Completion of lazy monotonic tabling to exclude lazy monotonic
    tables without queued dependencies as there is no point in evaluating
    these now.

  • FIXED: Lazy monotonic tabling detection that a mutual dependent
    monotonic dependency network is complete.

  • FIXED: Allow listing/1 from a temporary module.

  • ADDED: customize/edit command to accept --no-wait option.
    Requires latest xpce package. Can by used with editor plugin for
    terminator.

  • DOC: Updated section “Prolog exceptions in foreign code”. Was pretty
    outdated.

  • FIXED: clause/2 moved unification for s(X) :- X = f(Y), p(Y).
    Bug introduced in fb96dc77bbd86df31ed7bd2282dd5b20f341f534.

  • FIXED: clause/2 (decompiler for moved unification instructions against
    the head.

  • RELEASE: Merging devel (V8.3.29-8-gf6e856bdb)

  • DOC: enhanced docs for ;/2, ->/2, and other control structures.

  • PORT: The MUSL C runtime library as used in e.g. Alpino Linux cannot
    safely call pthread_detach() from the pthread cleanup handler.

  • BUILD: Fixed building docs when building without xpce.

  • BUILD: Use PGO optimization for the Debian builds.

  • FIXED: clause/2 (and related predicates) on clauses where unifications
    are moved into the head failed in a saved state.

  • FIXED: clause/2 for unification that was migrated to the head and used
    nested in a term used as argument to some body call (using B_ARGVAR
    instead of B_VAR).

  • ADDED: format_time/3: handle '%P' on systems not using glibc.

  • FIXED: Adding missing newlines in tracer commands

  • TEST: Fixed answer tests for new toplevel output.

  • ADDED: Prolog flag toplevel_name_variables, which causes variables
    in toplevel answers to be named _A, _B, etc. Singleton variables
    are printed as _.

  • ADDED: current_temporary_module/1 to library(modules).

  • FIXED: Avoid optimizing memory load, causing an infinite loop when
    creating a new atom.

  • FIXED: =…/2 to avoid truncating to int (for arity > 2g).

  • ADDED: trap/1, notrap/1 as commandline utilities to trap exceptions.

  • CLEANUP: Move the command line debug utils such as spy/1 from the
    boot files into a new library(prolog_debug).

  • FIXED: make sure the monotonic propagation flag is only set during
    monotonic propagation and not while reevaluating non-monotonic nodes.

  • FIXED: Possibly loop adding a lazy monotonic dependency.

  • FIXED: date_time_stamp/2 was broken in timezone handling after
    e68098ba2b38d7d9597def1b4fc0a8cef1ed43cb.

  • FIXED: Possibly crash in completion detecting for lazy monotonic
    tabling.

  • FIXED: format_time/3 using date/9 term computed the weekday and year
    day of the UTC time rather than the local time. Mike Elston.

  • TEST: one more test for lazy monotonic tabling.

  • FIXED: We must remove the queued answers or a recursive call will keep
    re-evaluating them. This triggered tabling_monotonic_lazy_14 after
    fixing the issues from tabling_monotonic_lazy_16. The disadvantage
    is that if we get an exception during the propagation we cannot retry.
    There are probably more troubles with that and we should probably
    just abolish the involved tables.

  • FIXED: If we call an invalid table we must re-evaluate the table
    immediately, also if this is a lazy table and we are inside lazy
    answer propagation.

  • ENHANCED: Avoid recording duplicate dependencies for lazy monotonic
    tabling.

  • ENHANCED: trace/1,2: add recursion depth to output to make it easier
    to understand.

  • FIXED: Inconsistent behavior of current_prolog_flag/2 and
    prolog_flag/2 in SICStus emulation. With SICStus emulation active,
    current_prolog_flag/2 and prolog_flag/2 now always give the same
    results, and always take priority over the autoloadable prolog_flag/2
    from library(quintus).

  • FIXED: write_term/2,3 numbervars for ‘$VAR’(N) terms where N is a
    GMP integer.

  • PPA: Groovy is no longer supported. Added Hirsute

  • DOC: absolute_file_name/2. Issue#871

  • MODIFIED: absolute_file_name/3 to return directories if the requested
    access is none and no file type is specified as regular or
    directory.

  • MODIFIED: b_setval/2: backtracking over creating a global variable
    deletes the variable. If the old behavior is desired one can use
    nb_setval(Var, []) before calling b_setval/2.

  • MODIFIED: Global variables no longer use exception/3 for lazy
    evaluation after nb_delete/1 or after exception/3 called by
    nb_current/2 with a given variable name failed to define the variable.

  • ADDED: Integrate language_server package into the infrastructure

  • ADDED: language_server package by Eric Zinda

  • FIXED: Removed remaining literal __PL_ld references

  • ADDED: SICStus-compatible “FD set” API to library(clpfd).

  • ADDED: fd_degree/2 to library(clpfd).

  • ADDED: dict_size/2. Issue#864. David Tonhofer.

  • CLEANUP: LDFUNC refactor, part 2 (manual) This is the second of two
    commits that applies a refactor across the entire SWI-Prolog codebase,
    changing the syntax of passing LD from one function to another in
    internal library code. The bulk of the changes in this refactor were
    automated via Perl script in the previous commit; see that commit
    message for more details on that.

    Previously, functions that wanted to access LD (the local data
    structure) could either use the GLOBAL_LD macro, declare the
    GET_LD/PRED_LD macros early in the function, or declare ARG_LD/ARG1_LD
    somewhere in the function parameter list. Calling these functions
    required either declaring a macro (usually in pl-ldpass.h) that would
    add the LD argument to any call to the function, or adding a
    PASS_LD/PASS_LD1 annotation to each callsite.

    The new style revolves around a new macro called LDFUNC, defined in
    src/pl-builtin.h; see that file for details on its use. PASS_LD and
    its variants are no longer required at callsites; all LDFUNC-augmented
    functions have macro definitions that add the necessary arguments
    to the function call. Additionally, name-mangling is performed on
    function names, so it is no longer required to add __LD to a function
    name to keep it from colliding with externally-visible API functions.

    This commit also adds the API_STUB macro, which ensures that API
    function definitions do not have their names mangled, along with
    including a GET_LD declaration automatically.

    For more information, see the following post:

    Changes to LD-handling in library code

  • CLEANUP: LDFUNC refactor, part 1 (automated) This is the first of
    two commits that applies a refactor across the entire SWI-Prolog
    codebase, changing the syntax of passing LD from one function to
    another in internal library code. More details on the refactor are
    in the following commit, but since this touches so much code and to
    avoid having to manually verify a 20,000+ line diff, the bulk of the
    changes in this commit are automated by a Perl script, saved here
    (for this commit only) as src/ld-refactor.perl, with the output of
    the run saved in src/ld-refactor.out. This way, the script itself
    can be audited for correctness, and only the special cases in the
    following commit need to be checked manually.

  • FIXED: Re-evaluation through a cycle where the argument of tnot/1
    is invalid.

  • FIXED: reloading with :- discontiguous/1 directive in included
    file. Edison Mera.

  • ADDED: predicate_property/2 property discontiguous to reflect the
    effect of the discontiguous/1 directive.

  • FIXED: If tnot/2 is evaluated from an existing table we must make
    sure this table is part of the dependency graph.

  • FIXED: We must reset some worklist properties prior to reevaluation
    for WFS to work properly.

  • FIXED: We must preserve the TN_IDG_UNCONDITIONAL flag during
    re-evaluation to be able to detect that a previously conditional
    answer became unconditional after reevaluation. This also implies we
    no longer need the save/restore related to exception handling.

  • FIXED: we must consider a table modified if an answer turns
    unconditional while it was conditional before.

  • FIXED: If reevaluation changes conditions for a trie we must recompile
    the trie.

  • FIXED: tnot/1 table status evaluation during incremental re-evaluation.

  • ENHANCED: cli_enable_development_system/0: avoid loading xpce when
    creating a state.

  • FIXED: Failure in incremental tabling if a leaf predicate is both
    tabled and dynamic.

  • FIXED: Issue#861: blobs with PL_BLOB_NOCOPY|PL_BLOB_UNIQUE must only
    compare the pointer.

  • BUILD: Issue#860: PGO building did not work with make on MacOS.

  • ADDED: Initial partial library(clpfd) to SICStus 4 emulation.

  • BUILD: Issue#859: Building main.pl docs now depends on xpce.

  • PORT: Allocator detection.

  • ADDED: trim_heap/0 and a Prolog flag malloc to identify the malloc
    implementation and provide additional features when detected.

  • ADDED: Integrated stomp into the build process

  • ADDED: packages/stomp.

  • FIXED: lazy monotonic tabling requires a proper completion check. Such
    a table is complete if the dependencies do not contain any invalid
    incremental tables and all lazy queues are empty. Dependency
    tracking must be recursive and has to deal with loops. This fix
    avoids non-termination whil reevaluating lazy monotonic tables that
    contain cycles.

  • FIXED: While reevaluating a lazy monotonic node we should not consider
    it invalid.

  • FIXED: lazy monotonic update to set the current IDG node properly.

  • ENHANCED: explain/1 to support dicts, hide references from the
    cross-referencer and show file and line numbers for references from
    clauses.

  • ADDED: Supply a depth with the tracer r command to retry
    immediately on a parent goal.

  • ADDED: [level] S trace command to save a goal to the recorded
    database.

  • ENHANCED: Command line debugger ‘h’ command

  • ADDED: Command line debugger ‘g’ command to accept a negative number
    of frames as numeric parameter to print the outermost N frames rather
    than the innermost. As a result, the ‘-’ command (no spy) must be
    followed by the RETURN key.

  • FIXED: Issue#853: prolog_walk_code/1 did not respect the module_class
    option, scanning all modules.

  • ENHANCED: library(prolog_codewalk): avoid trying to find the file
    -.

  • FIXED: Avoid permission error when using autoload/1 after autoload/2.

  • ADDED: library(main): cli_parse_debug_options/2 and
    cli_enable_development_system/0.

  • ADDED: mapsubterms/3 to recursively substitute arguments in a sub term.

  • FIXED: on_signal/3 claims the signal is wrong on a type error on
    the handler.

  • FIXED: Avoid a race condition between thread_join/2 and thread_detach/1
    and disallow multiple threads to join the same thread. Updated docs
    for thread_join/2.

  • ENHANCED: trace/1,2 to work better on imported predicates, applying
    the wrapper directly to the implementation.

  • ADDED: File access mode search as an alias for execute.
    Improves compatibility with SICStus.

  • FIXED: Prevent source analysis to loop on an unbound module export
    list.

  • ADDED: library(file_systems) to SICStus 4 emulation.

  • FIXED: Accidentally left debug test that could lead to an “Too many
    stacked strings” fatal error.

  • FIXED: Monotonic table that depends on a monotonic table that has
    forced reevaluation due to a retract and a normal monotonic table.

  • ADDED: PL_get_uint64() and PL_get_uint64_ex() API functions for
    consistency.

  • ENHANCED: nb_setarg/3 to only copy for a compound term

  • ADDED: samkeysort/2 to SICStus 4 library(samsort) emulation.

  • DOC: Tabling and transactions

  • FIXED: Invalidate lazy monotonic tables when reevaluation inside a
    transaction introduces new dependencies on predicates modified inside
    the transaction.

  • TEST: transactions and lazy monotonic tabling

  • TEST: transaction and monotonic tabling

  • ADDED: Consistency of eager monotonic tables over transactions.

  • TEST: transactions and incremental tabling

  • ADDED: Keep track of incremental tables that needs reevaluating when
    we rollback a transaction.

  • MODIFIED: Interaction between thread_wait/2 and transactions: database
    changes do not wakeup threads that are in a transaction because the
    change is invisible anyway and thread_wait/2 cannot be called inside
    a transaction as nothing can cause a wakeup.

  • ENHANCED: Avoid unnecessary wakeup in thread_wait/2 from modifications
    inside a transaction. Do notify on the transaction commit.

  • CLEANUP: Make role of special transaction generations clear by using
    a macro for them.

  • FIXED: last_modified_generation logic for predicates that are modified
    inside a transaction.

  • BUILD: Single threaded version still requires pthread library on
    Windows as this is a dependency for the gcc runtime library.

  • MODIFIED: Do not define rational/1 if rational number support is
    not enabled.

  • FIXED: library(sandbox) to handle the possibility that rational/1 is
    not defined.

  • TEST: Avoid rational number syntax errors when GMP is not used.

  • ADDED: eol//0 to library(dcg/basics).

  • FIXED: Build for single threading

  • FIXED: missing GMP exports, -Wmissing-prototypes This addresses issues
    exposed by adding -Wmissing-prototypes to the build, hacked in as
    cmake -DCHECK_PROTOTYPES=1. This flag emits a warning when any
    non-static function is defined without first declaring a separate
    prototype, which usually means that either a header hasn’t been
    included, or that a function that should have been static wasn’t
    marked as such. The Linux compile is clean now, after having:

    • added static to functions not called outside the file
    • completed incomplete header prototypes, usually by adding (void)
    • removed old functions no longer called anywhere
    • included gmp.h before SWI-Prolog.h, to enable the missing GMP exports

    The Windows build still has some missing-prototype warnings because of
    various #ifdefs, but I’m not addressing those right now.

  • CLEANUP: Moved includes to files that use them. This also moves some
    inline definitions out of pl-inline.h, specifically those that call
    functions defined in other headers.

  • FIXED: Changing _xos defs to function-like macros Fixes a compilation
    error in atom.c:1151, where a->type->write is transformed into
    a->type->_xos_write.

  • CLEANUP: Refactoring to per-module header files

  • BUILD: Changing default visibility to hidden. This makes portable
    shared library builds work like Windows DLL builds, i.e. all symbols
    are library-private rather than exported by default. This fixes a
    fair amount of symbol leakage that had been happening when functions
    and variables weren’t marked COMMON().

  • BUILD: Fix possibly failing PGO build due to lacking dependency

  • FIXED: optimise_unify Prolog flag was handled negated. Jan Burse.

  • BUILD: Moved pl-alloc/index/fli out of pl-wam This adds USE_*_INLINES
    as a flag that can be set before including pl-incl.h, to include some
    of the function definitions from various files in a “can-inline”
    context. It also separates the majority of pl-alloc.c, pl-index.c,
    and pl-fli.c out into their own object files, to speed up the build.

    This may result in a slight (1-2% at max, in my testing) performance
    loss since the pl-wam compilation doesn’t have access to all the
    function definitions in those three files, but enabling LTO on the
    build (which I have not yet, since it currently generates warnings)
    avoids the performance drop entirely by allowing the linker itself
    to perform any applicable cross-file inlining.

  • PORT: Avoid UTF-8 characters in source code.

  • PORT: Avoid relying on GCC -Werror=missing-profile flag that is
    not supported on older systems.

  • FIXED: Silent failure in CLP(FD) domain calculation for truncated
    division.

  • ADDED: Prolog flag shift_check to check for suspicious continuations.

  • FIXED: flipped shift/1 and shift_for_copy/1 behaviour.

  • FIXED: Capturing the continuation inside a meta-predicate restores
    the wrong module context.

  • FIXED: frozen/2 leaves residual variables on backtracking.

  • DOC: frozen/2, copy_term/3 and attribute_goals//2 interaction.

  • FIXED: frozen/2 to allow attribute_goals//1 to modify the attributes.

  • FIXED: negative numerical argument for format from argument list

  • PGO: Updated docs and utility scripts to use the new CMake PGO
    build type.

  • BUILD: Added self-contained PGO process to CMake. This change makes
    it possible to run a PGO build with a single invocation of the build
    process. To do so, use the “PGO” configuration in CMake rather than
    “Debug” or “Release”, which will:

    1. Compile all libswipl objects with profile generation enabled. This
      uses auxiliary target names with “-pgo-instrumented” appended.
    2. Link the executable “swipl-pgo-instrumented” in src, using these.
    3. Use swipl-pgo-instrumented to create boot.prc (since no other swipl
      exists yet). Clear the PGO-data directory, then run the benchmark.
    4. Build the libswipl objects again, using the PGO data generated.
    5. Link the final swipl executable from these.

    The dependencies are set up such that if any source file changes,
    ninja will recompile the instrumented version of the affected file(s)
    and then restart the process from step 3, recompiling ALL libswipl
    objects using the new PGO data.

    Tested with gcc 9/10 and clang 10/11.

  • DEBUG: Debug wildcard and complement; DEBUG_IF The -d command line
    option now takes an optional asterisk (*) on the end of a debug
    flag name to enable all flags that begin with that name. Also,
    flag names can be prefixed with a caret (^) to disable that flag;
    only particularly useful in combination with the wildcard, to silence
    chatty channels. For example,

    swipl -d MSG_SHIFT*,^MSG_SHIFT_FRAME
    

    will enable all MSG_SHIFT channels except for MSG_SHIFT_FRAME.

    On the internal side, we now have the DEBUG_IF(cond, channel) macro,
    which functions much like DEBUG(channel, statements) except it provides
    more control over the conditions, and it avoids statements in a macro.
    As a result, the statement

    DEBUG(MSG_CHANNEL, Sdprintf(...));
    

    is (for a named channel, at least) equivalent to

    int debug_active = DEBUGGING(MSG_CHANNEL);
    DEBUG_IF(debug_active, MSG_CHANNEL)
    { Sdprintf(...); }
    

    which itself is roughly equivalent to:

    #if O_DEBUG
    int debug_active = DEBUGGING(MSG_CHANNEL);
    if (debug_active)
    { ENTER_DEBUG(MSG_CHANNEL); Sdprintf(...); EXIT_DEBUG(MSG_CHANNEL);
    }
    #endif
    

    This commit also includes some improvements to the GC debug messaging.

  • CLEANUP: Issue#835: Avoid singleton variable in branch when compiling
    with optimization.

  • TEST: Added when/2 test suite.

  • FIXED: Issue#818: when/2 conditions with nested disjunctions not
    being displayed properly by toplevel and copy_term/3.

  • ADDED: copy_term/2 to SICStus 4 emulation (same as SWI
    copy_term_nat/2).

  • ADDED: library(types) to SICStus 4 emulation.

  • ADDED: max_member/3 and min_member/3 (with an order predicate argument)
    to library(lists).

  • REFACTOR: This patch completes the first round of refactoring the VM.
    It allows for the same source to create a VM as threaded code
    jumping to label addresses in a giant function as well as a VM
    that has an array of function pointers, one function for each
    VM instruction. This is work by @dmchurch.

  • CMAKE: Added -DVMI_FUNCTIONS=ON

  • ADDED: Allow foreach//2 from library(dcg/high_order) to work with
    non-lists.

  • FIXED: listing/1 and friends for compound terms using [] as functor.

  • FIXED: Make PGO build work again

  • ADDED: Define undo/1 as sandbox-safe

  • FIXED: Issue#830: assertion failure in GUI debugger. Wouter Beek.

  • TEST: Make a test fail if an error message is printed.

  • FIXED: locale_create/3: handling of default and current_locale.

  • ADDED: Make the new on-error and on-warning options work both in
    normal mode and in compilation (-c) mode.

  • ENHANCED: Handle underscores and minus the same when parsing
    compilation options for -c.

  • ENHANCED: Enable color output when compiling

  • ADDED: Prolog flags on_error and on_warning connected to
    commandline options.

  • ADDED: Provide a (silent) message reporting the error and warning
    count while loading a file and document error handling during
    compilation.

  • ADDED: statistics/2 and thread_statistics/3 keys warnings and
    errors.

  • ADDED: undo/1 to schedule goals to be called on backtracking.

  • FIXED: Issue#110: Nested consult/1 on already loaded files (reconsult)
    did not do generation management correctly.

  • MODIFIED: Renamed incr_propagate_answer/1 to incr_propagate_calls/1.
    Removed incr_invalidate_answer/1 (is incr_invalidate_calls/1).

  • FIXED: Ensure a compiled trie never ends in I_FAIL. This crashes
    the debugger.

  • FIXED: vm_list/1 for compiled tries.

  • ADDED: incr_propagate_answer/1 and incr_invalidate_answer/1.

  • MODIFIED: Move library(increval) from dialect/xsb to the core
    library. Code using the XSB emulation should run unmodified.
    Code that uses this library as library(dialect/xsb/increval)
    must be updated to load library(increval) or rely on autoloading.

  • DOC: Updated stream_property/2 for representation_error

  • ADDED: Prolog flag character_escapes_unicode

  • CLEANUP: Generalize fast access to boolean Prolog flags such that we
    can host more than 32.

  • ENHANCED: Use Unicode classifiers for deciding on which characters
    to escape for quoted write.

  • DOC: Escape sequences used for quoted write.

  • MODIFIED: Make quoted write depend on iswgraph() rather than not
    quote any non-ascii character. Escaped characters are written as
    \x<hex>\.

  • ADDED: code_type/2: category print

  • FIXED: Tighter checking correctness of sandbox declarations and fix
    wrong declaration for ‘$moded_wrap_tabled’/5 (was /4).

  • DOC: stream_property/2 representation_errors property.

  • DOC: Explain current status wrt dynamic and static linking.

  • BUILD: Added -DSWIPL_STATIC_LIB=ON config option to also build
    a static library.

  • BUILD: Use CMake OBJECT library as intermediate.

  • ENHANCED: Issue#825: Error handling when goal_expansion/2 binds a
    variable in \+/1 or ;/2.

  • ADDED: Prolog flag optimise_unify to prevent moving unifications
    to the head. as these harm notably the source level debugger
    experience.

  • FIXED: runtime change of det/1 property. Peter Ludemann.

  • FIXED: Fresh table that depends on an invalid monotonic lazy table
    causes a permission error.

  • DOC: “pinned” → “developed”

  • PORT: Make Windows build work again due to changed debug
    infrastructure.

  • BUILD: Issue#819: CMake Policy CMP0115. Wouter Beek.

  • FIXED: same_functor/4 and derived predicates to be fully compatible
    with SICStus and handle zero-argument compounds.

  • ADDED: functor/4 to make dealing with zero-argument functors and
    atoms easier. This is a result of Issue#815

  • FIXED: library(prolog_colour): prevent pce_arg highlighting to
    cause a failure to highlight dict objects.

  • DEBUG: Early/better internal debug output Initialize the global
    debug_level as soon as possible if “-d” is passed first on the command
    line, to avoid missing early debug lines. Also, track use of the
    DEBUG() macro on a per-thread basis and use Serror as the default
    output stream when inside a DEBUG clause, so that statements that
    mix e.g. Sdprintf() and write_term() will get printed to a single
    output. Finally, prefix debug lines with the debug channel and the
    file/line source.

  • FIXED: Issue#815: same_functor/4 (and friends) to be more SICStus
    compatible.

  • ADDED: library(aggregate), library(between) and library(samsort)
    to SICStus 4 emulation.

  • ADDED: sublist/[3,4,5] to SICStus 4 library(lists) emulation.

  • ADDED: host_type Prolog flag to SICStus emulation.

  • ADDED: at_end_of_stream/[0,1] to SICStus emulation.

  • ENHANCED: SICStus emulation now disables quoted printing of atoms.

  • FIXED: vm_list/1 to handle clauses with breakpoints and list these.

  • ENHANCED: Multiple clauses may be registered at a specific source
    line. We need to consider all of them for set_breakpoint/4.

  • FIXED: Context module handling in a tail-recursive transparent
    predicate.

  • FIXED: $/1 for goals doing variable balancing using C_VAR_N

  • FIXED: Save det/1 flag in saved states and Qlf files.

  • FIXED: Propagate error when tabling traps an update to a dynamic
    predicate that is involved in a table reevaluation.

  • ENHANCED: Error message when using =>/2 as a goal. Boris Vassilev.

  • FIXED: Bug#810: Failed to re-initialize trailing of table operations
    in a nested transaction. Crashed. Eric Zinda.

  • ENHANCED: Handle $/1 as control structure for goal_expansion/2 such
    that var_property/2 is correct.

  • ENHANCED: lazy_list/2 to avoid duplicating the iterator closure.
    This allows for using a complicated closure and using destructive
    assignment in the closure to update the state.

  • FIXED: Decompilation (clause/2 and friends) for unifications moved
    into the head had several bugs, mainly related to optimized-away
    H_VOID before I_ENTER and friends. Reported by Edison Mera.

  • FIXED: H_LIST_FF translation for a unification against a list moved
    to the head.

  • FIXED: $/1: garbage collector crashes on GC inside the goal.

  • FIXED: Variable balancing, decompilation and error reporting of $(Goal)
    if Goal introduced new variables.

  • ADDED: IDE support for det/1: highlighting and checking that there
    are clauses.

  • ENHANCED: locale_create/3: allow an atom for the name.

  • DOC: det property for predicate_property/2.

  • FIXED: cb55f2c3da164d61c5f684482653bee1c31d51f3 for handling of -0.0.

  • ENHANCED: Issue#806: Also use SSU rules for the wrapper in max_member/2
    and max_list/2. David Tonhofer.

  • MODIFIED: Issue#808: The functions max/2 and min/2 now return the
    type used for the comparision when the two numbers are numerically
    equivalent. David Tonhofer.

  • FIXED: Allow changing :- predicates to => or back while reloading
    a file.

  • MODIFIED: Allow unifications in the guard of => rules to migrate to
    the head. This patch also adds documentation that answers questions
    on Discourse about the behaviour of the guard.

  • FIXED: Error reporting from $/1 crashed.

  • ENHANCED: Simplify !/0 if there is nothing to prune.

  • ADDED: $/1 to state that the argument goal must succeed
    deterministically.

  • FIXED: When re-evaluating a monotonic table falsecount propagation
    should not pass the node we are reevaluating. This was already the
    case for incomplete tables, blocking this propagation for incremental
    tabling.

  • FIXED: Detection of which choice-point references are captured in
    a continuation.

  • FIXED: Make cross referencer split head and guard in Head,Guard => Body rules.

  • FIXED: Positioning fixes and tests for ansi_format/3. Changes
    ansi_format/3 to format prepended and appended escape sequences
    separately while keeping line position information on the stream
    intact.

    Also adds tests for position information correctness and single nonlist
    arguments.

  • FIXED: Use safer shift_for_copy/1 to erroneous interaction with
    choicepoints in tabling.

  • ADDED: shift_for_copy/1 to deal with the rstrictions for shift that
    we need if we want to restart the continuation in a different context.

  • FIXED: clause_info/5 to avoid creating a cyclic term. due to wrongly
    recognised X → call(X) translation.

  • ENHANCED: Move unification to plain head arguments at the start of
    the body to unification in the head. Possible reuse of these
    arguments in the body reuse the head argument. This allows for
    clauses like below to exploit clause indexing while avoiding to
    copy the f() term. p(X) :- X = f(), q(X).

  • ADDED: $/0: Cut that claims determinism for the remainder of the
    predicate.

  • ADDED: det/1 declaration to declare a predicate deterministic and
    check this at runtime at the VM level.

  • REFACTOR: Move P_INCREMENTAL flag to tabling properties.

  • ENHANCED: Compilation of head => true to avoid calling true/0.

  • ENHANCED: Remove true guard for SSU unification.

  • FIXED: instance/2 to handle single sided unification rules.
    Abramo Bagnara.

  • FIXED: goal_expansion/2 on the guard for an SSU rule head, guard => body. Abramo Bagnara.

  • FIXED: Updated QLF version number as fix for => breaks loading old
    qlf files.

  • FIXED: Handle => rules in saved states and .qlf files. Abramo Bagnara.

  • FIXED: When updating a monotonic answer subsumptive tabled node we
    must remove old answers from the queues before removing these
    answers from the trie.

  • FIXED: GUI tracer could reset live variables in a stack trace,
    leading to different behaviour in trace mode.

  • FIXED: Recursive calls from C should reset the FR_INRESET flag
    as delimited continuations do not pass callbacks.

  • FIXED: goal_expansion/2 for => rules. Abramo Bagnara.

  • FIXED: Uninitilized tr_erased_no for clauses loaded from a QLF file
    or state.

  • FIXED: Transaction rollback from lazy monotonic tables did not properly
    delete new answers, leaving the trie in an inconsistent state.

  • DEBUG: Wrong assert() check when compiled for debugging.

  • FIXED: Provide new internal API for dealing with UTF-8 decoding
    that cannot peek after the given buffer when decoding UTF-8
    from a length-delimited string. The old code could read up to
    5 characters after the buffer on invalid UTF-8 input. Decoder
    provided by Abramo Bagnara.

  • FIXED: Processing lazy monotonic queued answers may queue new answers
    for this table, so can only mark it valid if all dependents are
    valid and no new answers are queued.

  • ENHANCED: update of falsecount after partial reevaluation of a
    lazy monotonic predicate can be accurate, possibly avoiding
    recomputation.

  • ADDED: CLP(FD): implement propagation for bitshifts This is a squash
    of 3 commits. Their commits messages are shown below

  • ENHANCED: clp/clpfd.pl propagate bitshifts

    Fixes issue #568

  • MODIFIED: clp/clpfd.pl pshift/4 propagation

    Shortened the nonvar(Y) case a bit

  • MODIFIED: CLP(FD): Fix pshift propagation bug

    Occurs when X =:= 0, in which case Y cannot be restricted, and when X
    =:= -1, in which case Y =< 0, but this is now handled in the last
    condition. These errors were caught in the test case mentioned in the
    previous commit message, but with Op = (X << Y #= Z)

  • ADDED: CLP(FD): implement div propagation Squash of 4 commits,
    their commit messages are shown below

  • MODIFIED: clp/clpfd.pl cis_div_/3 fix typo?

    s=//=div=

  • ENHANCED: clp/clpfd.pl propagation of pdiv/3

    Improve propagation basing code on ptzdiv/3’s propagation

  • MODIFIED: CLP(FD): Fix mistake in cis_div

    Effectively reverting the previous s=//=div=. Introduces cis_fdiv for
    floor division to compensate for this, although note that there div
    has slightly more failures (a few thousand) than // according to
    Triska’s test in commit 435209799b58ae01537c82baea6754f8e27a5c70. Also
    the inf,sup checks in cis_fdiv need to be checked.

  • FIXED: CLP(FD): Fix mistakes in div propagation

    by modifying domain_expand_more and domain_contract_less to consider
    the
    differences between div and //. I tried to use =.. to generate
    the
    expressions in domain_contract_less, but couldn’t, this should be a
    TODO. Additionally, if I noted correctly, the previous uses of
    cis_slash
    could have been replaced with the previous cis_div, and so I merged
    them
    to rename cis_fdiv to cis_div, to then be able to use cis_div for floor
    division and cis_slash for round-to-zero division, with the same
    sup,inf
    handling.

    Below is a test I used to check for downright mistakes in bounds, as
    resulting from div propagation errors before this commit, adapted
    from
    one of Triska’s tests. So this test should result in 0 errors.

    :- use_module(library(clpfd)).
    
    ineqs(L, U, V, Cs) :- phrase(ineqs(L,U,V), Cs).
    
    ineqs(L0, U, V) --> ineq_lower(L0, U, V, L), ineq_upper(L, U, V).
    
    ineq_lower(L, _, V, L) --> [V #>= L].
    ineq_lower(L0, U, V, L) --> { L0 #< U, L1 #= L0 + 1 },
    

ineq_lower(L1, U, V, L).

   ineq_upper(_, U, V) --> [V #=< U].
   ineq_upper(L, U0, V) --> { L #< U0, U #= U0 - 1 }, ineq_upper(L,

U, V).

   run :- Vs = [X,Y,Z], maplist(ineqs(-4,4), Vs, Cs),
    maplist(maplist(call), Cs), maplist(fd_dom, Vs, Doms),
    Op=(X div Y #= Z), findall(Vs, (label(Vs),call(Op)), Sols),
    call(Op), maplist(fd_inf, Vs, Infs), maplist(fd_sup, Vs,
    Sups), %findall(Vs, label(Vs), Sols), Tuple = [_,_,_],
    tuples_in([Tuple], Sols), maplist(fd_inf, Tuple, TInfs),
    maplist(fd_sup, Tuple, TSups), TInfs = [TXI,TYI,TZI], Infs
    = [XI,YI,ZI], TSups = [TXS,TYS,TZS], Sups = [XS,YS,ZS],
    ( XI=<TXI, YI=<TYI, ZI=<TZI -> true
	    %TZI == ZI -> true
	    %TInfs == Infs -> true
	    ; portray_clause(failed_lower_bounds(Doms,(maplist(in,
    Vs,Doms),Op),Infs,TInfs,Sols))
	    %;
    ((nonvar(X))->portray_clause(failed_lower_bounds(Doms,(maplist(in,
    Vs,Doms),X*Y#=Z),Infs,TInfs,Sols)) ;true)
	    %;
    ((nonvar(X);nonvar(Y);nonvar(Z))->portray_clause(failed_lower_bounds(Doms,(maplist(in,
    Vs,Doms),X*Y#=Z),Infs,TInfs,Sols)) ;true) ), ( %TSups ==
    Sups -> true
	     XS >= TXS, YS >= TYS, ZS >= TZS -> true %ZS
	    == TZS -> true %XS == TXS, YS == TYS -> true ;
	    portray_clause(failed_upper_bounds(Doms,(maplist(in,
	    Vs,Doms),Op),Sups,TSups,Sols)) %; ((nonvar(X))->
	    portray_clause(failed_upper_bounds(Doms,(maplist(in,
	    Vs,Doms),X*Y#=Z),Sups,TSups,Sols));true)
		    %; ((nonvar(Y);nonvar(X);nonvar(Z))->
    portray_clause(failed_upper_bounds(Doms,(maplist(in,
    Vs,Doms),X*Y#=Z),Sups,TSups,Sols));true) ), false.

Changing the body of run/0 to the following,

   run :- Vs = [X,Y,Z], maplist(ineqs(-4,4), Vs, Cs),
    maplist(maplist(call), Cs), maplist(fd_dom, Vs, Doms),
    Op=(X div Y #= Z), %findall(Vs, (label(Vs),call(Op)),
    Sols), call(Op), maplist(fd_inf, Vs, Infs), maplist(fd_sup,
    Vs, Sups), findall(Vs, label(Vs), Sols), Tuple = [_,_,_],
    tuples_in([Tuple], Sols), maplist(fd_inf, Tuple, TInfs),
    maplist(fd_sup, Tuple, TSups), TInfs = [TXI,TYI,TZI], Infs =
    [XI,YI,ZI], TSups = [TXS,TYS,TZS], Sups = [XS,YS,ZS], ( %
    XI=<TXI, YI=<TYI, ZI=<TZI -> true
	    %TZI == ZI -> true
	    TInfs == Infs -> true
	    ; portray_clause(failed_lower_bounds(Doms,(maplist(in,
    Vs,Doms),Op),Infs,TInfs,Sols))
	    %;
    ((nonvar(X))->portray_clause(failed_lower_bounds(Doms,(maplist(in,
    Vs,Doms),X*Y#=Z),Infs,TInfs,Sols)) ;true)
	    %;
    ((nonvar(X);nonvar(Y);nonvar(Z))->portray_clause(failed_lower_bounds(Doms,(maplist(in,
    Vs,Doms),X*Y#=Z),Infs,TInfs,Sols)) ;true) ), ( TSups ==
    Sups -> true
	    % XS >= TXS, YS >= TYS, ZS >= TZS -> true
	    %ZS == TZS -> true
	    %XS == TXS, YS == TYS -> true
	    ; portray_clause(failed_upper_bounds(Doms,(maplist(in,
    Vs,Doms),Op),Sups,TSups,Sols))
	    %; ((nonvar(X))->
		    portray_clause(failed_upper_bounds(Doms,(maplist(in,
		    Vs,Doms),X*Y#=Z),Sups,TSups,Sols));true)
		    %; ((nonvar(Y);nonvar(X);nonvar(Z))->
		    portray_clause(failed_upper_bounds(Doms,(maplist(in,
		    Vs,Doms),X*Y#=Z),Sups,TSups,Sols));true)
    ),
    false.

and running this for both div and // gives the following count of
bound errors respectively, 42939 and 42765.

  • FIXED: Re-evaluation of lazy monotonic tables with cyclic dependencies
    could result in non-termination after
    e13b73087dcd64e252430bb19f36e37681f7e8a1

  • ENHANCED: Use efficient list_to_set/2 internally.

  • ENHANCE: prune valid nodes from the re-evaluation graph.

  • FIXED: transaction rollback of a new lazy monotonic answer must
    remove the deleted answer node from the
    affected queues.

  • FIXED: Lazy monotonic reevaluation with not equal length falsepaths.

  • FIXED: tabled re-evaluation path minimization (mainly avoids some
    redundant memory usage and computations).

  • ENHANCED: trace/1,2: show calling thread if not main

  • FIXED: Need to enable capturing dependencies when processing lazy
    monotonic answers.

  • ENHANCED: library(portray_text): updated docs, added set_portray_text/3
    to get current settings and added to main
    documentation.

  • FIXED: abolish_all_tables/0 inside a transaction (more generally,
    abolishing tables inside a transaction).

  • FIXED: Predicates using trie_gen_raw() did not properly handle cuts.

  • FIXED: ‘$idg_mono_empty_queue’/2 should only empty the
    dependency that we just processed (now
    ‘$idg_mono_empty_queue’/1).

  • FIXED: Issue#791: compiling calls to dynamically creating
    calls that exceed the maximum
    procedure arity. Exception changed to
    representation_error(max_procedure_arity)
    (was max_arity). Added Prolog flag
    max_procedure_arity.

  • FIXED: transaction_updates/1: avoid reporting compiled trie
    clauses. Tabling consistency must be managed
    elsewhere.

  • DOC: transaction_updates/1: erased clauses are flagged erased(Ref)
    rather than erase(Ref).

  • ENHANCED: Save --no-signals state into a saved state.

  • DOC: csv_read_file_row/3: to be done note was outdated. Boris
    Vassilev.

  • FIXED: After lazy reevaluation of table using answer subsumption we
    should not queue a possibly deleted answer
    and we must delete pruned trie nodes from
    the lazy queues to affected nodes.

  • FIXED: Issue#785: Crash when creating too many “predicate references”
    as created by e.g. clause/2 and retract/1.

  • FIXED: Path canonisation for relative directories with sequences of
    “…/”. Makes read_link/3 fail on links to
    ../../file. Nicos Angelopoulos.

  • ADDED: attach_pack/2. Suggested by Falco Nogatz.

  • PORT: Make compile using MinGW 10: include new libssp*.dll runtime
    dll in distribution.

  • PORT: Windows: use __declspec(dllexport) extern type.
    Abramo Bagnara.

  • FIXED: propagate changing lazy monotonic into incremental tabling.

  • FIXED: Only clear falsecount if the table is eager.

  • FIXED: False count update after lazy evaluation of monontonic
    dependencies does not need to decrement
    the falsecount to zero. Instead we need
    to decrement after we processed all answers
    from an dependency edge.

  • MODIFIED: Use SSU rules for some of the library(lists) predicates:
    max_member/2, min_member/2, sum_list/2,
    max_list/2, min_list/2, intersection/3,
    union/3, subset/2 and subtract/3. This causes
    errors if the input arguments are non-lists
    or insufficiently instantiated.

  • ADDED: Single sided unification with commit clauses using =>.

  • DOC: get_prolog_backtrace/3: wrong doc for options.

  • DOC: Fixed “Predicate behaviour and determinism” table. Jan Burse.

  • FIXED: If we normal incremental re-evaluation considers a monotonic
    table valid again we must clear force_reeval
    to avoid a second re-evaluation.

  • CLEANUP: Move implementations from deprecated library(oset) to
    library(ordsets) and make library(oset)
    a thin wrapper.

  • DOC: del_vertices/3 wrong argument order. Moved LaTeX docs completely
    to PlDoc for this library. Nicos Angelopoulos

  • FIXED: We should not decrement the falsecount on incomplete tables that
    are created while reevaluating incremental
    tables.

  • FIXED: reevaluation completion may be in a merged SCC. In that
    case we must be careful not to propagate
    falsecount through re-evaluating nodes by
    setting the reevaluating status to FALSE
    after completing all reevaluated tables.

  • MODIFIED: extend_goal/3 from library(prolog_code) to return the goal
    using call/N in case the callable to extend
    is insufficiently instantiated.

  • TEST: Fixed user defined arithmetic tests. Rick Workman.

  • ADDED: More statistics/2 keys to SICStus emulation, especially ones
    introduced in SICStus 4 and later.

  • ADDED: library(sockets) to SICStus 4 emulation. The server
    socket-related predicates are not emulated yet.

  • ADDED: Prolog flag max_char_code and updated docs wrt. A is "a".

  • FIXED: Issue#772: tmp_file/2 not to generate the same name in two
    threads.

  • ADDED: Partial library(sets) to SICStus 4 emulation.

  • ADDED: ordsets:ord_member/2 to SICStus emulation.

  • ADDED: More library(lists) predicates to SICStus emulation
    remove_dups/2, rev/2, same_length/3, shorter_list/2,
    append_length/[3,4], [proper_]prefix_length/3,
    [proper_]suffix_length/3, cons/3, last/3, head/2, tail/2,
    [proper_]prefix/2, [proper_]suffix/2

  • FIXED: Possible crash in PL_get_dict_ex() if the dict data contains
    a duplicate key.

  • ADDED: win_module_file_names/1 to enumerate the Windows DLLs used by
    the process.

  • FIXED: Make lazy monotonic tabling using answer subsumption avoid
    fully invalidating indirect dependencies and keep using the lazy
    monotonic reevaluation.

  • FIXED: Lazy monotonic predicate depending on two nodes may fail to
    be updated if the first node has no new answers.

  • FIXED: Various small issues that allow using []/N (notably []/3)
    as a predicate. After report by Rick Workman.

  • ADDED: Undocumented way to define new functions. Experimental.

  • FIXED: Like monotonic dynamic predicates, avoid monotonic tabled
    predicates to shift a dependency if there is no innermost monotonic
    tabled predicate.

  • FIXED: A monotonic table that was invalidated twice including a
    retract could be re-evaluated twice, first as normal incremental
    predicate and later as monotonic predicate. This could re-validate
    an affected node twice.

  • FIXED: Nest re-evaluation of an invalidated monotonic table (lazy or
    due to a retract).

  • ENHANCED: Speedup generation of false paths for incremental tabling
    by only reporting one edge to a dynamic or complete node of the IDG
    and merge fetching the edge and getting the status.

  • DOC: Deprecate current_stream/3. Patch by David Tonhofer.

  • DOC: sub_string/5: clarify type handling on input and output.

  • DOC: Unified descriptions of sub_atom/5 and sub_string/5

  • DOC: Removed erroneous markup

  • DOC: Reviewed length/2 description

  • DOC: Remove reference to -L, -G and -T options.

  • FIXED: Issue#767: print_term/2 for printing zero-argument compounds.
    Wouter Beek.

  • FIXED: current_table/2 for shared tables.

  • FIXED: Possible crash when creating a dict from a list if the list
    contains an invalid key.

  • FIXED: Issue#766: debug portray for continuations in boot/tabling.pl
    prevents printing zero-arity compounds. Wouter Beek.

  • MODIFIED: Renamed mapterm/3 into mapargs/3 after discussion on
    Discourse.

  • ADDED: Allow monotonic tables to depend on incremental dynamic
    predicates. As a result, a change to an incremental dependent
    invalidates the monotonic table.

  • ENHANCED: A dynamic monotonic predicate should only try to capture
    the continuation if the inner dependency is monotonically tabled.

  • FIXED: Issue#763: Attempt to create cycle import module dependency
    exception was not handled correctly. Reported by David Tonhofer.

  • FIXED: thread_wait/2 handling of the timeout option.

  • FIXED: incr_is_invalid/1 from library(dialect/xsb/increval) to
    enumerate instances of the arguments that have invalidated tables.

  • ADDED: sumlist/2, transpose/2, partition/5, clumped/2 to SICStus 4
    library(lists) emulation.

  • ADDED: nonmember/2 to SICStus 4 emulation.

  • ADDED: [is_]mutable/1 to SICStus 3 and 4 emulation.

  • ADDED: More SICStus 4 library(terms) predicates, from SWI
    library(occurs).

  • FIXED: Windows swipl-win.exe console: check input messages before
    handling output such that e.g., Control-C works when the output
    is flooded.

  • MODIFIED: Allow processing interrupts in Windows when in critical
    state.

  • FIXED: Possible deadlock when passing Control-C from swipl-win.exe.

  • FIXED: possible race in swipl-win.exe output handling.

  • FIXED: sleep/1: interrupt processing for Windows.

  • MODIFIED: Run compilation of a file in signal atomic mode to avoid
    partial loads of a source file. Double Control-C allows (dangerous)
    abort of the load.

  • MODIFIED: Pass sigint on even when in critical mode. Allows for
    double Control-C to break out of blocked operations.

  • FIXED: detection that we are currently loading a library needed for
    autoloading, so we need to block.

  • COMPAT: clumped/4 in SICStus does not first sort the list, i.e.,
    it implements run length encoding rather than frequency counting.

  • DOC: Added library(terms) to the main documentation.

  • ADDED: library(terms): same_functor/2-4, mapterm/3

  • FIXED: Issue#758: unify_with_occurs_check/2: possible false success
    when attributed variables are involved. Possibly may also involve
    cases where no attributed variables are involved. Reported by
    Jan Burse.

  • CLEANUP: Issue#128: silence maybeUnregisterDirtyDefinition() message
    for release build. Fabrizio Riguzzi.

  • ADDED: clumped/2 to library(lists).

  • ADDED: sub_term_shared_variables/3 to library(occurs).

  • BUILD: Issue#704: skip building the HTML docs if some dependency
    is missing.

  • FIXED: absolute_file_name/3 regressing for creating config
    directories. Resulted in pack install issues reported by Nicholas
    Hubbard.

  • ENHANCED: cannot_create_dir message if there are no candidates.

  • FIXED: Possible crash of the debugger on the call port. We need
    to set PC to the new predicate before the trace callback or
    clearUninitialisedVars() may reset wrong variables.

  • ENHANCED: absolute_file_name/3: do not create XDG directories unless
    the requested access is write or append.

  • FIXED: Properly detect change after lazy update of a monotonic table.

  • FIXED: Issue#751: call_with_depth_limit/3 with limit -1. David
    Tonhofer. This patch also cleans up mixed types for handling the
    limit and possible limit overflows.

  • ADDED: Support answer subsumption together with incremental and
    monotonic tabling.

  • FIXED: Make current_table/2 work for answer subsumption.

  • FIXED: Issue#747: Windows: expand_file_name/2 Unicode issues.

  • ADDED: Pass additional tabling options for answer subsumption.

  • ADDED: Initial SICStus 4 emulation (expects_dialect(sicstus4)).
    This is separate from the existing SICStus emulation
    (expects_dialect(sicstus)), which emulates almost only SICStus 3
    features. The few SICStus 4-only features that were emulated by the
    sicstus dialect have been moved to the sicstus4 dialect.

    SICStus 3 and 4 are incompatible enough in some aspects that they
    cannot
    be emulated properly as a single dialect. See this discussion:
    Expects_dialect(sicstus): how to handle SICStus 3 vs. 4 API conflicts

    The SICStus 4 emulation currently supports all of library(system) and
    library(timeout), parts of library(lists) and library(terms), and a few
    builtins. library(sockets) is not emulated yet, because its API has
    changed completely between SICStus 3 and 4. library(arrays) has been
    removed entirely in SICStus 4, so it is not emulated by the sicstus4
    dialect.

  • FIXED: SICStus library(lists) emulation now only re-exports predicates
    that exist on SICStus. This fixes name conflicts when code written
    for SICStus imports all of library(lists) and then defines its own
    predicate with a name that isn’t used in SICStus library(lists)
    but is used on SWI, for example flatten/2.

  • ADDED: nth/4, is_list/1, memberchk/2 to SICStus library(lists)
    emulation.

  • FIXED: expects_dialect/1: always load SWI-Prolog library modules in
    swi dialect.

  • FIXED: Issue#742: expects_dialect/1: switch emulated_dialect flag
    after loading the dialect specific library.

  • FIXED: Issue#742: file resolution may be based on the current
    dialect. This patch includes the dialect in the caches.

  • DOC: document use of call/N explicitly

  • FIXED: We cannot catch a delimited continuation through a
    findall/3. Raise an error and give better messages for attempts to
    table this way.

  • DOC: Fixed a typo, added commas and needed spaces.

  • DOC: Fixed a type, added commas and needed spaces.

  • FIXED: Item#740: cleanup of removed subsumed answers may cause
    wrong enumeration of tabling worklists as well as use-after-free
    (and thus crashes). Reported by Damiano Azzolini.

  • FIXED: is_git_directory/1 for submodules.

  • FIXED: Reloading library(git) due to operator conflict.

  • FIXED: is_git_directory/1 for submodules.

  • ENHANCED: Detection of Emacs inferior mode. Now sets up tty on
    Windows as we have no way to detect.

  • FIXED: library(simplex): calling wrong predicate.

  • DOC: Reviewed Section 5 (extensions) except “Dicts”

  • FIXED: Possible race condition in retract/1 generation management.
    This patch ensures that when a clause is considered visible in some
    thread based on GD->_generation, this remains to be the case.
    Before, the global generation may be updated before the clause
    generation is updated, which may trigger a thread to consider the
    clause visible while it is no longer.

    Finally diagnosed by Keri Harris.

  • DOC: Issue#735: PL_put_term(). Michael Duggan.

  • FIXED: untable/1 to remove table attributes such as incremental,
    monotonic, etc.

  • ADDED: Lazy monotonic tabling. Still working on test cases.

  • FIXED: atomic_list_concat/3: possible double free, corrupting memory.

  • ADDED: op declarations for mode, do, spy, nospy to SICStus emulation.

  • ENHANCED: use_module/2 with SICStus emulation imports all operators.
    Fixes part of #731.

  • FIXED: SICStus emulation breaking op declarations in standard modules.
    As a side effect, the goal expansion no longer rewrites op declarations
    in library(dialect/sicstus), so they now have to be manually declared
    in the user module.

    Fixes part of #731.

  • DOC: library(apply), added test cases for foldl

  • FIXED: Issue#722: premature reclaim of a clause reference in retract/1.

  • DOC: Fix typos

  • FIXED: Possible crash in B_UNIFY_FC on a global stack overflow.

  • FIXED: Make library(prolog_codewalk) work with name() predicate
    heads.

  • MODIFIED: Delay to start handling SIGINT (Control-C) to when the
    toplevel is started. Added Prolog flag debug_on_interrupt and command
    line option --debug-on-interrupt. @swi on Discourse.

  • FIXED: Do not set a Prolog flag if the hook dealing with the side
    effect fails.

  • ADDED: Dict function get(KeyPath, Default). Suggested by Esad
    Hajdarevic.

  • ADDED: Dict.get(Key) now allows for a key path, e.g.,
    Dict.get(a/b). Suggested by Esad Hajdarevic.

  • ENHANCED: halt if we tried to handle exit from a thread twice.

  • DOC: Fixed link to paper in extensions; bibliography rebuild

  • ADDED: library(sandbox): declare nonground/2 as safe.

  • DOC: Avoid duplicate section label.

  • FIXED: Consistent answer count admin for answer subsumptive
    tabling. Resulted in “OOPS: trie_property/2: counted %zd values, admin
    says %zd\n” messages.

  • ENHANCED: library(aggregate) to hide internal details from the
    debugger. Suggested by Peter Ludemann.

  • ADDED: body_term_calls/2 to library(prolog_code).

  • DOC: Slight touches to the documentation.

  • FIXED: Handling of the Prolog flag compile_meta_arguments.

  • ADDED: prolog_listen/3: allow naming an event callback using a
    name(Name) option. Registering a callback on the same channel with the
    same name updates the associated goal rather than adding a new one.

  • FIXED: Save/restore whether we are in monotonic answer propagation
    when doing a save/restore of the tabling status.

  • FIXED: retract((m:head :- Body)) failed.

  • DOC: Document updating the Docker library.

  • FIXED: Issue#714: transaction semantics on some platforms due to
    missing volatile declaration.

  • FIXED: Typo in MemoryBarrier() based sync macros.

  • DOC: Reformat textdebugger.md Surround example predicate indicators
    (/) with double backticks (``) to prevent auto linking.

  • DOC: Fix typos

  • ADDED: Track events on answer tries using prolog_listen/2,3

  • FIXED: Error handling in sending predicate events.

  • ENHANCED: Allow listening on a predicate before it is defined.

  • DOC: Fix priority of | operator. Spotted by Falco Nogatz.

  • FIXED: protect dynamic clauses in continuations. This patch solves
    the same problem as cca23badcbfb2dad7089696348aae56e50b84a3c, but also
    protects the clause itself during the execution of the continuation.

  • FIXED: Issue#706: call_continuation/1: environment clause reference
    cannot be from the blob in the continuation as this may be reclaimed
    in AGC. May cause a crash while getting a backtrace from restarted
    continuation. GC also uses the clause info, so this can probably
    crash as well. Reported by David Tonhofer.

  • PORT: Set MACOSX_DEPLOYMENT_TARGET for building the MacOS dependencies.

  • DOC: Corrext examples for rational numbers to use lowercase “r”
    instead of formerly discussed “R”

  • BUILD: Handle Markdown core documentation components that do not
    include Prolog files.

  • DOC: spy/2 does not exist.

  • DOC: Reformatting textdebugger.md, use [@cite] and fix some code
    annotations to use ``.

  • DOC: CHR section names to include CHR to make them easier to find
    and reduce ambiguity in search results.

  • DOC: Rewrote “Overview of the Debugger” I extended the text/command
    line debugger overview to add more detail and examples for newer users.
    It is pretty much a rewrite, but I reused some of the text from
    the original.

    The feedback threads on discourse for it are here:
    Learning how to use the Prolog Command Line Debugger? Try this new overview!
    and here:
    Feedback please on proposed update to Tutorials/Beginner/Debugger.

    I wrote it as a markdown file in attempt to avoid
    learning latex :-). Seemed to work pretty well (writeup here:
    Using markdown with pldoc to generate manual content - #2 by jan),
    but required using the latext \input command to get the input into the
    master overview.doc and and update to CMakeLists.txt to build.

    I confirmed that the HTML builds and looks right.

  • ADDED: transaction/2: option bulk(Boolean)

  • ADDED: transaction/2, providing additional options to transactions.

  • MODIFIED: When using use_module/1,2 and friends on a non-module
    file the error has changed from domain_error(module_file, File)
    to domain_error(module_header, FirstTerm) to simplify debugging.
    Notably this error can be the result of term_expansion/2 that rewrites
    begin_of_file or the module header to something that is not a module
    header.

  • FIXED: Do not use sandboxing during autoloading. Note that the
    autoload directive is not permitted in sandboxed code, so users cannot
    load untrusted code using autoload/1,2.

  • FIXED: debugger could reset wrong variable when debugging a redo
    action. May lead to incorrect behaviour in debug mode.

  • ENHANCED: xterm interactor font selection and size specification.

  • FIXED: set_prolog_flag/2: propagate errors from switching debug mode
    using the debug flag.

  • ADDED: PL_put_term_from_chars(): flag CVT_EXCEPTION to raise an
    exception on a failure rather than returning the exception term.

  • ENHANCED: PL_get_nchars(): immediately write to a UTF-8 string if
    REP_UTF8 is specified. This used to first write ISO Latin 1, then
    wchar and finally transfer to UTF-8 for terms that cannot be represented
    as ISO Latin 1.

  • FIXED: PL_get_nchars(): avoid pending exception in write conversion
    if the term cannot be represented as ISO Latin 1.

  • FIXED: XDG path handling for common_config. common_data
    returned both the common data and config paths, while common config had
    no locations.

  • FIXED: incremental tabling with answer subsumption call to start
    reevaluation.

  • ADDED: Started to deal with the relation between transactions and
    tabling. Currently deals with rolling back answers from monotonic
    tabling.

  • FIXED: arg/3 when compiled as B_ARG_VF did not correctly use the slow
    route if the argument is unbound. Edison Mera.

  • TEST: wrong format/3 usage causing a failure unrelated to the test.

  • TEST: Relax XSB tabling test abol_test3b.P as reclaiming the tables
    is not guaranteed.

  • FIXED: Possible race in shared table handling. Leads to “Oops,
    worklist trie doesn’t point back at me!” messages.

  • FIXED: PL_get_chars() and friends handling of CVT_WRITEQ. This is
    (among others) used as fallback serialization in the C++ interface.

  • TEST: Test file for destroying local definitions.

  • FIXED: Race between destroying thread-local definitions and clause
    garbage collection. With Matt Lilley.

  • FIXED: Thread-local definitions corrupted the argument declaration.
    Matt Lilley.

  • DOC: debug/0 does not affect trace points.

  • FIXED: Issue#702: call_with_inference_limit/3 determinism when the
    inference limit is exceeded. David Tonhofer.

  • ADDED: Deal with global predicates if the current file is not a module
    file. This provides coloring and meta-predicate handling for other
    predicates in a non-modular program. Unfortunately this still lacks
    whether or not predicates are called from other global predicates.

  • ENHANCED: Use global meta-predicate properties.

  • DOC: reset/3: document interaction between delimited continuations
    and choicepoints.

  • FIXED: Save/restore tabling status over break/0.

  • FIXED: Dependency of incremental tables on monotonic tables.

  • FIXED: Possible assertion failure in WFS handling for tabling on
    32-bit hardware. Lev Lamberov.

  • ADDED: Predicate property monotonic.

  • FIXED: atomic_list_concat/2,3 and atomics_to_string/2,3: wrong
    exception on atomic_list_concat([a,b|c], X) and posssible memory leak
    on errors (non-atomic data, cyclic list).

  • MODIFIED: PL_get_nchars() and friends. Due to some typo CVT_WRITE
    and CVT_WRITE_CANONICAL were the same constant. Also CVT_WRITEQ
    conflicted with CVT_VARIABLE. These constants have been renumbered
    to ensure consistent behaviour as documented.

  • FIXED: an opaque tabled predicate may depend on incremental and
    monotonic predicates without raising an error.

  • ADDED: introduce opaque as explicit attribute for dynamic and
    tabled predicates. An opaque table may depend on incremental and
    monotonic predicates without raising an error.

  • PPA: Support Ubuntu 20.10 (groovy) and reduce the places where the
    known distros are listed to one.

  • CLEANUP: Cleanly exit when running out of memory on pushSegStack().

  • FIXED: Issue#698: format/3 using “~1r”. David Tonhofer.

  • 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.

  • FIXED: Restore tries when re-evaluation is abandoned due to an
    exception. Cory Cohen.

  • ENHANCED: Issue#685: must_be/2: verify existence of the type before
    raising an error. David Tonhofer.

  • FIXED: format_predicate/2: prints alarming messages when the letter
    is already defined. Matt Lilley.

  • FIXED: Crash when creating a dict from an invalid key.

  • ADDED: library(redis).

  • ADDED: submodule packages/redis

  • FIXED: library(prolog_xref): handle included data if data is coming
    from a stream for which the encoding is fixed.

  • FIXED: When overruling an implicit import to define a predicate locally
    (e.g., dynamic), we should not use the thread-localised definition.

  • FIXED: race condition between thread_local/1 and accessing the
    predicate structure. Vincent Koeman.

  • FIXED: write/1 portraying attributes for freeze/2 . Rick Workman.

  • FIXED: make library(ansi_term) load in --traditional mode. Falco
    Notgatz.

  • ENHANCED: library(strings): added indent_lines/3 and test cases for
    indent_lines, dedent_lines/3 derived from Python.

  • ADDED: library(strings).

  • TEST: Issue#675: avoid duplicate coroutining test unit. David
    Tonhofer.

  • FIXED: Declarations such as dynamic/1 to enforce the argument to
    be predicate indicators. Before that, a head was accepted which
    causes these predicates to succeed silently when the arity is omitted,
    working on name/0.

  • CLEANUP: Replace complex macros in the parser by functions. Also added
    a maintenance debug topic for operator parsing.

  • PORT: Only use __declspec for MSVC and MinGW. Also Cygwin now uses
    traditional extern.

  • PORT: Issue#668: compilation on Cygwin for thread_affinity/3.

  • FIXED: function roundtoward/2 with variable direction was miscompiled,
    causing a crash. Rick Workman.

  • ENHANCED: library(portray_text): use appropriate quote (` or "),
    escape the quote inside a string and added portray_text:is_text_code/1
    to allow the user to extend the codes that are considered likely
    text codes.

  • DEBUG: invalid internal debug message, crashing in full trace mode.

  • FIXED: meta-calling a wrapped thread-local predicate ignored the
    wrapper.

  • MODIFIED: Issue#665: Added read_term_with_history/2 and moved
    read_history to library(backcomp). read_term_with_history/2 provides
    access to all the read_term/2 options, notably the syntax changing
    options. After discussion with Robert van Engelen.

  • MODIFIED: qsave_program/2: preserve the autoload flag in the calling
    process and preserve autoloading if it is enabled and the save class is
    development

  • ENHANCED: frozen/2 to avoid copying. This not only enhances
    performance, but also maintains the variable identity.

  • FIXED: Possible crash in tabling, notably occurring on MacOS due
    to wrong assumptions wrt representing pointers in Prolog integers.
    With a lot of help from Matt Lilley.

  • FIXED: frozen/2 could fail after recent enhancements.

  • FIXED: Handle failure inside ‘fast’ opcodes which D_BREAK replaces
    with ‘slow’ opcodes that do not trigger FASTCOND_FAILED. To do this,
    if we hit D_BREAK and there is a fast condition pending, convert it
    into a real choicepoint

  • FIXED: Issue#657: Debug flags such as print_write_options in a
    saved state were overruled by the initialization. Robert van Engelen.

  • DOC: Issue#658: read_history/6 wrong info for substituting the
    event. Robert van Engelen.

  • ENHANCED: Compile simple arg/3 calls to the VM

  • ENHANCED: Allow listing and source level debugger to work for clauses
    the contain non-atom blobs.

  • MODIFIED: numbervars/4 using the singletons(true) option to
    number variables in LR order rather than in the order where the
    second occurrence is found. This notably makes the output of
    portray_clause/1-3 easier to read.

  • MODIFIED: frozen/2 now reports any goal that is delayed on some
    variable inside the first argument rather than only goals delayed
    due to freeze/2 and only checking for a direct variable.

  • MODIFIED: portray_clause/1,2,3: portray (a,b),c the same as
    a,(b,c). This is compatible with SICStus and makes sense as the
    compiler also compiles both shapes to the same code.

  • FIXED: Issue#652: expand_file_name/2 for Windows: double UTF-8
    encoding.

  • PPA: Removed eoan from PPA list

  • FIXED: Possibly crash in wrap_predicate/4. With help from Peter
    Ludemann.

  • FIXED: re-enable inline unification after switching off debug mode.
    Rick Workmann.

  • ENHANCED: Proper Last Call Optimization (LCO) for a subset of the
    calls: last calls for which each argument is a variable (with some
    restrictions), a small integer or atom.

  • MODIFIED: Extensive rewrite to avoid variable references inside
    and between environments, i.e., reference pointers always point
    at or inside the global stack. This is a necessary step for LCO.
    The only visible change is PL_put_term(to, from) which used to be a
    void function but which may now need to allocate a variable on the
    global stack when two fresh term references are unified. As a result
    PL_put_term() may fail.

  • ADDED: library(sandbox): support load_files/2 with safe options.

  • FIXED: SICStus emulation: avoid mapping use_module/1,2 unconditionally.

  • FIXED: is/2 using optimised arithmetic with a float value while the
    left side is instantiated to a float can exit Prolog (unintended
    return).

  • FIXED: load_file/2: if(changed) option for loading a non-module file
    was ignored, always loading the file.

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

  • FIXED: supporting wide file names in qlf files

  • ENHANCED: ignore tty stream errors when there is no active terminal

  • ADDED: set_system_IO/3 to bind stdin/stdout/stderr to Prolog streams

  • FIXED: compile_predicates/1: wrong handling of module qualification
    causes compile_predicates(Module:List) to fail.

  • COMPAT: Export memberchk/2 from library(lists).

  • FIXED: Make sure the xpce boot files are handled as library files
    and not as user files to avoid xpce failing to load when the user
    defines global conflicting operators.

  • FIXED: Encoding for command line options passed through
    ‘$cmd_option_val’/2. Reported by UweR on Discourse.

  • PORT: Support Unicode wmain() for Windows. This adds PL_winitialise().

  • FIXED: copy_stream_data/2: ensure exceptions are passed.

  • DOC: consistency of docs for forall/2 and concurrent_forall/2.

  • DOC: Clarifications, fix section levels.

  • DOC: Fix typos in manual

  • FIXED: Issue#646: using {} as postfix operator can cause the output
    to be confused with a dict. Jan Burse.

  • FIXED: Handle Unicode file names in QLF files and saved states
    on Windows.

  • FIXED: Do not save the Prolog flag file_name_case_handling.

  • FIXED: listing/1: when used with a partly instantiated head to list
    a subset of the clauses, do not unify the clause head but only test
    it is unifyable.

  • ENHANCED: foreach/2: better performance and avoid copying goal.

  • DOC: Fix typos in manual

  • FIXED: HTML text renderer to add a blank line between the first and
    second par of a list element.

  • FIXED: ht_get/3 on an empty hash table.

  • DOC: functor/3: avoid confusing example.

  • BUILD: Fixed installation. Nicos Angelopoulos

  • FIXED: make_library_index/1 tested whether . was changed rather
    than the target directory.

  • BUILD: Always the library index commands. Prolog checks the
    dependencies anyway.

  • TEST: Autoload

  • FIXED: Allow importing a predicate using autoload/2 while it is defined
    in user and make sure the imported predicate actually gets used.

  • FIXED: Autoloading picked predicates from the module user. Test case
    by Eric Tauber.

  • DOC: Format each summary to have its own line

  • DOC: Fix typos in manual

  • FIXED: Issue#639: system code depended on library, preventing disabling
    autoloading. James Cash.

  • DOC: get_dict_ex/3 does not exist. Removed the docs. David Tonhofer.

  • ENHANCED: list_debug_topics/0: use quoted print and numbervars to
    list the topic more precisely. David Tonhofer.

  • FIXED: Actually allow hashtables to have non-ground keys by using
    variant_hash/2 instead of term_hash/2.

  • DOC: Explain working directory issues for loading likes.pl.

  • FIXED: Issue#637 (following Discourse message): functional notation
    expansion in ^-meta arguments (bagof/3, setof/3, etc.).

  • ADDED: library(hashtable): mutable and backtrackable hash table
    in Prolog.

  • ADDED: library(error), type pair to denote a Key-Value pair.

  • ADDED: Generate events on a transaction rollback. This also fixes
    consistency for private incremental tables under transactions.

  • PORT: 32-bit platform without 64-bit atomic operations.

  • FIXED: Single threaded build.

  • ADDED: Support file IRI scheme

  • DOC: Clarify transaction/3 and clause ordering inside transactions.

  • FIXED: Generation synchronization wrt transaction constraints.

  • FIXED: Generation management of assert/retract

  • FIXED: Possibly crash while enumerating table answers (missing stack
    space check and expansion).

  • FIXED: An asserted term may be visible in arbitrary generations for
    a short time.

  • FIXED: Clauses asserted in a transaction could become briefly visible
    outside.

  • FIXED: Avoid inconsistent L_PREDICATE and L_GENERATION locking
    (deadlock).

  • FIXED: Assert+retract inside a transaction may cause a clause to
    become visible again.

  • ENHANCED: transaction_updates/2: distinguish asserta and assertz.

  • TEST: Test transaction constraints.

  • FIXED: Added option/2 dependency for library(thread).

  • ADDED: transaction/3

  • FIXED: Added missing predicate_options/3 declarations for
    concurrent_forall/3 and concurrent_and/3.

  • FIXED: Proper commit generation

  • ADDED: transaction_updates/1 to get access to pending updates in
    a transaction.

  • FIXED: retract/1 in nested transaction for clauses added by an outer
    transaction.

  • DOC: Mostly changes to atom_codes/2 et al.

  • ENHANCED: Avoid remembering clauses that are asserted and retracted
    in the same transaction.

  • ADDED: current_transaction/1 to test whether a goal is running inside
    a transaction.

  • FIXED: transaction nesting

  • ENHANCED: Make reconsult predicate updates truly atomic.

  • FIXED: Use L_GENERATION lock for removeClausesPredicate() to make
    this truly atomic.

  • FIXED: propagate I/O exceptions or signalled exceptions
    from discarding an unbuffered stream temporary buffer.
    Report

  • ADDED: Transaction isolation support. See transaction/1 and
    snapshot/1. Experimental. Use ?- help(transactions). for help.

  • CLEANUP: Generation management

  • FIXED: Single threaded build.

  • ENHANCED: concurrent_and/2,3: limit size of answer queue. Jan Burse.

  • DOC: Reviewed chapter on “exceptions”

  • ADDED: concurrent_and/2,3 based on Jan Burse’s balance/1.

  • DOC: library(persistency).

  • FIXED: Provide elementary thread-safety. Jan Burse.

  • TEST: Added SKIP_SSL_TESTS option to CMake config.

  • ADDED: concurrent_forall/2,3: as forall, running tests in parallel.

  • ENHANCED: thread_signal/1: avoid a max 0.25 sec wait if the signalled
    thread is blocked on a message queue.

  • PORT: Allow pthread_cond_timedwait() to return EINTR.

  • ENHANCED: copy_term/3 to sort the attvars prior to generating
    the goals. This produces constraints at the toplevel in more
    predictable order. Rick Workman.

  • CLEANUP: Term names set to those of ISO Standard

  • DOC: Updated “exception term” page with ISO info

  • DOC: Fix typos in manual

  • DOC: Remove outdated status in manual Shared table space limit was
    added in commit 6a01fbf70447b419447281826e770ec0cd21ab3d

  • ENHANCED: Issue#625: library(settings): only save when modified and
    document persistency issues.

  • FIXED: Consider files loaded from a state already loaded.

  • FIXED: Allow for saved states of more than 4Gb.

  • DOC: add missing documentation for native zip handling predicates.

  • MODIFIED: Renamed thread_wait_on_goal/2 into thread_wait/2 and added
    thread_update/2.

  • ENHANCED: save_settings/1 to use setup_call_cleanup/3 to guarantee
    reclaiming resources.

  • FIXED: Recursive autoloading when a saved state loads an additional
    file that sets the Prolog flag autoload to false. Peter Ludemann.

  • MODIFIED: thread_wait_on_goal/2: make it per-module rather than global
    over the database.

  • ADDED: thread_wait_on_goal/2 to wait for database changes.
    This predicate is similar to its Qu-Prolog cousin.

  • MODIFIED: Option processing now raises a type_error(option, Option)
    if an option is malformed (not Name(Value) neither Name = Value).

  • DOC: Fix typos in manual

  • PPA: Removed support for Ubuntu disco (19.10).

  • FIXED: library(prolog_codewalk): handle file/4 message terms.
    Matt Lilley.

  • FIXED: Location of jpl.jar in development tree to be able to run in
    the dev tree.

  • PORT: Windows: make condition variable abstraction compile again.

  • ADDED: Foreign API to reuse the internal lock-free hash table
    implementation.

  • DOC: Removed obsolete section on Boehm-GC support.

  • FIXED: Make module enumeration safe for temporary modules. This
    affects notably current_predicate/1 in SWISH. current_predicate/1
    using an unbound module now skips enumeration of temporary modules.

  • FIXED: Possible race condition when two threads try to compile the
    same file.

  • FIXED: Possible inconsistent source file reference count.

  • CLEANUP: No longer create a source file object for a derived source.
    This doesn’t seem to be used anywhere and the new garbage collecting
    approach for source files would reclaim the file immediately anyway.

  • FIXED: Make source file admin use reference counts and delete no
    longer needed source file admin entries. Discarding them is needed by
    Pengines. The hard-coded discard from ‘$destroy_module’/1 could cause
    a use-after-free issue in SWISH when using :- include(file)..
    The patch is rather involved. Probably there are easier ways to fix
    this particular issue. Usage based reclaim of source files is a step
    towards garbage collecting code in general though.

  • CLEANUP: Property balance ‘$start_consult’/2 and ‘$end_consult’/1.

  • ADDED: message_queue_property/2: property waiting(-Count) to find
    the number of threads waiting for this queue.

  • ENHANCED: thread_send_message/2: reduce time the queue mutex is held.

  • FIXED: thread_get_message/1,2 could not wakeup after a message arrived.

  • DEBUG: Improved debug channel MSG_QUEUE, notably avoid printing to
    the possibly redirected current output using pl_writeln().

  • FIXED: destroying affected tables should first collect the
    network. Edward Schwartz

  • DOC: Format CMAKE.md * Justify paragraphs

    • Align CMake options

    • Align table columns

  • DOC: Fix typos in CMAKE.md

  • DOC: Fix typos in manual

  • ADDED: wildcard_match/3. Required because wildcard_match/2 no longer
    listens to case sensitivity of the file system. Suggested by Keri Harris.

  • FIXED: Missing error case for a non-terminated [.. set.
    Included more test cases.

  • FIXED: wildcard_match/2: peek after string on unmatched “{”

  • FIXED: wildcard_match/2 and expand_file_name/2 used to print a
    warning and throw a domain_error on an illegal pattern. It now throws
    a syntax_error exception.

  • TEST: Added files test dir, now containing test_glob.pl

  • FIXED: Memory leak in text canonicalization

  • FIXED: expand_file_name/2 and wildcard_match/2 - Avoid a possible
    crash using Unicode patterns. Found by Keri harris. - Fully support
    Unicode in patterns and file names. - Remove the length limit for
    compiled patterns (used to be 1024 chars).

  • MODIFIED: wildcard_match/2 used to be case insensitive if file names
    are case insensitive. Now wildcard_match/2 is always case insensitive.

  • DOC: Remove duplicate license information * Move the new license down
    to replace the old one

    • Refer directly to the license page on the website

    • Update the copyright year

  • ADDED: Monotonic tabling

  • FIXED: get_returns_for_call/2: module qualification

  • FIXED: Possible use-after-free

  • DOC: call/1.

  • BUILD: When building the MacOS bundle, tell CMake not to look into the
    Macport bin, lib and include. We want to use our own dependencies that
    are compiled for MacOS 10.12 and later rather than the Macport ones that
    are for the current OS and for others we want the MacOS native libraries
    to reduce our footprint.

  • FIXED: keep pending choicepoint frames visible to the stack shifter

  • FIXED: prolog_frame_attribute/3 getting local variables for a frame
    after backtracking to the next clause could unify with a non-initialized
    var.

  • DEBUG: Wrong CHK_SECURE assertion.

  • FIXED: Added missing release_def() for computation of the size
    property of predicates. May prevent clause garbage collection.

  • MODIFIED: prolog_listen/3: when listening on a dynamic predicate,
    assert the new clause before calling the event hook.

  • FIXED: Changed unviewable background color for DCG right hand context

  • DOC: Removed unix/1 docs from main manual as this is merely a partial
    Quintus emulation.

  • DOC: char_type/2: updated general description.

  • DOC: Use consistent command line option names

  • DOC: Fix typos in manual

  • MODIFIED: atom_string/2, string_chars/2, string_codes/2 and
    text_to_string/2 accept any text representation as input on both
    arguments. If both are instantiated, string comparison is applied.

Package bench

  • FIXED: Avoid error when using without threads

  • ADDED: Provide CSV output using swipl run.pl --csv

  • ADDED: PGO training data for determinism declarations.

Package archive

  • PORT: Allow overruling libarchive dependencies.

  • PORT: Support libarchive versions without raw or mtree formats.

Package chr

  • FIXED: Make chr work in temporary modules (Pengines, SWISH)

Package clib

  • ADDED: uuid/2 emulation to allow for format(integer).

  • ADDED: uuid_property/2 to get the version and (for 1 and 2) time
    stamp of the UUID.

  • ENHANCED: Always install library(uuid), providing (currently) a
    random UUID in case the OSSP-UUID dependency was not available for
    building SWI-Prolog.

  • BUILD: Drop building and including libfary(time) in the single
    threaded version.

  • PORT: uuid handling on CentOS 7

  • PORT:Deal with CentOS7 broken uuid-config

  • ENHANCED: process_create/3: better error message if executable could
    not be found.

Package clpqr

  • ENHANCED: Use high level copy built-ins to realize dump/3 and
    projecting_assert/1. Share code between these.

  • MODIFIED: library(clpq) to throw ISO compliant exceptions

Package http

  • MODIFIED: Issue#148: Do not redirect from /path to /path/Var

  • FIXED: Issue#147: JSON parser to reject illegal numbers.

  • PORT: Start splitting parts that need threads and those that do not.

  • DOC: Small touches & updates

  • ADDED: Support dynamic management of gzipped files.

  • DOC: http_open_websocket/3: udated for handling the Origin header.

  • FIXED: predicate option declaration for http_open_websocket/3:
    corrected pass-through to http_open/3.

  • ADDED: gone 410 to list of status replies

  • ADDED: Define http_open/map_method/2 as multifile so we can support
    non-RFC HTTP methods.

  • COMPAT: Parse cookie values more flexible. Keri Harris.

  • ADDED: http_open/3 to accept unix_socket(+Socket).

  • ADDED: http_server/1,2: allow binding to a Unix domain socket.

  • 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.

  • ADDED: library(http/http_redis_plugin) to use a redis DB for storing
    session info.

  • ADDED: library(http/http_session): support for hooking the storage
    layer of this library.

  • FIXED: Issue#142: http_reply_from_files/3: Return 301 Moved Permanently
    on directories without trailing /

Package jpl

  • TEST: Fix tests for bounded integers.

Package ltx2htm

  • FIXED: Handling of empty cells to emit a <td></td>

Package nlp

  • ADDED: isub/4 mode isub(+Text1, +Text2, -Simularity, +Options) by @swi.

  • ADDED: isub_short/4 by @swi. Provided isub/4 simularity matching to
    also deal with short strings.

Package odbc

  • PORT: Drop odbc_cancel_thread/1 when compiling without thread support.

Package pengines

  • ADDED: tab/1 to Pengine I/O emulation, emitting &nbsp

  • FIXED: pengine_property/2 in mode (+,+). David Tonhofer.

Package pldoc

  • ADDED: Include documented public/1 predicates in the default page.

Package plunit

  • DOC: Replace LaTeX docs for show_coverage/1,2 with the PlDoc generated
    docs.

  • FIXED: Coverage annotation with long file paths. @peter.ludemann.

  • ADDED: show_coverage/2: Produce annotated files with coverage
    information. This information now also shows the number of entries
    and exits/failures.

  • ENHANCED: Abstract put_char(user_error, ‘.’), etc. to use
    print_message/2 so we can change and suppress these messages.

  • ADDED: plunit(summary(Dict)) silent message to easily get a summary
    report.

Package protobufs

  • TEST: Disable tests that require unbounded integers when GMP is
    not included.

  • ENHANCED: support for protobuf map<…>

  • DOCUMENTATION: oneof, map

  • ENHANCED: handle “oneof” fields

  • ENHANCED: meta-data loading (generated by protoc --swipl_out=…)

  • FIXED: protoc plugin when .proto file has no package name (possibly
    a bug in protoc)

  • ENHANCED: handle default values when parsing a wire stream.

  • TESTING: added many unit tests

  • ADDED: protobuf_serialize_to_codes/3 fixed: uint64_codes et al handling
    of signed/unsigned improved: error handling for uint64_codes et al
    renamed integer_zigzag to int64_zigzag, int32_codes => uint32_codes,
    etc. moved some code into protobufs.c (uint64_int32, etc.) simplified
    code by using freeze/2 and when/2 instead of nonvar/1

  • ADDED: protobuf_parse_from_codes/3 (using output of protoc-gen-swipl
    plugin)

  • ENHANCED: handle “group” add protobuf/unittest golden

  • BUILD: Run developer and “demo” tests as part of cmake/ctest build
    Use installed protoc Refactor Makefiles

  • TEST: Added unittest*.proto and “golden” tests, edge case tests

  • ADDED: Plugin for protoc (protoc-gen-swipl) Copy logic from
    descriptor_proto_expand.pl to protoc-gen-swipl

  • FIXED: Some edge cases of negative or very large numbers Added
    round-trip tests Work-around issue #5 Added utf8 encoding directives
    Replace UTF8 strings by unicode codes, in case tests run in ASCII
    locale

  • ENHANCED: Added repeated_embedded, unsigned32, unsigned64

  • PORT: Avoid UTF-8 in comment to allow building using non-UTF-8 locales.

  • ENHANCED: handle repeated [packed=true]

  • PORT: Avoid UTF-8 in comment to allow building using non-UTF-8 locales.

  • ADDED: support for “packed”

  • FIXED: UTF-8 processing for string(Tag,…) ADDED:
    signed64(Tag,…) for .proto types int32,int64

  • ADDED: protobuf_segment_message/2 heuristics to match protoc
    –decode_raw functionality

  • ADDED: protobuf_segment_message/2 and export the low-level conversion
    predicates

Package semweb

  • FIXED: Wrong argument type for PL_*_external() The SWI-Prolog.h
    external record functions use char * for the type of the
    external record data, but rdf_db is storing it and passing it as a
    record_t. Which went unnoticed when record_t was just a typedef
    for void *, but now causes (non-fatal) warnings during compilation,
    with the new opaque-struct-typed API header.

Package sgml

  • TEST: Silence expected error messages.

  • COMPAT: xpath/3: allow specifying attribute values in selectors
    as strings.

Package ssl

  • PORT: Issue#160: OpenSSL 3.0. Drops option padding(sslv23) from
    rsa_(private/public)_(en/de)crypt/4.

  • PORT: Single threaded build.

Package swipl-win

  • CLEANUP: Avoid deprecated endl for Qt >= 5.14

Package xpce

  • ADDED: PceEmacs server: control whether we kill the editor after
    the command completes. Made available in in the edit script as
    edit --no-wait file:line.

  • FIXED: gtrap/1 is not a meta-predicate.

  • ADDED: gtrap/1 to call trap/1 with the graphical debugger.

  • FIXED: Allow autoloading library(pce_dispatch).

  • FIXED: Make PceEmacs Prolog mode work if rational number support is
    not enabled.

  • FIXED: Dependencies when using with single threaded version.

  • FIXED: PceEmacs: Make ^C^E (export) work for => rules.

  • FIXED: Possible autoload hook in source navigator. Rick Workman.

  • FIXED: GUI tracer interface to library(portray_text).

  • PORT: Make compile using MinGW 10. Avoids multiple definitions of
    global data symbols XPCE_display, etc.

  • FIXED: Issue#757: Gui tracer fails if variable clustering is disabled
    and variables are bound to another variable. Jindrich Kolman.

8 Likes

Note: Version 8.4.0 is a stable release and is not under the development releases.

In other words
it is not here: SWI-Prolog downloads (Development)
it is here: SWI-Prolog downloads (Stable)

1 Like

Perfect timing! I just discovered that I need mapsubterms, which debuts in 8.4. Thanks!