Dear SWI-Prolog user,
SWI-Prolog 9.1.15 is ready for download. The changelog is long.
Highlights:
-
Various changes to the CMake files that allow adding the
entire SWI-Prolog source tree using CMake’sadd_subdirectory()
.
This largely simplifies integrating SWI-Prolog from source
in larger projects. -
Support Microsoft Visual C++ compiler suite. This is
responsible for most of the commits. As different compilers
warn about different things quite a bit of (type) cleanup
as needed. This fixed a few minor issues, one possible
memory corruption on the Windows version of the xpce graphics
system and a serious bug in udp_receive/4. These changes
also cleaned up running the system in the build directory.
Not well tested. Runs about 20% slower than MinGW version.See Building SWI-Prolog on MS-Windows for details.
-
Ongoing work on the Janus Python interface. Several bug fixes,
Unicode support for function and method names, more compatibility
with the XSB version. Discussions on improving and fixing
details on the API are ongoing. -
Avoid dependency of the core on the clib package and its foreign
code for dealing with ULRs and timing. This code was used by
library(ansi_term), dealing with color output to terminals.
This simplifies saved states that only depend on Prolog code.
After comments from @peter.ludemann. -
Added checking options passed to predicates as part of check/0.
Updated these checks after discussion with @peter.ludemann. -
Over 2 times faster nth1/3 after comments from @brebs
Enjoy — Jan
SWI-Prolog Changelog since version 9.1.14
-
BUILD: Avoid dependency on Threads::Threads when building single
threaded. This applies to the packages and blocks e.g., the WASM
build. -
DOC: check/0 Document new checks and using check/0 for batch mode
static analysis (linter). -
ADDED: check/0: run check_predicate_options/0.
-
FIXED: check_predicate_options/0: avoid several false warnings.
-
ADDED: must_be/2: type list_or_partial_list(Type)
-
DOC: open/4 reposition option.
-
MODIFIED: Disable toplevel variables if the flag
toplevel_var_size
is 0 -
ENHANCED: Performance of nth1/3 and nth0/3 for mode (-,+,?)
-
PORT: Remove emacs module declarations from SWI-Prolog.h The symbols
must be exported, but we should not declare them as part of the API
as that prevents building the sweep module. In MSVC the linkage
options for exported and imported data is different. -
FIXED: Recompilation logic may use an erased clause If the newly
compiled clause is equal to the “current” clause, the new clause is
destroyed and the old is kept. We must however check that the “old”
is not yet erased. -
FIXED: Message translation for trace(Head, Ports) getting location
of predicate wrong and ansi_hyperlink/3 printed the URL rather than
the label if the terminal does not support hyperlinks. -
ENHANCED: Avoid dependency of library(ansi_term) on package clib
-
ENHANCED: ansi_get_color/2 to use stream timeouts Old version used
call_with_time_limit/2, but this is in a library, pulls in a shared
object dependency and requires threads. -
BUILD: Allow building the manuals in non-Unix environments.
-
PORT: Find local home more flexible. Normally swipl is in
src
, but
using some backends there can be a configuration directory in between. -
PORT: Property configure threads for packages.
-
FIXED: bf_set_ui(): uint32_t >> 32 is undefined.
-
CLEANUP: signed/unsigned and other warnings for bf_gmp.c
-
CLEANUP: Resolve signed/unsigned comparison and negation of unsigned
ints. -
PORT: Make multi-threading work with MSVC version - Allow using
vcpkg packagepthreads
for threading. - Port atomic operations
to use the MSVC _Interlocked* intrinsics - Sync thread config for
swipl-win.exe with libswipl.dll. -
PORT: Make LibBF compile using MSVC Now compiles with many warnings.
Basics seem to work. -
PORT: Empty struct support for pl-wam.c
-
FIXED: set_prolog_gc_thread/1: no-op in the single-threaded version.
-
PORT: Introduce free() for LibBF memory management. LibBF uses
realloc(ptr,0)
rather than free, but this is not-portable and
flagged by the latests versions of valgrind. -
BUILD: Work around problem generating Unix Makefiles
-
CLEANUP: Remove swipl.home and swipl.rc from the source root dir.
-
PORT: Fix various warnings generated by MSVC2022
-
BUILD: Simplify build_home.pl
-
BUILD: More patches to allow building as a CMake subdir. These patches
notably deal with the package locations and documentation. -
BUILD: Allow building as a sub project from a larger CMake project This
patch replaces use of CMAKE_SOURCE_DIR with CMAKE_CURRENT_SOURCE_DIR,
so we can doadd_subdirectory(swipl)
in a larger project.
-
FIXED: Typo in check_installation/0 (syntax error)
-
PORT: WASM: Do not try to get ioctl support.
Package clib
-
TEST: Use PlUnit for the socket tests.
-
FIXED: udp_receive/4: did not pass address parameters correctly.
-
PORT: MSVC Avoid issues with different address length and buffer
size types. -
PORT: Support MSVC. Mostly silence warnings, improved types,
fixed headers.
Package cpp
-
PORT: MSVC work-arounds for compiling the tests. MSVS requires
C++20 for the blob type initialization. -
FIXED: likes.cpp sample code
Package http
-
FIXED: Several predicate options declarations.
-
PORT: Support MSVC Cleanup types.
Package inclpr
- PORT: MSVC Cleanup old code.
Package ltx2htm
- PORT: Support MSVC Silence warnings, cleanup types.
Package mqi
- BUILD: Avoid dependency on
CMAKE_SOURCE_DIR
Package nlp
- PORT: Suppress MSVC warnings
Package odbc
- PORT: MSVC Cleanup types (introduce more size_t)
Package pcre
- PORT: MSVC Avoid type warnings.
Package pengines
- FIXED: Predicate option declarations.
Package protobufs
- PORT: MSVC Cleanup float32 and int32 handling.
Package semweb
-
FIXED: Predicate options declarations.
-
PORT: MSVC Type cleanup, added atomic versions.
Package sgml
-
PORT: MSVC More portable types and avoid possible overflows by
using size_t -
PORT: Support MSVC Suppress warnings, support MSVC atomic intrinsics.
Package ssl
-
PORT: MSVC Make configure work by removing z.lib dependency when not
using MinGW and avoid several type errors. -
PORT: MSVC doesn’t allow for array declaration from
const int
.
Also use MSVC intrinsics for atomic operations. -
FIXED: Return type for Prolog term.
Package sweep
-
PORT: MSVC Need to get DLL linkage correct. This also requires a
change in SWI-Prolog.h -
PORT: Include local copy of emacs-module.h in case this is not
provided.
Package swipy
-
ADDED: Allow evaluation of arguments. If the construct Obj:Method
or Module:Func is encountered in a data structure it is evaluated. -
FIXED: Support Unicode attribute and function names.
-
ADDED:
built_in
pseudo module Allows for
py_call(built_in:print(“Hello”)) in addition to
py_call(print(“Hello”)). This patch also allows evaluating a plain
atom to its module for consistency. Finally, this patch avoids a
crash on py_call(sys, R). -
FIXED: Avoid string stack overflow calling Prolog from Python
-
FIXED: px_comp() when using DELAY_LISTS
-
ENHANCED: Avoid conflict with Python module “swipl” As janus.py
first tries to loadswipl
it may load the FFI based interface to
SWI-Prolog. We renamed the internal module to_swipl
to avoid
that possible conflict. -
FIXED: Calling methods with only keyword arguments
-
PORT: MSVC Pragma cleanup and cleaner way to deal with Python3.dll
compatibility library
Package table
- PORT: MSVC
Package tipc
- FIXED: library(tipc/tipc_linda): Did not load
library(tipc/tipc_broadcast).
Package xpce
-
FIXED: Windows possible memory corruption due to long/intptr_t mismatch
-
PORT: MSVC - Avoid dependency on globbing in CMake command by
using CMake file(GLOB) - Suppress compiler warnings on data loss and
signed/unsigned types - Small typing cleanup. - Avoid RedrawWindow()
(renamed to pceRedrawWindow()) - Fix SendFunc casting - Avoid conflict
over “small”!? -
PORT: Include Win32 port of Xpm dependency This simplifies the
build process. The code has been included and updated to avoid many
compiler warnings. -
PORT: C11 compatibility
-
BUILD: Copy
swipl-rc
tohome/xpce/prolog
This is the only file
that required running the binary without installation that was in
the source. By copying it to the binary pre-stage home dir we can
greatly simplify build_home.pl
Package yaml
- PORT: MSVC
Package zlib
- FIXED: Predicate options declarations.