Dear SWI-Prolog user,
SWI-Prolog 9.3.15 is ready for download. It comes with some
(portability fixes), introduction of SSU for DCG using Head ==> Body
and various updates to printing numeric values including support for
printing integers with “grouping” in the toplevel and debugger. Some
of the formatting is under discussion as PIP-105 and may (and probably
will) change.
Highlights:
-
Added library(prolog_locale), providing setup_prolog_integer_grouping/0.
This allows for this in yourinit.pl
after which big integers are
written as1_234_456
, etc in the toplevel and debugger.:- if(exists_source(library(prolog_locale))). :- setup_prolog_integer_grouping. :- endif.
-
Added write_term/2,3 options format_float(+Format) (SICStus
compatibility) and format_integer(+Format). These issues are
under discussion as PIP-105 and may change. -
Added
~:D
(colon modifier forD
to use_
instead of
,
for digit grouping. -
Added format/2
~N[hH]
specifier for compatiblity with SICStus.
Provides writing floats with minimal digits for reading to the same
float (as write/1), whereN
dictates when to us exponential
notation or not. -
Added
Head ==> Body
, providing SSU DCG rules. Notably comfortable
for generative (serializing) DCG rules. -
Cleanup and some possible fixes for prolog_trace_interception/4,
the hook that drives the graphical debugger and SWISH debugger.
Surely fixes some things, but unclear whether this fixes some
infrequent SWISH crashes. -
Some “pack” management fixes.
-
Implement distinct/1,2 and reduced/1,3 using tries.
This reduces the overhead over 5 times -
Dropped most of the visibility of the old C++ interface. The
code is still there, so code relying on it still works. -
Fedora 41 portability patches (hamcrest and latest OpenSSL BIO
issue)Enjoy — Jan
SWI-Prolog Changelog since version 9.3.14
[Nov 18 2024]
-
FIXED: Handling return values in stack expansion. Introduce
morebool
to correctly distinguish functions returning
true/false/*_OVERFLOW from those raising exceptions and only returning
true/false. -
FIXED: prolog_trace_interception/4: setting up the hook good crash.
[Nov 17 2024]
-
CLEANUP: Updated library(option). Updated documentation and make
more use of => to capture type issues. merge_options/3 now also
supports dicts. -
ENHANCED: prolog_frame_attribute/3: Better argument validation.
Also various minor cleanup (e.g., morebool
). -
FIXED: library(main): superfluous choice point in argv_options/3
[Nov 16 2024]
-
ADDED: format/2: support
~:D
The colon modifier forD
forces
the use of Prolog digit grouping using_
. -
FIXED: format/2 handling of Unicode characters Regression from
a49fe8cb40fc15b7325a4e4836304cbe6d9ccef0
[Nov 15 2024]
-
ADDED: library(prolog_locale) to setup grouped printing of integers.
-
ADDED: write_term/2 options format_float(+Format) and
format_integer(+Format) Using a format seems a more sensible way to
control writing numbers from write_term/2. This patch removes the
previously introduced radix(+Radix) option. If we want this back we
will implement it on top of format_integer(+Format).This patch also contains a lot of small code cleanup and some
optimization
to low-level I/O. -
ADDED: write_term/2: option radix(Radix). Experimental. Under
discussion as PIP-105. The current implementation writes, unlike XSB,
the radix prefix. We either need more options or we should consider
another alternative such as integer_format(+Format)As this patch cleans up a lot of the code regarding numeric output and
most will be needed anyway, it is merged despite the fact that the
radix option may vanish eventually.
[Nov 14 2024]
-
ADDED: format/2 specifier
~h
This provides compatibility to
SICStus. It also makes write/1 output for floats compatible to SICStus
for deciding between fixed point and exponential notation. -
FIXED: ISO compatible parsing for
fy 2 yf
and similar cases.
[Nov 13 2024]
- TEST: Added ISO ambiguous operator tests. Marked two tests as blocked
as these currently fail.
[Nov 8 2024]
- FIXED: #1331 Module issue in SICStus block/1 emulation. This patch
also reformats the file, removes some dead code and remove the outdated
restriction that it does not work on dynamic or foreign predicates.
[Nov 6 2024]
-
ENHANCED: Avoid spurious tracing in push_msg/2.
-
DEBUG: First print the Prolog stack “safe” on a crash. This guarantees
that the stack is printed, including details on the clauses involved
and progress in each clause. Next, the stacks are printed with
arguments. This however may crash if the crash is caused by corrupt
data on the stacks.
[Nov 5 2024]
-
ADDED: Support SSU DCG rules as
Head[, Guard] ==> DCGBody
. -
FIXED: libary(prolog_pack): detection of valid download URLs.
-
FIXED: Build order planning. This reverts
1cf4acbe722604857a2627ecc161f80e16f330ed. That patch was broken.
The reported failure probably had some other cause.
[Nov 4 2024]
-
FIXED: Installing a pack should attach the pack itself. This
incorrectly registered the directory of the pack as a directory that
provides packs instead. -
ENHANCED: explain/1 to enumerate all instances of a non-qualified
predicate. -
TEST: rwlocks unit tests for safety and reliability
[Nov 3 2024]
- BUILD:
plunit
requiresclib
package.
[Nov 1 2024]
- ENHANCED: Implement distinct/1,2 and reduced/1,3 using tries.
This reduces the overhead over 5 times.
Package bench
[Nov 13 2024]
- FIXED: Avoid division by zero if no tests are executed.
Package cpp
[Nov 2 2024]
-
DEPRECATED: Officially deprecate version 1 of the C++ interface.
For now, we will keep SWI-cpp.h in the distribution. We do not plan
any updates to keep it in sync with changes to SWI-Prolog or the
C++ standard. Users of this old interface are strongly encouraged
to update their program. -
DOC: removed all “(version 2)”
-
DOC: Delete documentation for version 1 of the C++ interface
Package jpl
[Nov 14 2024]
- TEST: Fix finding hamcrest on Fedora 41
Package plunit
[Nov 6 2024]
- ENHANCED: PlUnit message for tests that succeed with a choicepoint.
Package ssl
[Nov 17 2024]
- PORT: Extended our BIO_ctrl() callback. In Fedora 41, OpenSSL
3.2.2, it appears we need to implement the BIO_ctrl() methods
BIO_C_FILE_TELL
andBIO_C_FILE_SEEK
for properly loading keys
from files.