Dear SWI-Prolog user,
SWI-Prolog 9.1.21 is ready for download. Most of the changes are
related to packaging and portability. Highlights:
-
The structure of the installed library has changed. Bundled
extensions such asclib
,http
, etc. place their Prolog
files inlibrary/ext/<package>/*.pl
rather than all
together in the main library. That simplifies finding the
origin of code and, most importantly, it avoids modifying
theINDEX.pl
files when adding/removing extensions. This
notably simplifies package management system that chop
SWI-Prolog into multiple sub packages.For the user it should not have many noticible differences.
However, library(clpq), library(clpr) and library(inclpr)
are now only accessible by this name and no longer
as library(clp/clpq), etc. -
apps for
qlf
andmqi
have been added that simplify
managing.qlf
files from the commandline as well as
the MQI server. Eventually, more should be added. Candidates
are e.g., protobufs (the protoc compiler support) and
PlDoc, for example for generating LaTeX and HTML documentation
for files. -
library(main)
option help has been extended to allow for
(PlDoc) markdown in the command description. Still a bit
slow when used as it lazily loads PlDoc, HTML and HTML to
text facilities. -
Janus (the Python) interface got some minor updates. Within
the PIP team we got agreement on the exception term resulting
from Python errors. Managing the Python search path has changed
in two ways: py_add_lib_dir/1 adds a directory at the end
(was start). When using Prolog with Janus interactively, the
working directory is added to the Python search path, just
like Python itself does. Also compatible with the XSB
Janus.The interface is now on janus-swi · PyPI
Enjoy — Jan
For incremental updates using git, after updating the source run from the
build
directory
rm -rf home
cmake .
ninja (or make)
SWI-Prolog Changelog since version 9.1.20
-
FIXED: Avoid dependency from library(edit) on library(pce).
-
FIXED: Loading library(readutil) without foreign support Was broken
since the changes to support static extensions. -
CLEANUP: list_debug_topics/1 to use a single print_message/2 call.
Also fixes hooking into debugging/0 -
DOC: Document tty_get_capability/3 exceptions.
-
MODIFIED: prolog:translate_bindings/5 to name the variables.
Supports named variables in SWISH. -
INSTALL: #1209 Fixed missing manindex.db during intallation.
-
DOC: Get profiler/2 and related docs from PlDoc rather than LaTeX
-
ENHANCED: When emitting a document, consider text already on the
current line. -
ADDED: opt_usage/1: allow for multiple
opt_help(help(usage), Usage)
This allows to present multiple usage lines. -
ADDED: app
qlf
This app simplifies commandline driven management
of QLF files. Useswipl qlf -h
for help. The command line syntax
is still unstable. -
FIXED: Recompile or ignore incompatible QLF files An incompatible
VM signature caused loading of a QLF file to result in a warning,
loading nothing. It now prints a message and recompiles the file. -
ADDED: check_installation/0 to verify there are no ambiguities in
the autoload index. -
ENHANCED: library(portray_text): allow 10% unicode characters
-
MODIFIED: Install each extension in library/ext/dir This allows
adding and removing extensions without rebuilding the library index
and clarifies the source of files. This was introduced to simplify
adding and deleting optional components in e.g., the Windows installer
or package managers that split SWI-Prolog into multiple packages such
as used by Debian and planned for Conda. -
FIXED: Toplevel calls repl_loop_hook/2 with a variable.
-
FIXED: Choice point left by loading the personal init file.
-
FIXED: format_types/2: error on backracking This predicate left a
choice point and on backtracking produced an error when analyzing
format strings that contain a*
. -
ADDED: Experimental prolog:repl_loop_hook/2 hook This allows acting
on entering/leaving interactive mode.
Package chr
- FIXED: Exported current_chr_constraint/1 from library(chr).
This predicate replaces the deprecated find_chr_constraint/1, but
was not exported.
Package clib
-
BUILD: replace CMake deprecated
exec_program()
with
execute_process()
-
FIXED: uri_edit/3 to consider the initial path
''
to be the same as
/
. -
FIXED: directory_file_path/3 when Dir =
''
Package jpl
- BUILD: replace CMake deprecated
exec_program()
with
execute_process()
Package ltx2htm
- MODIFIED: As all extensions are now installed in a subdirectory we
no longer need an extra layer.
Package mqi
-
MODIFIED: Install MQI as a SWI-Prolog app This simplifies the command
line interface and avoids the need for autoloading. New interface isswipl mqi [option ...]
-
TEST: Don’t use Unix domain sockets if the path is so long that it
will fail
Package pengines
- CLEANUP: use uri_edit/3 to compute the final server path
Package pldoc
-
FIXED: Avoid dependency on library(pce) Allows running the
documentation tools without library(pce) -
ADDED: print_markdown/2 to emit a string as markdown.
-
CLEANUP: File system interaction to use more libraries.
-
DOC: Document doc_save/1
include_reexported(Bool)
option.
Package plunit
- FIXED: Avoid tty_get_capability/3 exception
Package protobufs
- BUILD: replace CMake deprecated
exec_program()
with
execute_process()
Package semweb
- ADDED: sparql_query/3: pass SSL options to the SSL context.
Package swipy
-
DOC: Document Prolog exceptions generated by Janus.
-
CLEANUP: Improved consistency of reported type/domain errors.
-
MODIFIED: Moved Python backtrace into second argument of exception.
Python exceptions are now mapped toerror(python_error(Type, Data), context(_, python_stack(Stack)))
This change also actually prints the Python backtrace.
-
FIXED: Add current directory to Python
sys.path
as `‘’`` This is
compatible to normal interactive Python sessions. -
ADDED: Version information Added property
version_num
and functions
version_str()
andversion()
-
DOC: Use
*args
instead ofargs...
for Python variadic arguments -
PORT: Fix Windows type issues.
-
COMPAT: py_add_lib_dir/1 to add new directory at the end.
-
ADDED: Prepend ‘.’ to the Python search path for interactive sessions
Similar to Python, when Prolog is used interactively we add ‘’ (or
‘.’) tosys.path
as first element. Prints an informational
message when this happens.Note that adding . for non-interative sessions is undesirable for
security reasons: unaware users of an application may trigger the
execution of code that happens to be in the current directory.
Package xpce
-
CLEANUP: Avoid duplication between library(prolog_xref) and
library(pce_prolog_xref) -
ADDED: GUI tracer settings: allow setting ellipses length for text.