Dear SWI-Prolog user,
SWI-Prolog 9.3.18 is ready for download. Highlights:
- foldall/4 as discussed in library(aggregate). Related,
nb_setarg/3 and related destructive assignment predicates
can now be used to “grow” the value without leading to
quadratic complexity. E.g.,arg(1, State, List)
,
nb_setarg(1, State, [H|List])
runs without copyingList
over and over again. - Several enhancements to the
pack
app to manage packages
in a designated directory. - Bugs fixed: dict_same_keys/2 could corrupt the stacks.
Theincremental
property of dynamic predicates was lost
when creating a saved state. - Updated SICStus foreign interface emulation, turning the
script into an app (splfr
) - @likelion provided patches that fix many typos in the main,
semweb and http package documentation. Thanks! - @mgondan1 pointed at various address sanitizer issues. All
benign. Fixed did clean some code and make it compliant with
C99 and later.
This version also includes the first round updating the clause
indexing code: splitting into smaller functions and documentation.
Changes in the pipeline should improve performance and make the
indexing independent from the ordering of calls.
Enjoy --- Jan
SWI-Prolog Changelog since version 9.3.17
-
FIXED: library(prolog_colour): misleading colouring of
Dict.field
in arithmetic expressions. Field was flagged as an error (no_function
). -
DOC: sort/4 stable sort example. Suggested by Pierpaolo Bernardi.
-
ASAN: Avoid runtime errors on
field[1]
-
PORT: More C99 unspecified array at end of struct issues.
-
PORT: Use portable definition of
struct clause
-
PORT: Use C99 constructs for a portable version of
struct functor
Structs may usetype name[]
as last field for a dynamic array. -
ENHANCED: Simplify generating a joined key for multiple arguments.
-
ENHANCED: app
splfr
to use new argv_options/4 ability to pass
unknown options. -
ADDED: argv_options/4: option unknown_option(pass) This passes
unknown options to the positional argument list without warning.
This is intended for processing some options while some downstream
component processes the remaining options. -
MODIFIED: Turn SICStus
splfr
script into a SWI-Prolog app Allows
forswipl splfr [option..] input ...
Patch also fixes typing in
sicstus.h
, check the return of
PL_put_term() and adds SP_cons_functor(). -
DOC: spellchecked documentation
-
CLEANUP: Clause indexing code. Split into smaller functions,
usebool
type, avoidgoto
, add more comments, etc. This is a
preparation before improvements. -
ADDED: foldall/4. Suggested by Boris Vassilev.
-
DOC: clarified (new) destructive assignment complexity.
-
ENHANCED: Use improved sharing in nb_set_dict/3. This patch makes
nb_set_dict/3 call the low-level code for nb_setarg/3, providing
better code reuse. -
ENHANCED: nb_setval/2: avoid quadradic complexity.
-
ENHANCED: nb_setarg/3: avoid copying the old value. If the new value
contains the old, the old value is not copied, making many applications
linear instead of having quadratic cost. -
CLEANUP: Pack context for copy_term/2 and friends into a struct Also
type and declaration cleanup -
ADDED: swipl pack remove: --dir=DIR option
-
ADDED: swipl pack info: --dir=DIR option Give info on packs installed
below DIR -
ADDED:
swipl pack rebuild [--dir=dir] [pack ...]
-
ADDED:
swipl pack list --dir=DIR
option to list packs installed
in DIR. -
FIXED: dict_same_keys/2 could overflow the global stack.
-
ADDED: trap/1: aliases for e.g. type_error → type_error(,) So one
does not need to remember the number of arguments. -
FIXED: Preserve
incremental
property when creating a saved state.
Package clib
- PORT: Support inet6 on NetBSD
Package http
- DOC: spellchecked documentation
Package semweb
-
ASAN: Avoid runtime errors. All “fixed” issues are benign
-
DOC: spellchecked documentation
Package xpce
-
PORT: Avoid
-Wstringop-truncation
warning. -
PORT: Silence address sanitizer errors.
-
MODIFIED: PceEmacs: sync comment commands with (my)GNU Emacs. -
\C-c\C-h (insert_section_comment)
Insert code section comment from prompted title - \C-c\C-q
(insert_long_comment)
Insert /* - - - … - - - */ comment