Dear SWI-Prolog user,
I’m happy to announce SWI-Prolog 8.3.2. Notably users of multi-threading
are encouraged to update. Highlights:
- Sebastian Sardina did a lot of work cleaning up JPL (the Java
interface). Notably support Maven en reorganize and update the
documentation. This version also supports SWI-Prolog’s dict
objects. - Adrian Wong contributed yet another set of documentation patches.
- wildcard_match/2 and expand_file_name/2 provided proper support
for ASCII only. Using Unicode patterns or targets could access
memory outside allocated regions, causing crashes, leaking data
or giving wrong result. Keri found this. I’ve reimplemented
most of it to properly support full Unicode. - There was a bug in message queues that could cause thread_get_message/1,2
to block indefinitely despite a matching message arrived. Fixing
this bug results in much more predictable timing of HTTP responses
and the thread regression tests. - There was a race condition in temporary module handling that could
cause SWISH to crash. - Another race was possible when two threads tried to compile the same
file. - The HTTP server worker scheduling has been stress tested and improved
considerably. This notably avoids starting far too many workers under
heavy load.
Most of this stuff should go into 8.2.1 as it addresses serious
stability issues. Some of the patches are quite large though, so I first
want to see how well they hold in the real world.
Enjoy --- Jan
P.s. The Macports update has failed due to a missing dependency. In theory that can be fixed by adding a patch file against the source. That is a bit too much work though, so unless someone wishes to become maintainer of the Macports version we can only hope we have more luck with 8.3.3.
SWI-Prolog Changelog since version 8.3.1
-
FIXED: library(prolog_codewalk): handle file/4 message terms.
Matt Lilley. -
FIXED: Location of jpl.jar in development tree to be able to run in
the dev tree. -
PORT: Windows: make condition variable abstraction compile again.
-
ADDED: Foreign API to reuse the internal lock-free hash table
implementation. -
DOC: Removed obsolete section on Boehm-GC support.
-
FIXED: Make module enumeration safe for temporary modules. This
affects notably current_predicate/1 in SWISH. current_predicate/1
using an unbound module now skips enumeration of temporary modules. -
FIXED: Possible race condition when two threads try to compile the
same file. -
FIXED: Possible inconsistent source file reference count.
-
CLEANUP: No longer create a source file object for a derived source.
This doesn’t seem to be used anywhere and the new garbage collecting
approach for source files would reclaim the file immediately anyway. -
FIXED: Make source file admin use reference counts and delete no
longer needed source file admin entries. Discarding them is needed by
Pengines. The hard-coded discard from ‘$destroy_module’/1 could cause
a use-after-free issue in SWISH when using:- include(file).
.
The patch is rather involved. Probably there are easier ways to fix
this particular issue. Usage based reclaim of source files is a step
towards garbage collecting code in general though. -
CLEANUP: Property balance ‘$start_consult’/2 and ‘$end_consult’/1.
-
ADDED: message_queue_property/2: property waiting(-Count) to find
the number of threads waiting for this queue. -
ENHANCED: thread_send_message/2: reduce time the queue mutex is held.
-
FIXED: thread_get_message/1,2 could not wakeup after a message arrived.
-
DEBUG: Improved debug channel MSG_QUEUE, notably avoid printing to
the possibly redirected current output using pl_writeln(). -
FIXED: destroying affected tables should first collect the
network. Edward Schwartz -
DOC: Format CMAKE.md * Justify paragraphs
-
Align CMake options
-
Align table columns
-
-
DOC: Fix typos in CMAKE.md
-
DOC: Fix typos in manual
-
ADDED: wildcard_match/3. Required because wildcard_match/2 no longer
listens to case sensitivity of the file system. Suggested by Keri Harris. -
FIXED: Missing error case for a non-terminated
[..
set.
Included more test cases. -
FIXED: wildcard_match/2: peek after string on unmatched “{”
-
FIXED: wildcard_match/2 and expand_file_name/2 used to print a
warning and throw a domain_error on an illegal pattern. It now throws
a syntax_error exception. -
TEST: Added files test dir, now containing test_glob.pl
-
FIXED: Memory leak in text canonicalization
-
FIXED: expand_file_name/2 and wildcard_match/2 - Avoid a possible
crash using Unicode patterns. Found by Keri harris. - Fully support
Unicode in patterns and file names. - Remove the length limit for
compiled patterns (used to be 1024 chars). -
MODIFIED: wildcard_match/2 used to be case insensitive if file names
are case insensitive. Now wildcard_match/2 is always case insensitive. -
DOC: Remove duplicate license information * Move the new license down
to replace the old one-
Refer directly to the license page on the website
-
Update the copyright year
-
Package cpp
- ENHANCED: Add copy constructor. This prevents warnings from modern
compilers and preserves the existing copy semantics.
Package http
-
ENHANCED: HTTP workers for new connections to keep track of the
activity rate and adjust to the best wait policy, trading time for
memory minimisation. -
ENHANCED: http server backlog changed from 5 to 64. Probably doesn’t
have much effect, but 5 seems old school. -
FIXED: library(http/http_dyn_workers) could start far too many workers
due to (1) waiting a negative time to check the queue was draining and
(2) not respecting the max_workers setting.
Package jpl
-
IMPROVED: documentation, tutorials and initialization of engine
-
IMPROVED: doc pages, much better Development section
-
ADDED: Maven dependency for jpl.jar in doc
-
ADDED: Extended POM to deploy packages on GitHub
-
ADDED: Github Maven building process
-
UPDATED: Javadoc with Dict included
-
CLEANUP: Removed obsolete and unused code from org.jpl7.util
-
BUILD: Avoid warning if junit.jar is not present
-
ADDED: Maven support and dir layout - Upgraded to 7.6.1
-
MODIFIED: move all examples to src/examples/ folder - Fixed #62
-
ADDED: Dictionaries support
-
ADDED: Dictionary as a type of Term
Package pengines
- ADDED: Make pengines redirected I/O work on created threads.
Package pldoc
- FIXED: Manual to serve e.g., ``/pldoc/doc_for?object=*->/2’’.
Package xpce
- ENHANCED: Better visible current tab and better positioning of
the label.