Dear SWI-Prolog user,
SWI-Prolog 9.1.8 is ready for download. Highlights:
Profiler to provide accurate port counts using
Default is (still) the old classic mode. This got correct port counts
for many predicates, but not for those involved in mutual recursion.
More support functions for save/load of arbitrary blobs to .qlf files
and saved states, including use of these to save/load PCRE regular
expressions. This allows compiling regular expressions and saving
the result in .qlf files and saved states. By @peter.ludemann
Proof of concept to provide engines in the single threaded version.
This could provide proper async support for the WASM version in the
future. As it, it mostly proofs engines and threads could be untangled
fairly easily without implementing the rest of the requirements.
Fixed to Windows UNC (
\\host\path) file handling.
Fix to recorded/3 which could return an erased record if this was the
Improve recovery from stack overflows.
Various build enhancements.
Various tests enhancements.
Enjoy — Jan
BUILD: Only setup CMake rpath stuff if the Prolog core is a shared
library. This allows building a completely static executable without
ENHANCED: Better error if process argv cannot be processed in current
FIXED: Using PL_new_atom() before PL_initialise() Lazy initialization
of the atom infrastructure must initialize threads.
PORT: Msys2 & Win, static build dependencies
FIXED: recorded/2,3: If the first record was marked erased it is
PORT: Do not link to dladdr() if not available.
BUILD: Allow for CMake to provide list of packages explictly as e.g.
MODIFIED: PL_qlf_* functions to use the normal public API function
naming and calling conventions.
ADDED: PL_qlf_put_atom() and PL_qlf_get_atom(). Both functions may
only be used from callbacks to blobs save/load hooks.
MODIFIED: names for integer exchange functions to qlf files.
MODIFIED: Stop exporting PL_qlf_getInt32() and its put version.
They are not needed and easily implemented.
MODIFIED: Stop exporting PL_qlf_getString() and
PL_qlf_putString(). These functions are too simple to write using
e.g. Sfwrite() and Sfread() while the interface regarding lifetime
if PL_qlf_getString() is not suitable for public use.
FIXED: Qlf save/load of Unicode text on Windows. Also makes the Qlf
format portable between POSIX and Windows for wide strings using
Unicode plane 1.
TEST: Test load/save .qlf files. Current test deals with Unicode.
ADDED: profile/2: options sample_rate(+Rate) and ports(+Ports).
FIXED: Prevent callbacks to Prolog from a thread running the atom
garbage collector. Such callbacks may be initiated from blob
FIXED: Windows: handle UNC paths properly.
MODIFIED: engine_next_reified/2 to return an exception as
throw(Exception) rather than exception(Exception). Compatibile
with e.g. call_time/3.
FIXED: When using single threaded engines we must scan all engines
during atom and clause GC
ADDED: Allow building using
provides engines without threads. This is merely a proof of concept.
It proofs that the code changes are quite minimal. A full version
requires more work:
- Probably we should also remove message queues and thread signals.
- Do we want thread-local predicates in engines? Actually that is
also a question for the multi threaded version. Probably we need
an option to engine_create/4.
This spreads a lot more
#ifdefin the code. Luckily mostly
limited to pl-thread.h and pl-thread.c. Requires further cleanup
by moving more functions and declarations under the same conditonals
together and possibly split some stuff to a new file, e.g. move
mutexes and possibly later message queues and signals to their
CLEANUP: There is no need for using the lingering structures to delay
unallocation for some usage in single threaded mode. Split into
linger_always() and linger().
FIXED: Possible error getting stack trace.
TEST: Disable pipe test when running under Wine.
TEST: Prevent test from failing of concurrent threads are active.
CLEANUP: Use new style foreign language interface for predicates
ENHANCED: If we fail to print an exception message through
print_message/2, print the raw exception.
FIXED: Make last resort stack resize work and (also) apply it if an
exception is being processed.
TEST: Updated for new qlf integer exchange functions.
TEST: Add some PL_qlf_*() tests
TEST: Fix C++ allocation tests
- FIXED: When stream garbage collection is enabled we cannot make a
callback from the CGI context stream in case a context was lost and
reclaimed through AGC.
- TEST: Do not run tests if Pythin cannot be found.
- ADDED: added save/load functionality to pcre blob
- PORT: Make library(plunit) without timeout support.
- FIXED: rdf_literal/1 should not succeed on IRIs in object position
- ADDED: Deal with new port option of the profiler.