Dear SWI-Prolog user,
SWI-Prolog 8.5.10 is ready for download. Thanks to work by @mgondan1,
@peter.ludemann and @ridgeworks a lot of improvements have been made,
notably on portability and avoiding memory leaks. Unfortunately some of
this is rather involved and some regression is likely. Highlights:
- Support for pcre2 (Perl Regular Expressions) seems pretty much
- Windows support is continuously being improved. This involves
compiling SWI-Prolog on Windows, fixing several issues and making
the test suite more portable.
- Several (small) memory leaks have been fixed.
- The term//2 non-terminal that implements “write to HTML” has
and CSS to provide vertical and smart layout for terms.
- library(http/jquery) now bundles jQuery 3.6.0 (was 1.11.3) if
it does not reuse jQuery from the OS.
Some regressions due to recent changes have been fixed:
- clp(rq) was broken after making its internal module names more
swipl-ld[.exe]was broken (didn’t pass
- on_signal/3 was broken for signals bound to Prolog callbacks.
Some release remarks:
When doing an incremental build from source, call
one time as below to reconfigure jQuery and pcre dependencies.
cmake -U 'JQUERY*' -U 'PCRE*' .
A pull request was submitted to the official Docker images to
Considering the scope of recent changes, once this line of
work stabalizes it will not be backported to 8.4. Instead
we will move to 8.6/8.7.
Enjoy — Jan
FIXED: read_term/2: memory leak when reading Unicode variable names
and reporting these using the variable_names(Names) option.
DOC: Updated clause/2.
FIXED: Memory leak reading Unicode queries at the toplevel.
ADDED: library(sandbox): support predicate_property/2
DOC: PL_atom_wchars(): wrong types
ADDED: library(sandbox): functor/4.
FIXED: Windows (swipl-win.exe) clean closing of I/O.
FIXED: Possible wrong Windows drive letter normalisation.
PORT: msys2, detect libdb-6.0.dll from libdb.a
PORT: MSYS2/clang64 the dll name appears several times in the “.a”
file, select the first appearance
FIXED: PL_retry() and PL_context() to work with all integers.
-Ifor SWI-Prolog.h any more.
PORT: float_fractional_part/1 function: work around broken modf()
FIXED: on_signal/3: properly set flags on the signal structure such
that when bound to a predicate the predicate is called synchronously.
Breaks handling SIGTERM in library(http/http_unix_daemon).
PORT: Sopenmem() to use
SIO_NL_POSIX. All internal strings use
POSIX \n to delimit lines. @mgodan1.
FIXED: copy_term/4 to handle cyclic terms for the first argument.
Also proper recovery in case of a memory overflow.
DOC: Enhance docs for trap/1.
DOC: Start disclaimer on float precision.
FIXED: Added new test files,
PORT: Work around broken llround in MinGW
TEST: Added test framework and some initial tests for source code
position and breakpoint management testing.
TEST: Moved pipe tests to a plunit file.
PORT: open/3,4 on Windows: use clib popen() instead of the broken
emulation in src/os/windows/popen.c
FIXED: Clause position management for
h => X = ..., rest_body:
the unification is not inlined.
TEST: Disable CGI test for Windows because environment variables set
using Prolog setenv/2 are not visible in the CRT runtime function
getenv(). This either requires updating the CGI module to use the
Win32 environment API or start a new process for reading the CGI input.
TEST: Cross-platform null in stream_input
- FIXED: Missed module rename for attribute_goals//1. Reported by
PORT: Make CGI tests succeed on Windows. @mgodan1
UPDATED: Bundled jquery from jquery-1.11.3 to 3.6.0.
TESTS: Fixed tests to work on systems without pcre2 jit
DEBUG: Removed debugging prints. The print statement in the
pcre_release() function is unsave as during proces cleanup the pattern
may vanish before the regular expression.
FIXED: Make comparison and printing the blob work for Unicode patterns.
ENHANCED: re_config/1 backtracks through all possible values
re_config/1 fails if an invalid otption is given instead of throwing
an error fixed some PCRE1 vs PCRE2 documentation for re_config/1 added
a test to check that re_config/1’s documentation is a complete list
comparison now uses the pattern; blob-write also shows pattern fix
bug in compare_pcres() that incorrectly resulted in equality
FIXED: memory leak if re_compile fails or throws an error
- ENHANCED: term//2 for rendering terms as HTML has many new options
- PORT: msys2/clang64, Release, avoid unused warning