Dear SWI-Prolog user,
I’m happy to announce SWI-Prolog 8.3.4. As opposed to recent releases
that mostly brought fixes, this one mainly brings new functionality.
-
Added transactions. See transaction/1, etc. Although not completely
set in stone, the current implementation seems fairly stable and I
do no expect serious changes to the API. This may have some impact
on portability due to required changes in thread synchronization for the
update generation management. Tested on Linux (amd64), Windows (32 and
64 bits), MacOS (gcc and clang) and Raspberry Pi (Rasbian, Pi3, arm32).Note that transactions are also available for the single threaded version.
-
Added library(hashtable). The implementation seems quite robust. The API
may be changed or extended based on feedback. Somehow the docs do
not show up in the search. See here
In addition there are the usual small fixes and documentation updates,
notably contributed by Adrian Wong and David Tonhofer. Roy Ratcliffe
provided hooks to make file://
references work. See library(iri_scheme/file).
Enjoy --- Jan
SWI-Prolog Changelog since version 8.3.3
-
FIXED: Actually allow hashtables to have non-ground keys by using
variant_hash/2 instead of term_hash/2. -
DOC: Explain working directory issues for loading
likes.pl
. -
FIXED: Issue#637 (following Discourse message): functional notation
expansion in ^-meta arguments (bagof/3, setof/3, etc.). -
ADDED: library(hashtable): mutable and backtrackable hash table
in Prolog. -
ADDED: library(error), type
pair
to denote a Key-Value pair. -
ADDED: Generate events on a transaction rollback. This also fixes
consistency for private incremental tables under transactions. -
PORT: 32-bit platform without 64-bit atomic operations.
-
FIXED: Single threaded build.
-
ADDED: Support file IRI scheme
-
DOC: Clarify transaction/3 and clause ordering inside transactions.
-
FIXED: Generation synchronization wrt transaction constraints.
-
FIXED: Generation management of assert/retract
-
FIXED: Possibly crash while enumerating table answers (missing stack
space check and expansion). -
FIXED: An asserted term may be visible in arbitrary generations for
a short time. -
FIXED: Clauses asserted in a transaction could become briefly visible
outside. -
FIXED: Avoid inconsistent L_PREDICATE and L_GENERATION locking
(deadlock). -
FIXED: Assert+retract inside a transaction may cause a clause to
become visible again. -
ENHANCED: transaction_updates/2: distinguish asserta and assertz.
-
TEST: Test transaction constraints.
-
FIXED: Added option/2 dependency for library(thread).
-
ADDED: transaction/3
-
FIXED: Added missing predicate_options/3 declarations for
concurrent_forall/3 and concurrent_and/3. -
FIXED: Proper commit generation
-
ADDED: transaction_updates/1 to get access to pending updates in
a transaction. -
FIXED: retract/1 in nested transaction for clauses added by an outer
transaction. -
DOC: Mostly changes to atom_codes/2 et al.
-
ENHANCED: Avoid remembering clauses that are asserted and retracted
in the same transaction. -
ADDED: current_transaction/1 to test whether a goal is running inside
a transaction. -
FIXED: transaction nesting
-
ENHANCED: Make reconsult predicate updates truly atomic.
-
FIXED: Use L_GENERATION lock for removeClausesPredicate() to make
this truly atomic. -
FIXED: propagate I/O exceptions or signalled exceptions
from discarding an unbuffered stream temporary buffer.
Report -
ADDED: Transaction isolation support. See transaction/1 and
snapshot/1. Experimental. Use ?- help(transactions). for help. -
CLEANUP: Generation management
-
FIXED: Single threaded build.
-
ENHANCED: concurrent_and/2,3: limit size of answer queue. Jan Burse.
-
DOC: Reviewed chapter on “exceptions”
Package clib
- FIXED: A destroyed engine under a time limited goal destroys the main
thread’s timers.
Package jpl
- TEST: Install jpltest-${JPL_VERSION}.jar as jpltest.jar. If we
install jpltest.jar itself, it is just a link. We do not want to
install links if we can avoid it for portability.
Package plunit
- ADDED: current_test/5 to reason about known tests.