# Ann: SWI-Prolog 8.4.0

**URL:** <https://swi-prolog.discourse.group/t/ann-swi-prolog-8-4-0/4505>\
**Category:** Releases\
**Tags:** ssu\
**Created:** [September 30, 2021, 7:05pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-4-0/4505 "2021-09-30T19:05:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [September 30, 2021, 7:05pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-4-0/4505/1 "2021-09-30T19:05:26Z")

</div>

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.

- 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:

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

- 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:

- 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,

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

- 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

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

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

- 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?

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

- MODIFIED: CLP(FD): Fix mistake in cis\_div

- FIXED: CLP(FD): Fix mistakes in `div` propagation

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.

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

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

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

- 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](https://swi-prolog.discourse.group/t/go-an-exception-when-aborting-dcg-processing-but-is-anyone-interested-in-these/2606/3)

- 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

- 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

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

---

<div class="post-metadata">

**Author:** ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Post date:** [October 1, 2021, 9:59am UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-4-0/4505/2 "2021-10-01T09:59:26Z")

</div>

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](https://www.swi-prolog.org/download/devel) (Development)  
it is here: [SWI-Prolog downloads](https://www.swi-prolog.org/download/stable) (Stable)

---

<div class="post-metadata">

**Author:** ![AdrianB](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@AdrianB](https://swi-prolog.discourse.group/u/AdrianB)\
**Post date:** [October 10, 2021, 12:26am UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-4-0/4505/3 "2021-10-10T00:26:59Z")

</div>

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