Dear Prolog user,
I have uploaded SWI-Prolog 8.1.1. There is a lot to enjoy. Highlights:
-
FIXED: the MacOS bundle: menu handling in SWI-Prolog.app and make
xpce work again (hopefully). With help from `ridgeworks’ and
Carlo Capelli. Both were regressions due to the migration to
CMake. -
ENHANCED: delete lingering clause indexes older than the oldest
active predicate access. Keri Harris implemented a big enhancement
getting rid of old clause indexes for dynamic predicates that are
repeatedly filled with many clauses, queried and emptied and almost
continuously active. -
ENHANCED: avoid uneeded garbage collection when catching exceptions
that are not related to stack overflows. Can be a bit performance
improvement for applications using a lot of exceptions in their
normal computation. -
XSB: Started investigating XSB/SWI-Prolog options for cooperation.
This added (still very limited) support for
:- expects_dialect(xsb) and loading XSB .P files (in XSB emulation
mode). Enabled by Kyndi. -
PORT: .QLF files and saved states are now word-length independent.
This means they are machine (OS, CPU) independent, but still depend
on the Prolog VM that can change between versions.Erlanger added support for including foreign plugins for multiple
architectures in saved states. This is part of ongoing work by
Erlanger to generate Android APK installers from Prolog. -
ADDED: HTTP server: deal with rest locations as discussed here and
pioneered by Raivo Laanemets.
And of course the usual set of small fixes and enhancements.
Enjoy --- Jan
SWI-Prolog Changelog since version 8.1.0
-
XSB: Started
intern
library emulation. -
PORT: Force compiling and linking against XQuartz on MacOS when
creating a bundle. -
ENHANCED: delete lingering clause indexes older than the oldest active
predicate access -
ENHANCED: Do not request a garbage collection after an exception
unless we ran out of stack on a stack that is subject to GC. -
ENHANCED: No longer perform forced GC before calling the user exception
hook. GC is allowed inside the hook, so there is no reason to do so. -
MODIFIED: No longer use print_message/2 for
trace_gc
. If GC happens
in some parts inside the VM we cannot handle calls to Prolog safely. -
FIXED: Only check that an async signal handler created an
exception. -
XSB: Added dummy abolish_table_info/0.
-
FIXED: SWI-Prolog refuses to export ISO predicates, so we cannot
import them either. This isn’t needed anyway. -
FIXED: Make sure closing a zipper twice does not open the stream twice.
-
XSB: completed basics.pl emulation
-
TEST: Avoid name clash in tabling tests.
-
ENHANCED: Verify a predicate has no clauses when :- table is declared.
-
XSB: Partially emulate compiler options.
-
CLEANUP: Avoid truncating in abs(ssize_t) (benign).
-
FIXED: Issue#82: Throw a floating point exception when NaN/Inf floats
need to be converted to an integer. -
XSB: Support modified libraries with the same name.
-
XSB: Improve :- import … from … emulation.
-
FIXED: Pretend
begin_of_file
is expanded from line 0 instead of
make source_location/2 fail. -
XSB: Deal with .H files.
-
XSB: Support operators mode and export. Make import look for modules
relative to the current dir. -
FIXED: Moved setting the SIGINT handler from resetTracer() to
initTracer() so it won’t reinstall the default SIGINT handler on
abort if the user changed the binding. -
FIXED: on_signal/3 handling of
throw
. Peter Ludemann. -
PORT: Prolog flags for android
-
DOC: qsave_progam/2: updated foreign(+Action)
-
PORT: set proper android arch
-
ADDED: Multi and cross-architecture shlib support for saved states
-
FIXED: qsave_program/2: deal with
prolog
anddefault
toplevels. Keri Harris. -
FIXED: add -rdynamic to cflags to export symbols (fix #420) Only do
this if we do not put the Prolog core in a shared object. * After
cmake 3.4 -rdynamic is not added when building a
target. This breaks the android termux build. This patch
solves the problem. -
TEST: Fixed test that broke due to assert to a static procedure
unrelated to the test. -
FIXED: Issue#81: assert/1 and friends must produce a permission error
if the predicate is not dynamic and defined. -
XSB: Added load_dyn/1,2 and load_dync/1,2.
-
FIXED: in_temporary_module/3: destroy the load context for files
loaded into this module. -
XSB: Partial compile/2 emulation.
-
HACK: Use (index)/1 instead of index/1 to avoid a conflict with XSB
index operator. It is unclear how to guarantee that the first term
of a source file is always read as intended. -
FIXED: Allow qcompile/1 on files with a different implicit Prolog
extension. -
PORTABILITY: Started XSB dialect specification.
-
FIXED: prolog_load_context/2 to provide the correct
file
,source
anddirectory
before the first term. -
ADDED: term_expansion/2,4: add pseudo term
begin_of_file
to the
expansion stream. -
FIXED: load_files/2: Added predicate option declaration for
dialect(+Dialect) -
CLEANUP: Move saved state generation to library(qsave) to simplify
init.pl -
ENHANCED: Removed conditional code from the boot file. This ensures
we have the same boot file regardless of the machine, simplifying
cross compilation. -
CLEANUP: Name the boot file simply boot.prc as it no longer depends
on the word-size. -
ADDED: Prolog flag
portable_vmi
. -
CLEANUP: Proper range test (LONG_MAX -> INPTR_T_MAX)
-
DOC: Updated expand_term/2 documentation.
-
FIXED: possible crash when loading saved states that contain procedures
with NULL modules -
PORT: Generate i386 binaries on x86_64 Debian based Linux systems.
-
BUILD: Updated minimum CMake version required to 3.5
-
DOC: qsave_program/2: fix stack size documentation. Keri Harris.
-
DIST: added packages/windows directory to source archive. Keri Harris
Package archive
- ADDED: archive_foldl/4
Package clib
- DOC: Fixed a small typo in chmod/2 documentation.
Package http
-
DOC: library(http/http_client), option json_object(dict).
Joost Geurts. -
MODIFIED: Issue#422: json_read/3 and friends no longer read the
character that follows the JSON document, allowing for concatenated
JSON. -
FIXED: json_read_dict/2,3: allow options to define arbitrary terms
for true, false, null and end_of_file. -
ADDED: json_read/3 and friends, option end_of_file(+Action), where
Action
is either the atomerror
, throwing a syntax error or any
other term, returning this term if the end of the input is encountered
after skipping white space but before any data. -
ADDED: Simplify generating a URL that refers to a REST location
declared using a path pattern in http_handler/3. This affects
http_location_by_id/2, http_link_to_id/3, http_redirect/3 and attribute
value notation used by library(http/html_write). -
MODIFIED: http_handler/3: force
Id
inid(Id)
to be an atom.
Previous versions accepted any Prolog term. This provides for
extending http_location_by_id/2 to become more REST friendly. -
EXAMPLES: Updated demo daemon script and systemd service example.
Package jpl
- COMPAT: Boot file is always boot.prc (used for testing).
Package nlp
- FIXED: tokenize_atom/2 when the atom contains an illegal number could
result in a variable (unbound) extra token in the output.
Package sgml
-
ADDED: xpath/3: text(string) to get the DOM text as a string rather
than an atom. -
FIXED: xpath/3: make extraction work if the document was parsed
using cdata(string).
Package swipl-win
- FIXED: Issue#83: Qt console menu handling. This issue was due to
omitted resources in the cmake build. Note that this does not fix
the X11 problems of the MacOS bundle reported in the same issue.
Package table
- DOC: add table package docs