Dear SWI-Prolog user,
SWI-Prolog 9.1.15 is ready for download. The changelog is long.
Various changes to the CMake files that allow adding the
entire SWI-Prolog source tree using CMake’s
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
BUILD: Avoid dependency on Threads::Threads when building single
threaded. This applies to the packages and blocks e.g., the WASM
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
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
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
PORT: Make multi-threading work with MSVC version - Allow using
pthreadsfor 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 do
in a larger project.
FIXED: Typo in check_installation/0 (syntax error)
PORT: WASM: Do not try to get ioctl support.
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
PORT: Support MSVC. Mostly silence warnings, improved types,
PORT: MSVC work-arounds for compiling the tests. MSVS requires
C++20 for the blob type initialization.
FIXED: likes.cpp sample code
FIXED: Several predicate options declarations.
PORT: Support MSVC Cleanup types.
- PORT: MSVC Cleanup old code.
- PORT: Support MSVC Silence warnings, cleanup types.
- BUILD: Avoid dependency on
- PORT: Suppress MSVC warnings
- PORT: MSVC Cleanup types (introduce more size_t)
- PORT: MSVC Avoid type warnings.
- FIXED: Predicate option declarations.
- PORT: MSVC Cleanup float32 and int32 handling.
FIXED: Predicate options declarations.
PORT: MSVC Type cleanup, added atomic versions.
PORT: MSVC More portable types and avoid possible overflows by
PORT: Support MSVC Suppress warnings, support MSVC atomic intrinsics.
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
Also use MSVC intrinsics for atomic operations.
FIXED: Return type for Prolog term.
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
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.
built_inpseudo 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 load
swiplit may load the FFI based interface to
SWI-Prolog. We renamed the internal module to
that possible conflict.
FIXED: Calling methods with only keyword arguments
PORT: MSVC Pragma cleanup and cleaner way to deal with Python3.dll
- PORT: MSVC
- FIXED: library(tipc/tipc_linda): Did not load
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
PORT: Include Win32 port of Xpm dependency This simplifies the
build process. The code has been included and updated to avoid many
PORT: C11 compatibility
home/xpce/prologThis 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
- PORT: MSVC
- FIXED: Predicate options declarations.