Ann: SWI-Prolog 9.0.0

Dear SWI-Prolog user,

SWI-Prolog 9.0.0 is ready for download. This is a new release for the
stable branch and merges the current swipl-devel.git. Version 9 is
largely compatible to version 8.4.3. Please check entries tagged
MODIFIED: below. Version 9 mostly consolidates a long chain of
changes over the 8.x series. Highlights compared to 8.4.3 are:

  • Windows support for full Unicode (UTF-16) and handling of long
    file names.
  • Build the Windows version using MSYS2. By @mgondan1
  • Run SWI-Prolog in the browser (WASM port).
  • Allow building a fully static binary including foreign
    extensions (used for WASM)
  • Allow yielding the VM, including scheduled yields for
    every N inferences.
  • If we do not use the GNU GMP library for bignums, the system
    falls back to LibBF and provides exactly the same functionality.
    LibBF is licensed under MIT, providing the entire system under
    permissive license conditions. For now, notably performance for
    rational number arithmetic is significantly slower.
  • Updated pcre (Perl Compatible Regular Expression) to pcre2,
    including many feature updates and much more comprehensive
    testing. By @peter.ludemann
  • Better organization of extension dependencies and adjustment
    of the test suite for different configurations.
  • A new C++ interface (SWI-cpp2.h) by @peter.ludemann.
  • A new GNU-Emacs interface called sweeprolog by @oskardrums
  • Moved core C sources to C11.
  • Many enhancement to IDE tooling.
  • A lot of code cleanup, reducing compiler warnings.
  • Support embedded hyperlinks in terminal output using
    ANSI escape sequences.

Notes on the status

  • The new C++ has some minor issues that are still being discussed.
    After these are settled there may be (minor) incompatible updates.
  • The Emacs sweep mode may also receive incompatible updates.

And of course, many bug fixes and small improvements. Thanks for all
the feedback, pull requests, etc. that made this version possible.

SWI-Prolog Changelog since version 8.4.3

  • ENHANCED: library(main) to delay looking for tspy/1 or gspy/1 until
    the option is activated.

  • FIXED: Make X11 event dispatching work in single threaded version.

  • TEST: Avoid testing stuff that requires threads in the single threaded
    version.

  • CLEANUP: Do not compile code required for multi-threaded loading in
    the single threaded version.

  • DOC: format/1-3: document behavior of ~0f.

  • CONFIG: Do not install thread libraries for single threaded version.

  • MODIFIED: When ISO mode is enabled, unknown options are result in a
    domain error. This now also holds if the option argument is a dict.

  • MODIFIED: Ssprintf() and Ssnprintf() functions now use UTF-8 encoding
    (used to be ISO Latin 1), so they can handle Unicode.

  • ENHANCED: Use xref_source/2 for fetching PlDoc comments from loaded
    sources. Patch by @swi.

  • PORT: Provide backtrace with line numbers on MacOS using atos
    as replacement for addr2line.

  • ADDED: prolog_interrupt/0 to make a thread behave as if SIGINT is
    received using thread_signal/2.

  • FIXED: Do not reload system files to get their documentation.

  • PORT: More integer passing problems over vararg functions.

  • FIXED: Prolog flag pid on some 64 bit platforms.

  • PORT: Use CMake to test for <threads.h> support.

  • MAINTENANCE: Provide a Prolog flag asan when the system is compiled
    with AddressSanitizer.

  • INSTALL: When using -DSWIPL_INSTALL_IN_LIB, make sure that the
    CMake export files can be relocated.

  • WASM: Avoid undefined HTMLCollection.toList(). Emacs whitespace update

  • MODIFIED: pack_install/1 and friends to pass all environment variables
    to the tools that may be executed to build the pack.

  • PORT: Issue#1070: pack_install/1: Pass PKG_CONFIG_PATH to build
    tools

  • FIXED: format/2,3: manage proper arithmetic environment for
    expressions.

  • PORT: Make LibBF code compile for Clang

  • FIXED: fetch/restore of Mersenne Twister random state. Also reduced
    the size of the state.

  • MODIFIED: **/2 and ^/2: If the power can be done using rational
    arithmetic but the numbers are too big, make the behaviour depend on
    max_rational_size_action. When float, try to continue after float
    conversion, else raise a resource error.

  • FIXED: **/2 and ^/2 overflow checking when computing the power of
    two rational numbers.

  • ENHANCED: Prefer mpz_sgn() over mpz_cmp_ui() to 0.

  • ENHANCED: Key generation for bignum and rational clause indexing

  • ADDED: BF_FTOA_PL_QUIRKS for correct float formatting.

  • MODIFIED: CMake target_link_swipl() now removes the lib prefix.

  • PORT: Updated MacOS dependencies

  • FIXED: swipl.cmake outside pack_rebuild/2 context gets linking against
    libswipl wrong.

  • FIXED: Issue#163: -s and -l files were loaded before the argv Prolog
    flag is cleaned.

  • ADDED: prolog_walk_code/1: option walk_meta_predicates(+Boolean) to
    prevent the code walker from considering meta-predicates. There are
    few cases where this is interesting, but it was needed for constructing
    a s(CASP) dependency graph.

  • DOC: Document (part of) the PL_cvt_i_() functions and improve
    documentation for several of the PL_get_
    () and PL_get_*_ex()
    functions.

  • ADDED: PL_get_bool() now also accepts the integers (0,1)

  • PORT: set RPATH correctly on MacOS for native libs in packages

  • ADDED: PL_cvt_i_llong() PL_cvt_i_ulong() and PL_cvt_i_bool().
    This completes the types supported by these functions.

  • ADDED: listing/1,2 to also accept a clause reference as entity to list.

  • INSTALL: control registry view with CPACK_NSIS_ONINIT_REGVIEW

  • FIXED: Possible crash due to mistake in handling --home changes.

  • FIXED: Issue in recursion checking of print_message/2.

  • PORT: Include Emacs interface in MacOS bundle

  • MODIFIED: Removed an ancient mechanism for finding the Prolog home
    directory from a magic string in the binary. Changed plain -home
    to print the home directory and exit (used to ignore and run).

  • WASM: Maintain a stack of open queries such that we can detect when
    we act on a query that is not the innermost. Currently only prints
    to the console.

  • WASM: By default load scripts and files into the user module.

  • PORT: Emscripten does not set CMAKE_EXECUTABLE_FORMAT. As all
    this is meaningless with statically linked WASM version we do not
    set the executable_format and libswipl flags

  • ADDED: prolog_walk_code/3 option on_edge which is similar to
    on_trace, but provide easier to understand source locations.

  • FIXED: Add ‘$seek_list’/4 to library(sandbox). Breaks nth1/3 and
    nth0/3.

  • FIXED: Make Prolog backtrace work in ISO mode.

  • FIXED: Big integer to float (mpz_to_double()) to_nearest, half to
    even rounding and also a couple of minor cosmetic changes.

  • ADDED: Extend check_installation/0 with sweep.

  • ADDED: new flags executable_format and libswipl New read-only Prolog
    flags determined at swipl compile time. These flags are intended
    to allow package sweep to determine if libswipl needs to be loaded
    ahead of sweep-module (when executable_format=elf), and if so to
    locate libswipl.

  • WASM: Shell: make edit/1 work to show source of the libraries.

  • WASM: Shell: allow collapsing the answers to a query.

  • WASM: Enhanced :=/2: get global variables using eval() such that
    it also works on Node and raise a Prolog exception in case something
    goes wrong.

  • WASM: Shell: add splitter to allow changing the distribution of the
    output and editor.

  • WASM: make shell demo console output more structured.

  • WASM: Shell: add examples from the server

  • WASM: Added fetch/3 as public function of library(wasm).

  • WASM: Cleanup js_script/2 to simply call _ := eval(String).
    This also makes this work in Node.

  • WASM: Make Prolog.call() and Prolog.forEach() call by default in the
    user module rather than system.

  • FIXED: help/1: avoid problems with modules that are also section
    labels. @swi.

  • WASM: Use CodeMirror in shell.html (from CDN such that we do not need
    to grow our distribution).

  • WASM: Make local compilation not use sig_atomic/1 as that breaks
    yielding and we have no signals anyway.

  • ADDED: Support conditional compilation in boot/init.pl

  • DOC: updated manual section about GNU Emacs interfaces

  • ADDED: flag libswipl_dir holding the installation dir of libswipl

  • WASM: Extend data transformation in :=/2 and improve documentation.

  • FIXED: WASM: await if the promise returns a compound term or list.

  • WASM: :=/2 should pass a list as data instead as a call on
    '[|]'(h,t).

  • WASM: Documentation updates and LaTeX fixes to the docs.

  • WASM: Do not use undocumented interfaces in test/demo.

  • WASM: Issue#1052: make output of Prolog.query().once() easier to
    handle.

  • FIXED: help/1 for normal built-in predicates (broke after support
    for user predicates). Patch by @swi.

  • ADDED: Colour test/1 and test/2 heads and classify them as tests when
    inside a unit test body.

  • ADDED: library(prolog_xref): Make aware of unit tests

  • ADDED: Allow help/1 on user predicates. Contributed by @swi

  • ADDED: make_reload_file/1 to make correct reloading of a file public.

  • TEST: Add additional float rounding test cases for various integer
    sub-types.

  • ENHANCED: New (faster) function for converting bigints (MPZ) to float
    Also includes minor adjustments for some mpz_fdiv rounding modes.

  • DOC: Fixed LaTeX errors

  • ENHANCED: Replace mpz_fdiv() with a version that rounds to nearest.

  • CLEANUP: Introduce mpz_to_double()

  • FIXED: Added missing import for pi_head/2 in library(prolog_xref).

  • PORT: swipl --abi-version: VM signature hash depended on big/little
    endian.

  • ADDED: PL_atom_mbchars() to extract text from an atom in various
    encodings.

  • ADDED: PL_cvt_i_[u]int32() for consistency.

  • PORT: Avoid false alarm warning from gcc on 32-bit Windows.

  • PORT: Windows: fixed compilation of the DDE interface after adding
    FUNCTOR_error1 to the core system.

  • FIXED: Instantiation error in cross-referencer.

  • FIXED: xref_source/1: avoid lazy definition of predicates in user
    by calling predicate_property(user:Goal, ...).

  • FIXED: prolog_set_IO/3: stderr wrapper interpreted return code from
    low-level output wrong. This causes problems if output is connected
    to a socket as used by prolog_server/2.

  • ENHANCED: Make toplevel quit nicely if the I/O streams are in error
    state.

  • ADDED: stream_property(S, error(Boolean)).

  • PORT: Msys2, fix LibDir for swipl in build env

  • ADDED: sweep package - integration with GNU Emacs

  • FIXED: Windows: directory_files/2 and other directory access for
    long paths. Fixed by @mgondan1. Thanks!

  • ENHANCED: portray_clause/1: add space after (?- goal).

  • WASM: Avoid error on HTMLCollection on node

  • FIXED: Windows: long file support was broken again.

  • FIXED: Handle reexport/1 and reexport/2 properly in multi-file
    .qlf files. Reported by @swi.

  • DOC: syntax error handling in conditional compilation.

  • ENHANCED: ^ and ** arithmetic operator optimization for small integer
    use cases to avoid relying on GMP. This patch also uses integer
    exponentiation when compiled without GMP when possible and handles
    all special cases compatible with the GMP based version.

  • ENHANCED: Use __builtin_mul_overflow() when available to do fast
    overflow-safe multiplication.

  • TEST: Silence syntax error on a rational number when compiled without
    rational support.

  • MODIFIED: When inside code fragment under conditional compilation
    where the code is ignored, do not report syntax errors.

  • WASM: Added CHAT80 demo.

  • FIXED: Prolog.Compound.toJSON()

  • WASM: Avoid dependency on HTMLCollection to run on node.

  • MODIFIED: WASM: Prolog.consult() now calls load_files/1, allowing it
    to handle a mixture of local files, URLs as well as Prolog sources
    and .qlf files. The sources are now processed sequentially and
    are no longer materialised as files.

  • DOC: Improved WASM documentation.

  • ADD: License to CBG Chords example

  • ADDED: qcompile/2: option include(user). This option allows for
    compiling an application into a single Prolog .qlf file.

  • ADDED: load_files/2: option if(Cond) is extended with exists to
    silently not load a file if it does not exist.

  • FIXED: det/1 was not declared as a proper meta-predicate.

  • WASM: Allow translation of JavaScript ArrayBuffer into a Prolog
    byte-string. This allows extracting binary data from Response.blob()
    and is used by the WASM compilation hook to allow loading .qlf
    files from URLs.

  • BUILD: Allow building with AddressSanitizer on Clang. Based on
    patches by Alessandro Bartolucci. Thanks!

  • DOC: More WASM documentation.

  • ENHANCED: notrace/1: avoid callback through C. This avoids possible
    C stack overflows and allows yielding from below notrace/1.

  • MODIFIED: WASM: Renamed js_yield/2 to await/2 and js_can_yield/2
    to is_async/2.

  • FIXED: Possibly dangling tref->trie pointer when shared tabling
    creates the same variant table in two threads and disposes one of them.
    This hopefully addresses issue#1041. It surely fixes a bug though.

  • FIXED: Possible corruption of tries. By using PL_BLOB_UNIQUE we
    good reuse an atom after freeing the trie and creating a new one at
    the same address. As we save the symbol anyway, making use of unique
    atoms is meaningless here.

  • WASM: Make ‘$confirm’/2 hookable and implement it by means of the
    browser confirm() function.

  • WASM: Make URL compilation work on slow connections and connections
    that do not provide a modification time through a HEAD request.

  • FIXED: Exception preservation in undo/1

  • WASM: Allow compiling from a URL.

  • WASM: js_yield/2: if the result is a single JavaScript string, return
    it as a Prolog string for reducing garbage.

  • FIXED: source_file/2 in mode (-,+) never reported any files.
    Breaks coverage analysis tool.

  • FIXED: on_signal/3 for SIGINT called the handler asynchronously.
    This should only happen if SIGINT is bound to the debug
    handler. Reported by Raivo Laanemets.

  • WASM: Added is_object/1,2 to test Prolog terms for being a JavaScript
    object reference (of some class).

  • WASM: Added pseudo function instanceof() to expression evaluation.

  • WASM: Ported Paul Brown’s Tau-Prolog example.

  • ADDED: library(dom), providing Tau-Prolog compatible DOM
    interaction. Partial implementation.

  • WASM: Added Prolog.load_string() and Prolog.load_scripts()

  • WASM: Typos in docs and mixup of arguments in rational numbers.

  • WASM: Re-implement sleep/1 using an abortable Promise.

  • WASM: Introduce the notion of abortable promises.

  • WASM: Wrap js_yield/2 to forward exceptions.

  • DOC: Started adding WASM documentation to main manual

  • WASM: Added js_can_yield/0.

  • WASM: Use a WeakMap rather than additional attributes to get the
    reverse object --> id mapping

  • WASM: Return all objects except for instances of “Object” by reference
    rather than as a dict.

  • WASM: Print blobs that embed JavaScript objecs as <js_Class>(Ref)
    rather than <js_object>(Ref).

  • ADDED: js_yield/2 may be passed a promise, causing Prolog to wakeup
    when the promise is resolved.

  • ENHANCED: PL_unify_bool() accepts same atom values as
    PL_unify_bool_ex() and PL_get_bool()

  • ENHANCED: js_yield: get return value as term.

  • ENHANCED: js_yield: allow passing a term rather than a string.

  • INSTALL: Windows: Copied deleting the Uninstall registry key to the
    64 bit section.

  • WASM: Much restructuring to prolog.js. Add Prolog.forEach() and
    Prolog.abort() to remain responsive when running slow queries.

  • FIXED: Backtracking after a foreign yield.

  • DOC: remove outdated restriction regarding and {} as operators

  • ENHANCED: prolog_colour:colourise_db/3: process asserted bodies

  • FIXED: prolog_colour:qualify_op/3: recognize as an operator.
    Use SSU rules.

  • CLEANUP: Moved default output routines to the core and Prolog
    class. Simpified and documented the shell.html and test.html examples.

  • WASM: Simplify starting the WASM version by moving more defaults into
    swipl-web.js.

  • FIXED: Windows: this registry key is not deleted by Uninstaller.exe
    Unistalling swipl at Windows 10 Add/Remove App window should now work

  • DOC: Add missing failure return info for more more foreign functions.

  • WASM: Use an unbound tag for dicts created from JavaScript objects.
    If the class is not “Object”, bind the Prolog tag to the JavaScript
    class name.

  • WASM: Introduce classes for Prolog objects we cannot represent
    naturally in JavaScript such as variables, compounds, etc.

  • CLEANUP: Large rewrite of WASM prolog.js to use ES6 class syntax
    for the Prolog class.

  • MODIFIED: WASM: representation of rational numbers.

  • WASM: Use -s BIGINT to exchange Prolog integers up to 64 bits.
    Update Prolog.get_integer() to return values as JavaScript number when
    possible and JavaScript bigint otherwise. Updated Prolog.toProlog()
    to convert bigint to a Prolog large integer.

  • TEST: Added test for Windows NUL files

  • FIXED: Issue#153: Windows: can no longer open reserved files such as
    nul. Reported by Paulo Moura.

  • DOC: Fix typos, clarify return codes and error conditions for many
    foreign language interface functions (PL_*()).

  • FIXED: If creating an atom fails due to invalid representation of the
    source text (e.g., invalid UTF-8 sequence) we now raise an exception.

  • WASM: Using node we by default have no control over the terminal.
    Need to find out whether it is possible to make that work.

  • TEST: Lower test recursion on systems with limited C stack

  • WASM: Disabled IEEE754 tests as float rounding does not appear to be
    suported and many WASM float functions are imprecise.

  • WASM: Do not support open(pipe(Command), …) as popen() is a dummy.

  • FIXED: transaction/1 in single threaded version.

  • ENHANCED: Simplify clause visibility rules with transactions.

  • PORT: Windows: install a copy of libstdc++*.dll while building and
    add this to the installer if INSTALL_TESTS is active.

  • PORT: Be more conservative with C stacks on WASM. Fixes dealing with
    cyclic terms in assert/1 and friends.

  • BUILD: make_library_index/1 to silently ignore errors from
    use_foreign_library/1. This works around a dependency issue for
    building the INDEX.pl files during build. This is not ideal as in
    theory we could do exports conditionally based on what is in the
    foreign object. At this moment this does not happen.

  • MODIFIED: qsave_program/2 and compilation using -c to interpret the
    --emulator=file`` flag (or emulator(Emulator) option) independently from the –stand-alone`` option. This allows creating non-stand-alone
    executables that use a specific emulator path.

  • TEST: When using -DINSTALL_TESTS, install foreign plugins that
    only support testing.

  • DOC: Describe the design of the Windows file system interaction and
    its limitations.

  • ENHANCED: Test Windows file identify using the device identifier to
    deal with links.

  • TEST: Added more file name tests.

  • FIXED: Windows: turned ‘$mark_executable’/1 into a dummy as it does
    nothing meaningful anyway.

  • FIXED: Windows opendir(), etc. emulation. Use more efficient file
    finding and avoid a possible inifinite loop.

  • ENHANCED: expand_file_name/2: provide signal handling while expanding
    such that we can interrupt.

  • FIXED: Windows working directory to use SetCurrentDirectoryW() for
    supporting longer path names.

  • FIXED: Sprintf() for wide character strings with surrogate pairs.

  • FIXED: Sprintf() for NULL char * that have non-ASCII encoding.

  • FIXED: Windows implementation of size_file/2 to use
    GetFileAttributesExW() because _wstati64() cannot handle long file
    names.

  • ENHANCED: Windows: Use more robust translation to Windows path
    names. Support long file names using the "\\?\" or "\\?UNC\"
    prefix.

  • FIXED: Windows dlopen() emulation path handling.

  • ENHANCED: fallback to the default mem functions in the GMP hooks…
    …when invoked out of the context of Prolog.

    See
    Sweep: SWI-Prolog Embedded in Emacs
    for relevant discussion.

  • FIXED: Windows conversion to UTF-16 file names to introduce surrogate
    pairs when needed.

  • MODIFIED: expand_file_name/2 return entries in simple lexical order
    rather than using mbscoll(). The latter did not work anyway because
    the pattern and file names use UTF-8 rather than native multibyte.

  • FIXED: existence checking on Windows for expand_file_name/2

  • FIXED: Windows: do not canonicalize characters of file names > 0xffff
    using towlower() as this function truncates to 16 bits. Assumes there
    are no letters with case above 0xffff.

  • FIXED: Windows: translation of wchar_t to UTF-8 for surrogate
    pairs. Fixes e.g. ?- string_bytes('\U0001f600\U0001f604', L, utf8).

  • FIXED: Windows: ensure surrogate pairs to the console streams are in
    the same WriteConsoleW() call. This fixes writing Unicode code points >
    0xffff to user_error. The patch also writes output to user_error
    in larger chunks. Note that the default Windows console does not handle
    surrogate pairs. The Windows Terminal does.

  • DOC: Describe poor exceptions from failing file system operations.

  • FIXED: Actually use overruled PATH_MAX in uxnt.c emulation.

  • DOC: rename_file/2: updated docs.

  • ADDED: Prolog flag path_max to get access to the manimum file name
    length on the OS.

  • FIXED: string_bytes/2 in mode (+,-) for UTF-16 encoding on
    Windows. Reported by Matthias Gondan.

  • PORT: Emscripten updates: Move required settings to Emscripten.cmake
    and add support for GMP

  • DOC: Make compile if library(shlib) is not present

  • FIXED: Issue#1025: stream encoding wchar_t not returned as stream
    property

  • FIXED: Issue#1021: engine_next/2 for a next answer when the previous
    return was due to a yield crashes.

  • FIXED: WASM Issue#1023: sleep/1 no longer worked.

  • BUILD: Dependency issue for building the library indexes. After
    comments and a hint by Matthias Gondan.

  • TEST: Avoid more tests that depend on threads in single threaded
    version.

  • WASM: library(readutil): use shared use_foreign_library/1.

  • WASM: Include http into wasm version

  • WASM: Activate STATIC_EXTENSIONS and include (part of) the clib
    package.

  • BUILD: Build option cmake -DSTATIC_EXTENSIONS which adds selected
    extensions (packages) to libswipl. In this scenario dynamic linking
    is disabled and use_foreign_library/1 is adjusted to call the already
    existing install function of the extension.

  • WASM: Added calling JavaScript from Prolog, exchange DOM elements
    and adding scripts from Prolog.

  • WASM: Renamed js_call/1 to js_run_script/1 for consistency

  • WASM: Avoid the need for a frame in Prolog.query(String).

  • WASM: Provide Prolog.message_to_string()

  • WASM: Allow a frame to discard all data

  • WASM: Many changes to calling Prolog from JavaScript. These patches
    work to more high level interaction with Prolog from JavaScript.
    This work should be considered experimental.

  • WASM: Perform UTF-8 decoding on output such that we can write Unicode.

  • WASM: Handle sleep/1 using JavaScript setTimeout()

  • WASM: Allow _ in file names.

  • WASM: Reduce auto-yield frequency and avoid the event loop when < 20ms.

  • WASM: Focus on input next/stop when requested.

  • WASM: Set default package list to plunit, chr and clpqr

  • WASM: Extended shell.html demo. Working asynchronous behavior, command
    line history and persistent files in localStorage and manage files.

  • WASM: Many extensions to calling Prolog from JavaScript. Added support
    for (auto) yielding to achieve asynchronous behaviour in the browser.

  • ADDED: heartbeat mechanism: by setting the Prolog flag heartbeat, the
    multifile predicate prolog:heartbeat/0 is called every N inferences.

  • FIXED: PL_yield_address() (foreign yielding) effectively popped one
    level of the foreign frame stack.

  • WASM: Updated instructions in CMAKE.md. “Native friend” is no
    longer needed.

  • WASM: Pass -s ALLOW_MEMORY_GROWTH=1 to allow for bigger stacks.

  • WASM: libswipl should not be a dynamic library on emscripten

  • WASM: Attempt to support threads. Compiles, but doesn’t work on
    either Firefox or node.

  • WASM: Addes js_call/1 to call JavaScript

  • WIP: trying to deal with reading.

  • WASM: added ttymode() to Prolog JavaScript API.

  • WASM: Minimal running example.

  • CLEANUP: Type safety of property enumerators

  • CLEANUP: get rid of function pointers without declared arguments.

  • WASM: Make init argv default

  • WASM: Put file system as /swipl and make this the Prolog home.

  • WASM: Avoid absolute path messages when linking swipl-web

  • FIXED: autoloading: read the module header using operators from the
    system module to avoid user operator declarations to cause a failure
    reading this.

  • ENHANCED: Performance tuneup - reduce number of arithmetic operations
    for pivot - replace one call to lists:member/2 with memberchk/2

  • ENHANCED: Optimize nth1/3 using ‘$seek_list’/4

  • DOC: Add => to the operator table.

  • ADDED: PL_get_stream_from_blob()

  • PORT: config/win32.h and config/win64.h have been removed.

  • DOC: Various updates to blob API (notably flags).

  • FIXED: Issue#1015: Small memory leak

  • CLEANUP: Windows: move config parameters to common CMake infrastructure
    instead of using the dedicated hard-coded values.

  • BUILD: Determine architecture from CMAKE_SYSTEM_PROCESSOR and
    CMAKE_SYSTEM_NAME rather than their HOST counterparts.

  • DOC: setarg/3: point at arg/3.

  • FIXED: setarg/3 to unify always when the first argument is a
    variable. Abramo Bagnara.

  • TEST: Do not run cyrillic file tests if the text encoding cannot
    represent them.

  • TEST: Set UTF-8 encoding.

  • DOC: setarg/3 if the designated argument is a variable.

  • ENHANCED: C version of nth0 to be more consistent with the Prolog
    implememtation and allow for interupts.

  • ENHANCED: performance for nth0/3 in mode (+,+,?)

  • PORT: Issue#1009: Avoid conflict between Qt and swipl-win target.

  • PORT: Suppress uninit warning in msys2 I think this can safely be
    initialized to FALSE

  • FIXED: user_or_explicit autoload mode not working

  • FIXED: make_library_index/1 to use the xref flag while reading the
    file header. Avoids unwanted term expansion.

  • PORT: WASM version: statistics/2 cputime now actually returns
    walltime since the start of Prolog. This allows for basic performance
    evaluation on CPU based tasks. WASM does not provide primitives to
    access the actual CPU time usage.

  • PORT: Make compile again in WASM. Reported by Jos de Roo

  • FIXED: string_bytes/3 to ascii: avoid crash and raise an exception
    if the text cannot be represented using ASCII.

  • FIXED: string_codes(+,-,octet) (crashed on assertion error)

  • FIXED: write/1 for strings using UTF-16 encoding (Windows).

  • ENHANCED: base64_encoded/3: added option encoding(Encoding) and
    bootstrap base64/2 and base64url/2 from this predicate. base64url/2
    now used UTF-8 encoding (MODIFIED).

  • ADDED: string_bytes/3, get the bytes for representing a (Unicode)
    string in a given encoding.

  • FIXED: Avoid C-stack overflow in recursive C->Prolog->C calls by
    demanding a minimum of 100Kbytes stack before calling Prolog.

  • FIXED: pack_install/1: if the pack is already installed at an older
    version, upgrade it.

  • ENHANCED: Make git probe silent on all possible errors.

  • FIXED: GIT URLs must be a valid absolute URL to begin with

  • FIXED: pack_install/1: version comparison for already installed
    versions.

  • ADDED: PL_scan_options() public API to deal with option lists.

  • ADDED: pack_install/1 to test whether a URL is a GIT URL using
    git_remote_branches/2.

  • MDOIFIED: Fixed various internal recoding issues to ENC_WCHAR.
    These changes also ensures canonical text as used for atoms and strings
    only contain valid Unicode code points. As a result, passing invalid
    strings to Prolog using the foreign API may result in a failure.

  • DOC: Unicode and UTF-16 issues.

  • MODIFIED: Be consistent about valid character codes. These are the
    Unicode code points 0…U+10FFFF, while the range reserved for UTF-16
    surrogate pairs is excluded (U+D800…U+DFFF).

  • DOC: Base64 encoding issues.

  • PORT: add_package_path/1 also under Windows This change allows for
    a GNU-style directory structure also under Windows.

  • DOC: Rename section label for the statistics section of the manual to
    avoid a clash with the library documentation, hiding statistics/2 docs.

  • TEST: Avoid surrogates for all encodings

  • UTF: Fixed length handling in setenv/2.

  • PORT: Replace most wint_t by int for character classification purposes
    because Windows wint_t is 2 bytes, so we cannot classify anything

    0xffff

  • UTF: atom_concat/3 can now handle UTF-16 sequences.

  • UTF: Make PL_cmp_text() and PL_unify_text_range() deal with UTF-16
    strings.

  • CLEANUP: sub_atom/5: more consistent typing and better reuse of
    primitives. This patch fixes handling atoms longer than 2G code points

  • FIXED: Reading terms from Unicode symbol sequences.

  • ADDED: Use UTF-16 for canonical text on Windows. This is a first
    step that implements some of the basic handling for creating and
    writing atoms with code points > U+FFFF

  • MODIFIED: Official encoding names for UTF-16. Now also allows
    aliases for the IANA names for specifying the encoding (UTF-8,
    UTF-16BE, UTF-16LE).

  • ENHANCED: Allow reading and writing UTF-16 files.

  • PORT: MSYS2, add MINGW_PREFIX/bin to dll search

  • MODIFIED: PL_get_char() now returns a domain or representation error if
    the code is outside the Unicode range (domain) or cannot be represented
    by the system (representation).

  • FIXED: built-in option list processing should raise a type error if
    the list is cyclic.

  • FIXED: incr_invalidate_calls/1: succeed if no tabling happened in
    the calling thread yet (and thus there is no variant table).

  • ADDED: Allow floats from other scripts.

  • DOC: various Unicode related updates, including handling of non-ASCII
    decimal number characters.

  • MODIFIED: Make the Prolog parser parse decimal numbers in other
    scripts to integers.

  • ADDED: char_type/2 type decimal.

  • MODIFIED: Updated character classification for read/1 and friends to
    be based on Unicode 14.0.0

  • MODIFIED: Updated to Unicode 14.0.0 (from 6.0.0)

  • CLEANUP: library(unicode/unicode_data) to avoid conflict with table/1.

  • MODIFIED: win_add_dll_directory/1: throw exceptions on failure rather
    than assuming failure of AddDllDirectory() indicates we need to
    extend ``%PATH%%`.

  • ENHANCED: win_add_dll_directory/2: throw normal Prolog exceptions for
    the two common reasons for this predicate to fail: non-existence of
    the target or the target not being absolute.

  • ENHANCED: building the autoload index now extracts the public
    predicates in a more generic way, processing optional #! line,
    :- encoding directives and (conditional) exports in the header.
    This notably allows for module hedaers like below. :- module(m, [p/1]). :- if(current_prolog_flag(windows,true)). :- export(win_q/2). :- endif.

  • ENHANCED: PL_record_external() deal with records > 2Gb on 64 bit
    platforms.

  • FIXED: Issue#114: Windows getenv/2 may return additional garbage
    (typically an extra \u0000 character at the end of variables of
    1023 bytes or longer because the 0-byte is not added. Paul Singleton.

  • FIXED: write_term/2 and friends handling of embrace of operants that
    are operators for partial writes.

  • FIXED: no space is required between a space and (.

  • FIXED: write_term/2 and friends: do not embrace writing a single atom
    if this is an operator and the priority(Priority) option is given.

  • FIXED: Do not close the standard streams as part of atom-GC.

  • DOC: Create links for S*() function references

  • DOC: Started documenting SWI-Stream.h

  • FIXED: Sgets() handling of non-0-terminated output from Sfgets().

  • DOC: ord_intersection/2 is semidet.

  • DIST: Fixed rmd160 generation for scripts/update-macports

  • FIXED: write_term/2 with numbervars and variable_names (#866)

  • ENHANCED: do not map I/O errors to exceptions when the error occurs as
    a result of a close that is initiated from the atom garbage collector.

  • FIXED: Issue#993: possible deadlock when loading a module. Reported by
    Sean Leather.

  • FIXED: eliminated a spurious choice-point in sub_atom/5 Reported in
    Careful with sub_atom/5 and feature request last_sub_atom/5

  • FIXED: Sfprintf(): handling of ENC_WCHAR() encoding.

  • ENHANCED: Sfprintf(): allow Unicode characters for %c

  • FIXED: PL_cleanup(): small memory leak for command line options.
    Peter Ludemann.

  • FIXED: correct arity of dynamic declaration for breakpoint_condition/4

  • DOC: enhance documentation for det/, $/1 and $/0, describing the
    exceptions and how trap/1 can be used to make the debugger act quickly.

  • ADDED: set_breakpoint_condition/2, providing conditional breakpoints

  • MODIFIED: Extend prolog:break_hook/6 to prolog:break_hook/7 …
    …adding an extra boolean argument +Debug denoting whether the
    system was in debug mode when the breakpoint was triggered.

  • FIXED: explain/1: hide references from prolog_xref:called/5

  • FIXED: Have breakpoints cleared in the UI when the clause that holds
    them is removed during a reload of the file.

  • FIXED: breakpoint_property/2: fixed character_range property

  • ENHANCED: Issue#17: reverse/2 to be deterministic if second argument
    is a proper list. Ulrich Neumerkel.

  • TEST: Added STO restriction as this test involves rational trees.

  • FIXED: Issue#122: dif/2: or-node simplification.

  • FIXED: Possible deadlock enumerating predicates from a source file.

  • TEST: Updated ^/2 tests. Move float**rat tests to test_ieee754
    for rounding mode handling.

  • ENHANCED: use ldexp() rather than pow() for multiplying a float with
    an integral power of 2. mpz_fdiv(): replace calls to pow() function
    by ldexp()

  • FIXED: rounding of pow() (^/2 and **/2) ar_pow(): Re-implement
    float**mpq case

  • FIXED: Avoid Unicode quote in library(aggregate) comment

  • ADDED: Prolog flag acg_close_streams.

  • ADDED: Sgcclose() as an extended version of Sclose() that can be
    used to avoid deadlocks when closing streams from the atom garbage
    collector.

  • MODIFIED: PL_blob_data() to return NULL if the blob has been released
    and document the consequences thereof.

  • PORT: Replace MINGW_ROOT by WIN32 I think -municode needs to be defined
    on all Windows systems that are currently supported (= several flavors
    of MinGW). MINGW_ROOT was not defined on my system, so I would like
    to change this to WIN32 to save a cmake command line switch.

  • FIXED: LaTeX conflict preventing building the PDF docs

  • PORT: Issue#83: “label can only be part of a statement” compiler error.

  • ADDED: Prolog flag vmi_builtin that controls whether or not built-in
    predicates that are defined in the VM are handled in the VM or called
    as normal predicates. The latter was previously associated with debug
    mode, but has also other purposes, such as in coverage analysis or
    when using trace/1.

  • ADDED: Low level primitives to collect information about coverage.
    This is used by show_coverage/1,2 to achieve only a modest slowdown.

  • MODIFIED: delete_file/1 to delete a read-only file on Windows for
    compatibility with other platforms.

  • MODIFIED: Windows: use GetACP() to detect that the system runs in
    UTF-8 mode and set the default encoding accordingly.

  • FIXED: Several issues to consistently deal with buffer sizes in
    os/windows/uxnt.c.

  • MODIFIED: Floating point rounding now assumes the C correctly
    implements floating points functions for the “to nearest” rounding.
    It than adds or subtracts one ulp to guarantee that the true value
    is between the downward and upward rounded values.

  • FIXED: Possible race condition importing into a module. Can lead to
    termination on a system error.

  • PORT: Consistently use PATH_MAX and raise it to 32k on Windows.

  • CLEANUP: Use POSIX PATH_MAX rather than MAXPATHLEN

  • FIXED: Source layout handling for SSU (=>) whose guard is a
    conjunction.

  • FIXED: Source layout handling for unifications against nested head
    variables.

  • FIXED: Make source layout handling aware that debug/3 and assertion/1
    may be removed by the optimizer.

  • DOC: Many enhancements to the foreign language API docs, notably
    wrt. atoms and blobs.

  • ADDED: Sopen_iri_or_file() API to allow foreign code to access the
    resources.

  • ADDED: Support repositioning streams on program resources by setting
    the buffer size to the size of the resource. This allows the IDE
    tools to run on resource files.

  • FIXED: central resource db handling by opening ``res://` may have
    streams closed early during to atom-GC.

  • ENHANCED: require/1 to simply import if the target module is already
    loaded. Reduces startup time.

  • ENHANCED: open_resource/2,3: allow opening multiple resources
    concurrently.

  • FIXED: open/3 and friends on ‘res://’ paths.

  • FIXED: fd_degree/2 and fd_set/2 for constant integer arguments.

  • DOC: added cross-references from absolute_file_name/3 to
    file_search_path/2.

  • ADDED: library(sandbox): allow declaring prolog flags as safe.

  • TEST: updated check_installation for PCRE2

  • PORT: skip dll in Rtools (only static libs)

  • ADDED: open/4 option newline(Mode).

  • FIXED: read_term/2: memory leak when reading Unicode variable names
    and reporting these using the variable_names(Names) option.

  • DOC: Updated clause/2.

  • FIXED: Memory leak reading Unicode queries at the toplevel.
    Peter Ludemann.

  • ADDED: library(sandbox): support predicate_property/2

  • DOC: PL_atom_wchars(): wrong types

  • ADDED: library(sandbox): functor/4.

  • FIXED: Windows (swipl-win.exe) clean closing of I/O.

  • FIXED: Possible wrong Windows drive letter normalisation.

  • PORT: msys2, detect libdb-6.0.dll from libdb.a

  • PORT: Msys2/clang64

  • PORT: MSYS2/clang64 the dll name appears several times in the “.a”
    file, select the first appearance

  • FIXED: PL_retry() and PL_context() to work with all integers.

  • FIXED: swipl-ld didn’t pass -I for SWI-Prolog.h any more.

  • PORT: float_fractional_part/1 function: work around broken modf()
    in MinGW

  • FIXED: on_signal/3: properly set flags on the signal structure such
    that when bound to a predicate the predicate is called synchronously.
    Breaks handling SIGTERM in library(http/http_unix_daemon).

  • PORT: Sopenmem() to use SIO_NL_POSIX. All internal strings use
    POSIX \n to delimit lines. @mgodan1.

  • FIXED: copy_term/4 to handle cyclic terms for the first argument.
    Also proper recovery in case of a memory overflow.

  • DOC: Enhance docs for trap/1.

  • DOC: Start disclaimer on float precision.

  • FIXED: Added new test files,

  • PORT: Work around broken llround in MinGW

  • TEST: Added test framework and some initial tests for source code
    position and breakpoint management testing.

  • DOC: open/3,4 pipe(Command) limitations.

  • TEST: Moved pipe tests to a plunit file.

  • PORT: open/3,4 on Windows: use clib popen() instead of the broken
    emulation in src/os/windows/popen.c

  • FIXED: Clause position management for h => X = ..., rest_body:
    the unification is not inlined.

  • SNAP: Updated snap package dependency for pcre2

  • FIXED: swipl-ld: access to uninitialized memory

  • FIXED: round/1 near +/- max integer.

  • DOC: complete library index, move gensym and www_browser library docs
    from LaTeX to PlDoc

  • FIXED: round/1 function. As discussed on Discourse. Rick Workman.

  • FIXED: Empty thread queues before deleting them.

  • FIXED: Reclaim stored exception when deallocating a stream.

  • FIXED: Avoid crash updating the stream admin from blob release handlers
    during shutdown.

  • MODIFIED: Added flags and more return values to PL_cleanup().

  • FIXED: abolish/1 on an imported predicate should decrement the
    reference count for the imported predicate.

  • DEBUG: Tricks for ASAN to find the predicates that have not been
    deleted.

  • FIXED: current_predicate/1 bug in updating module reference count
    that may cause temporary modules not to be destroyed. Notably affects
    SWISH.

  • DEBUG: Allow for the environment ASAN_OPTIONS=detect_leaks=1 when
    build with ASAN to debug memory leaks and avoid unloading foreign
    libraries using dlclose().

  • DOC: Add transpose/2 to the clpfd docs.

  • FIXED: Allow using delimited continuations after cleanup/initialise
    sequence.

  • FIXED: Cleanup cache for tabling ret/N functors

  • FIXED: Using date and time functions after PL_cleanup().

  • CLEANUP: Silence several warnings on systems that remove assert()
    calls.

  • FIXED: bulk mode for transactions was not actually passed.

  • PORT: fixed support for systems that lack file mapping

  • FIXED: Single threaded build.

  • FIXED: Issue#961: crash in halt after using the graphical debugger,

  • TEST: Do not load xpce into the basic test suite.

  • DOC: PL_cleanup() docs updated for improved functionality.

  • TEST: Avoid relying on the cat program.

  • FIXED: Memory leak reconsulting a file for deleted predicates.

  • FIXED: retract in nested transaction of a clause asserted in the
    outer transaction to properly reclaim the clause.

  • TEST: Avoid deprecated thread_exit/1.

  • FIXED: Cleaning up locale reference counting and deletion. Could leak
    memory.

  • TEST: Close the temporary toplevel streams

  • MODIFIED: set_prolog_IO/3 no longer creates a clone stream if stdout
    and stderr are the same stream, but creates an error stream that
    writes to the output (and flushes it). This way we can safely close
    user_error.

  • FIXED: fast_term_serialized/2: memory leak.

  • FIXED: Avoid transaction rollback to be recorded (memory leak).

  • FIXED: Ensure deleting table enum object (leaks).

  • FIXED: Avoid leaking a trie node on concurrent insert of the same
    value.

  • ENHANCED: if we created a supervisor that is equal to the existing,
    discard the new one. This may happen if multiple threads create
    a supervisor. Leaks memory as we cannot safely discard a running
    supervisor.

  • FIXED: memory leak recliming the IDG for monotonic tabling.

  • FIXED: memory leak on prolog_unlisten/2.

  • FIXED: consistent use of tree pool allocation.

  • TEST: Disable some tests under ASAN as they run out of stack.

  • FIXED: Reclaim indexes array on reclaiming predicates.

  • FIXED: Initial atom table was allocated twice. Also set the initial
    size for this table to be big enough to load the initial state,
    avoiding two rehash operations.

  • FIXED: memory leak when destroying a module holding thread-local
    predicates.

  • CLEANUP: Use one function for deallocating predicate definitions

  • FIXED: Reclaim argument admin for destroyed predicates.

  • CLEANUP: Reclaim “dirty table” and “dewam_table”.

  • CLEANUP: Moved globally cached dict functors to GD.

  • CLEANUP: Reserve global vars for predicates used from C to allow
    re-initialization

  • FIXED: PL_cleanup(): reset blob admin.

  • FIXED: Typo on threadutil.pl, harming operation without xpce.
    Johan Romme.

  • ADDED: Make encoding accessible by name using PL_atom_to_encoding()
    and PL_encoding_to_atom()

  • DOC: tabling po(Compare) argument.

  • FIXED: predicate_property/2 on visible for zero-argument goals
    could raise an exception.

  • DOC: refer to pack debug_adapter in the GNU Emacs Interface page

  • FIXED: dif/2 not firing after unifying with other attributed variables.

  • CLEANUP: replace start/endCritical by proper functions to simplify
    debugging.

  • FIXED: call_residue_vars/2: possible spurious reported variables
    because the trail entry was removed but the variable was not reclaimed
    due to a frozen stack.

  • ENHANCDD: better support for platforms without signals. This adds an
    alternate alerting path when running on a non-Windows system without
    sig_alert, using a C11 mutex and condition variable. Obviously this
    loses the “interrupt blocking system call” semantics, but it allows
    thread_sigwait to park itself while waiting for another thread’s
    signal.

    A few tests needed changing:

    1. When running without signals on non-Windows, popen(cat-2) will set
      SIGPIPE to ignored manually, since there’s no other way to avoid
      that signal.
    2. The signal_nested tests needed an extra call port so they could
      proactively check for virtual signals.
    3. The D_BREAK tests simply don’t work. It’s slightly too big of
      a can of worms for me to look into for this commit, so I simply
      disabled that test suite on signal-free systems.

    A couple package tests needed adjustments as well:

    1. clib:test_af_unix was using an interrupting signal to stop the
      server thread, so I’ve changed it to auto-exit on signal-free
      systems.
    2. ssl:ssl_certificates was closing the client before reading the
      server’s response, which caused a SIGPIPE on the server, so I
      added a read-and-check to the test to drain the buffer.

    For testing purposes, the no-signals build can be approximated on a
    system built with signal support by passing the --no-signals and
    –sigalert=0 arguments to swipl on the command line.

  • ADDED: on_signal/3 now takes value ‘ignore’ This allows for requesting
    the SIG_IGN disposition, and also unifies the SIGPIPE behavior with
    the other initially-prepared signals. Technically, this could be
    considered a backwards-incompatible change. However, for this to
    actually affect someone’s working code, they would have to

    1. Redefine the system predicate ignore/1,
    2. Call on_signal(Sig, _, ignore), AND
    3. Expect ignore(Signal) to do something besides ignoring Signal;

    and in that case I think we can all agree they’ve brought this trouble
    upon themselves. :slight_smile:

    Also adds SIGPIPE’s default disposition to the docs.

  • MODIFIED: fixing SIG_PROLOG_OFFSET at 32, per docs This also introduces
    a set of macros to interact with the pending signal mask which should
    hopefully ease refactoring if and when we change which signals swipl
    supports, like adding support for system signals over 31.

  • MODIFIED: Do not allow for an comma to appear as an unquoted atom.

  • MODIFIED: switching core libswipl code to C11 This allows for a
    standards-compatible implementation of the LD macros that is guaranteed
    to compile down to a simple reference even at -O0. I’ve also added
    some code that, at least in my testing, makes print LD work again
    in GDB and any debugger that uses it as a backend.

  • PORT: adding O_SIGNALS define in config.h This provides a single define
    to check if Prolog’s signal-handling is enabled, rather than checking
    each of HAVE_SIGNAL etc. This also makes the existence and use of
    GD->signals.sig_alert consistent on whether SIG_ALERT is defined.

  • PORT: Do not depend on SIGINT if signal support is disabled.

  • PORT: Get optional symbols via weak linking This unifies the tcmalloc
    and ptmalloc linking code and also allows systems without dlsym(),
    like WASM, to expose the malloc-implementation predicates, so long
    as the linker is capable of resolving weak symbols.

  • PORT: Issue#939: TLD_alloc() undefined error on Win32. @mgodan.

  • FIXED: Gui tracer for inlined unification with SSU clauses, e.g.
    p(X), X = aap(N) => writeln(N).

  • FIXED: Allow tracing test predicates that are inlined into the VM.

  • FIXED: Make gui tracer handle inlined head unifications.

  • FIXED: rule/3 for => rules that have the unification moved into the
    head and listing/1 for such SSU clauses.

  • FIXED: Preproc/build errors Adding a couple GCC builtins to the config
    tests, using them to force short-circuiting of _LD_WITH_FALLBACK even
    in low-optimization modes (e.g. Clang in DEBUG configuration).

    Also adding a few missing-but-used defines to config.h.cmake
    (HAVE___BUILTIN_EXPECT, HAVE___THREAD, HAVE_VOLATILE, and HAVE_INLINE)
    and fixing an unbalanced #ifdef pair that got added in f3b79d6.

  • FIXED: Consider /0 a breakable instruction. This fixes the debugger for clauses holding /0.

  • FIXED: Avoid instantiation error on =…/2 when analysing clause
    positions with incomplete information.

  • SANDBOX: SWISH issue#147: Allow for copy_term/4.

  • FIXED: Allow retry from the body of => rules.

  • ENHANCED: Avoid tracing inside spy/1, nospy/1 and related debug
    control predicates.

  • FIXED: Issue#935: package manager: download location of git archives

  • DOC: Remove obsolete reference of break/1 trace port

  • FIXED: Tracer retry on a parent frame. Notably causes problems if
    retrying runs cleanup handlers.

  • MODIFIED: MacOS SWI-Prolog.app working directory and locale setup.

  • MODIFIED: MacOS swipl-win to start in ~/Documents.

  • MODIFIED: MacOS: set LC_CTYPE to UTF-8 if neither LANG nor LC_CTYPE
    is set. Also set the encoding flag to utf8 if LC_CTYPE is set to
    UTF-8.

  • PORT: Started Apple specific predicates. Adds
    apple_current_locale_identifier/1.

  • PORT: Fix compilation using clang in debug mode.

  • FIXED: make/0 to consider a file modified if some indirectly included
    file is modified. Used to only consider directly included files.

  • FIXED: Possible GC crash on a rational number appearing in a clause
    head.

  • FIXED: Indexing issue for assessing possible clauses indexes in SSU
    code. Can lead false “No matching clauses” errors.

  • DOC: read_string/3: clarify characters.

  • ENHANCED: option/2: verify the Options argument.

  • CHECK: Verify that the format/2,3 arguments are a list. Quintus
    allowed for not using a list when only a single argument was required.
    Paulo Moura.

  • MODIFIED: Read +digits as a term rather than a number. This changes
    also removes the space when writing e.g. +42. Reading +digits as
    a number predates the ISO standard and current practice. It was in
    SWI-Prolog since version 2.5 …

  • MODIFIED: format/1-3: enforce first argument to be text. Now raises
    an exception if the first argument is a number, etc.

  • MOFIFIED: format/2: ~@, running a goal now discards possible
    bindings created by the goal. Compatibility with SICStus.

  • COMPAT: format/2: a numeric argument to ~s, e.g., ~3s truncates
    the string to the given number of characters.

  • COMPAT: format/2: ~r uses default radix of 8, compatible with SICStus
    and GNU-Prolog (used to raise an exception). Paulo Moura.

  • FIXED: set_prolog_flag(threads, Val) deadlocked. Paulo Moura.

  • FIXED: big integers constants in arithmetic expressions under
    optimization could be compiled as A_MPQ (rational), resulting in
    a crash. Paulo Moura.

  • DOC: further enhancement to untable/1 docs.

  • DOC: document the role of untable/1.

  • ADDED: foldsubterms/5 and use this to bootstrap foldsubterms/4,
    mapsubterms/3 and mapsubterms_var/3.

  • ENHANCED: print_term/1,2: actually handle the left_margin option
    (fix) and make its default the current column.

  • FIXED: print_term/1,2: avoid dependency on library(backcomp).

  • FIXED: call_residue_vars/2: if GC performs early reset on an attvar
    it is incorrectly considered residual.

  • DOC: Fixed PL_get_dict_key() docs. Matthijs van Otterdijk.

  • ENHANCED: Use mallinfo2 when available. By @mgodan1.

  • CLEANUP: Remove code from DCG translation that moves unifications
    immediately following the neck of the clause into the head.
    Since this optimization is done by the compiler anyway this is no
    longer needed. This allows for creating SSU DCG rules on top of the
    existing compilation.

  • ADDED: valid_term_position/2 to help debug term_expansion/4

  • DOC: Fixed error in CMake build script for the manual.

  • DOC: Fixed LaTeX errors.

  • FIXED: Another postfix operator issue as a regression to recent fixes
    on postfix operator handling. Affects the R interface (reported
    by Nicos Angelopoulos for real, but probably rserve_client is also
    victim).

  • DOC: clarify module issues wrt. macro expansion and explain what is
    affected by import modules.

  • DOC: read_term/2: quasi quotation layout

  • TEST: read_term/2 subterm_position option. Contributed by Peter
    Ludemann.

  • PORT: Added missing include for <errno.h>

  • FIXED: Possible crash in copy_term/4 and copy_term_nat/4.

  • ADDED: mapsubterms_var/3 as an alternative to mapsubterms/3 that also
    maps variables.

  • ENHANCED: If a package is available both globally and locally (per
    user), ignore the global one silently rather than with a warning.

  • ADDED: pack_install/2: option global(Boolean) to explicitly install
    a package for the user or globally.

  • BUILD: Include debug info with PGO build.

  • CMAKE: let Threads use -pthread instead of -lpthread This can link
    other needed libraries, and fix building on riscv64.

  • FIXED: Avoid warnings about uncaught exceptions from write_length/3
    in print_term/2.

  • ENHANCED: Edits commit 18690d80fbdc842a5bad3da1fb81a083e55b1b24.
    Forgotten amend and already pushed to origin.

  • FIXED: qsave_program/2: add missing load_module for shlib The
    predicate current_foreign_library is used which is from the module
    shlib. Unfortunately it is not imported though, which makes it
    impossible to use qsave without autoloading enabled.

    [edited by JW: use autoload/2 and also deal with autoload_all/1
    dependency]

  • TEST: Started a few operator tests

  • FIXED: handling postfix operators must reduce the left side before
    reducing the postfix operator.

  • ENHANCED: Issue#24: clause_info/4: reject if term layout returned
    by expand_term/4 is bogus. This forces the guitracer to revert to
    decompiling.

  • FIXED: arg xf xf (cascading postfix operators) where the priority
    of the first is higher than the second must generate a syntax error
    rather than an incorrect term.

  • DEBUG: Fixed duplicate debug id

  • FIXED: print_term/2 handling of postfix operators.

  • SECURITY: running plain swipl loads init.pl from the current
    directory if this file exists. It is not advised to load customisation
    files from the current directory. We now only load init.pl when
    explicitly called using swipl -f init.pl while an implicit init file
    is only loaded from the user_app_config path alias.

  • ENHANCED: library(apply_macros) now expands maplist calls with lists
    known at compile time into a sequence of calls if this is safe and the
    lists are at most 10 elements long.

  • ADDED: copy_term/4 and copy_term_nat/4. These predicates provide a
    partial renaming of variables and is used in s(CASP). This patch also
    improves out-of-memory handling and adds a test suit for copy_term.

  • DOC: foreach/2 by @swi

  • FIXED: pack_rebuild/1 if the pack is installed but does not provide
    binaries for the current architecture. Nicos Angelopoulos.

  • FIXED: SWISH Issue#146: failure to render stacktrace due to failure
    of message_to_string/2 on ansi(Style, Fmt, Arg) if Arg is not a list.

  • ADDED: PL_can_yield() to figure out whether the current execution
    context allows for yielding control.

  • DOC: foreign yield interface

  • ADDED: Allow yield/resume from foreign predicates.

  • MODIFIED: Query identifiers now keep track of the engine to which they
    are associated. As a result, they are now anonymous pointers rather than
    (pointer wide) integers. Does not affect compatibility except source
    compatibility when the value is combined with integral types.

  • BUILD: Disable MQI if multi-threading is not enabled.

  • FIXED: print_term/2 from entering a loop. Also fixes unneeded
    parenthesis in lists.

  • FIXED: finding clauses from a source location could crash on thread
    local predicates

  • FIXED: conjunction/disjunction.

  • FIXED: print_term/2: respect write options when computing with of
    native output.

  • MODIFIED: print_term/2 to get the default right margin from tty_size
    if the output is a tty and tty_size/2 succeeds.

  • ENHANCED: mkconj/3 and mkdisj/3 to produces a right-grouped term, e.g.
    ?- mkconj((a,b),c, Conj) Conj = (a,b,c)

    (was Conj = ((a,b),c)).

  • FIXED: We must preserve the pack registration when creating a saved
    state to make loading foreign resources work.

  • ENHANCED: main/0 to avoid setting up application signal handling and
    termination when run interactively.

  • FIXED: Issue#917: separate S_DYNAMIC and S_MULTIFILE. Jos de Roo.

  • ADDED: print_term/2: options fullstop(Boolean) and nl(Bool). Also lots
    of documentation restyling and removed old conditional compilation.

  • ENHANCED: print_term/2 to deal with operator expressions that exceed
    the line width.

  • FIXED: print_term/2: max priority of list elements and compound term
    arguments to 999 to force parenthesis.

  • FIXED: Issue#917: WAM Table mismatch: wam_table[119(s_static)] ==
    wam_table[124(s_multifile)]

  • SNAP: Reverted to core20 because Qt is broken on core20.

  • FIXED: Ensure VMI instruction are on unique addresses. This patch
    extends 7bf463db4dcc7b4e27c820ef8fc6f94fd8116720 for the case that
    two VMIs jump to the same real implementation.

  • SNAP: Trying to switch to core20 base. See
    Old version of fontconfig · Issue #67 · octave-snap/octave-snap · GitHub

  • PORT: Guarantee two VM instructions are not optimized to use the
    same code.

  • FIXED: Ensure bigints are properly indexed on 32-bit platforms.

  • PORT: On MacOS fat executables, both try fat-darwin and the actual
    archirecture when searching foreign resources.

  • PORT: Set archirecture name of fat packages to fat.

  • PORT: Support generation of MacOS universal (fat) binaries.
    Also updates minimum supported MacOS version to 10.14.

  • PORT: Dynamically determine actual architecture on MacOS

  • PORT: Install openssl.cnf with MacOS dependencies
    (scripts/macos-deps.sh)

  • PORT: By default disable tcmalloc for MacOS as it causes a crash in
    setlocale() for Monterey.

  • ADDED: Support ‘*’ to print the most last choicepoint when a toplevel
    goal succeeded deterministically.

  • ADDED: print_last_choicepoint/0,2.

  • ENHANCED: Make explain/1 use the message system and the new terminal
    hyperlinks.

  • ENHANCED: explain/1: hide system references.

  • PORT: Building an apple bundle using Qt6

  • PORT: Updated script for MacOS dependencies

  • DOC: return type for PL_put_variable(), PL_put_bool() and PL_put_atom()
    is int.

  • ENHANCED: ord_subtract/3: use => rules to trap wrong calls and stop
    when the list of elements to be subtracted is exhausted.

  • FIXED: Handle new terminal hyperlink elements in message_to_string/2

  • PORT: MacOS to deal with installation directory for libjpeg as
    installed by Macports. This patch also disables more Macports and
    Homebrew locations if we provide our own dependencies.

  • BUILD: By default use Macports gcc11 (gcc-mp-11)

  • EHNANCED: SICStus datime/2 emulation now supports mode datime(-When,
    +Datime).

  • ADDED: ansi_term:hyperlink/2 as a hook to adding hyperlinks.

  • ADDED: random_subseq/3 and random_numlist/4 to
    library(random). Compatible with SICStus.

  • ENHANCED: Use new url(Location) message line elements throughout.

  • ADDED: Introduce url(Location) and url(URL, Label) message line
    elements.

  • PORT: Fixed cmake issue for MacOS Homebrew dependencies.

  • DOC: edit/0.

  • FIXED: thread_update/2 when no change is made to the target module
    should still wakeup.

  • ADDED: prolog_choice_attribute/3: clause attribute to find the next
    candidate clause.

  • FIXED: Initial value for the Prolog flat on_warning must be print.

  • FIXED: Stack trace line-level location when parenthesis are used.

  • MODIFIED: write_term/3 option brace_terms behavior was the inverse
    of the documentation. As the docs describe what one would expect and
    is consistent with YAP, the implementation is fixed. We do not expect
    this option to be frequently used. Code using brace_terms(true) must
    be updated to use brace_terms(false). If you need to do a runtime
    check to beor conditional compilation compatible with older versions,
    one can use this condition to verify the correct new behavior.

    term_string({a}, S, [brace_terms(false)]), S == "{}(a)"
    
  • FIXED: gen_assoc/3. This patch also removes the ground tests for
    is_assoc/1 and updates documentation. By Peter Ludemann.

  • FIXED: Missing import into library(listing).

  • DOC: Added the rbtrees, statistics and fastrw libraries to the main
    documentation to make them available in help/1.

  • DOC: Added library(rbtrees) to main documentation to make it work
    in help/1.

  • REFACTOR: library(rbtrees) to use more => style rules and use det/1.
    This refactoring guards at practically zero overhead cost against
    errors such as passing variable rather than a Red-Black tree, passing
    an invalid Red-Black tree. This patch makes the library strictly
    stead-fast. Finally, many test cases are added.

    Fix is_rbtree/1 fail condition; use => in more places

  • ADDED: write_term/2: option quote_non_ascii. This option is enabled
    by default for write_canonical/1.

  • ADDED: PL_write_term(): PL_WRT_QUOTE_NON_ASCII flag

  • FIXED: write_canonical/1 to use the brace_terms option as false.

  • FIXED: Make write/1 and friends escape characters that the stream
    cannot represent.

  • FIXED: write/1 and friends: we must check that the first character
    can be represented by the stream.

  • ADDED: Server socket support to SICStus 4 library(sockets) emulation.

  • FIXED: If we abort in the tracer from a redo port that is on a foreign
    predicate we must discard this (foreign) frame.

  • ADDED: pack_install/1 to support pack_version(2). in pack.pl.
    Version 2 changes the names of the exported environment variables that
    control building the pack. This was necessary to avoid conflicts
    with build environments. As an incompatible change was required
    anyway we took the opportunity to rationalise all the variable names.

  • ADDED: pack_install/2: option test(Boolean) to skip the pack tests.

  • PORT: First attempt to support MacOs M1 with brew deps in /opt/homebrew

  • ENHANCED: library(assoc): partial rewrite to use SSU (=>/2) to generate
    errors when called with invalid input.

  • ENHANCED: Base clause indexing hash for indirect types (strings,
    bigints and rationals on the start, end and length if the size exceeds
    4 machine words. Without, the time to compute the hash easily becomes
    dominant. Found by Rick Workman.

  • REFACTOR: Get all index key computation in one place.

  • ADDED: pack_install/1 and friends: provide an environment variable
    PREFIX for installing global objects.

  • BUILD: Provide more control over the PGO build.

  • ADDED: argv_options/3 to process type number

  • FIXED: profile/1 involving code executed in a temporary module.

  • MODIFIED: This patch modifies PL_prof_type_t, the interface to
    extend the SWI-Prolog profiler. Foreign code using this may need to
    be updated. Most likely only used by xpce.

  • MODIFIED: Issue#900: Renamed PL_version() to PL_version_info().
    Provides a macro for backward (source) compatibility.

  • FIXED: Issue#105: dif/2 wrong result. This patch is a major rewrite
    for dif/2. Where the previous version contained or nodes that were
    considered satisfied based on a count, the new version verifies the
    individual unifications of the unifier produced by unifiable/3.
    The count fails, both too low and too high, as a result of multiple
    unifications in a single unification as well as subterm sharing in
    the input terms.

  • TEST: More dif/2 tests.

  • FIXED: dif/2: we should ignore unrelated attributes.

  • FIXED: Issue#907: failure to fully reclaim clause indexes under
    some loads.

  • CMAKE: Support older CMake versions.

  • FIXED: Saved state handling of a dict whose first key value (in the
    internal order) and tag are both avoid variables. This patch is less
    invasive than 4de9114a76cd44659591296627e999cf1072d744.

  • FIXED: Saved state handling of a dict whose first key value (in
    the internal order) and tag are both avoid variables. Reported by
    Matt Lilley.

  • TEST: Migrate dif/2 tests to plunit.

  • FIXED: dif/2: pending constraints on sharing inside the terms.

  • FIXED: pack_install/1: if no foreign steps are required, skip them.

  • FIXED: pack_install/1: message indicating foreign install step.

  • STYLE: list_void_declarations/0, part of checks after make/0 to list
    predicates defined as discontuguous/1 while they have no clauses.
    This is, according to ISO, not a bug as such predicates are considered
    to be defined.

  • FIXED: Be more relaxed about existence of the current predicate
    when pushing and popping the compilation context.

  • ENHANCED: Report failed build steps because no tools was willing to
    do the job. Pass -DCMAKE_BUILD_TYPE=Type, which may be set from
    the options to pack_install/2.

  • ENHANCED: Get version info into the Prolog flag. Now uses CMake rather
    than a shell script and provides a new Prolog flag cmake_build_type.

  • FIXED: pack_install/1 install step for make based packages.

  • FIXED: Rebuilding GNU-style packages failed due to catching wrong
    exception.

  • FIXED: pack_rebuild/1 for CMake configurations.

  • ADDED: A file <home>/cmake/swipl.cmake that provides generics to
    use CMake for building SWI-Prolog packs.

  • DOC: Updated CMake build instructions.

  • ADDED: pack_install/1: reorganized the code building foreign resources.
    This code is now in a new library(build/tools) and uses a plugin
    architecture that deals with Conan, CMake and GNU tools (autoconf
    etc.). The changes are intended to be fully compatible with the
    old system. The build system now supports more tools and provides
    mechanisms for structured extensions.

  • DOC: meta_predicate/1: updated mode declarations.

  • EHNACED: pack_rebuild/1,2 for CMake based packages to use cmake --build and cmake --install for the build and install steps rather
    than calling make, ninja, etc. directly. Suggested by Wouter Beek.

  • MAINTENANCE: Possible segv in retract/1 when compiled using O_DEBUG.

  • FIXED: Possible race conditions between the various ways a thread
    can be joined.

  • FIXED: Do not start a new thread to join garbage collected threads
    while shutting down the system.

  • MAINTENANCE: On a system error we only go into interactive mode if
    both stdin and stderr are connected to a terminal. Otherwise we
    print the message, C and Prolog stack and abort.

  • MAINTENANCE: Use of guarded C-stack using sigaltstack() doesn’t go
    with ASAN. Results in the error below. Disabled guarding the C
    stack when compiling using address sanitizer. ``` ==101190==ERROR:
    AddressSanitizer failed to deallocate 0x2000 (8192) bytes at
    address 0x6250000b1900 ==101190==AddressSanitizer CHECK failed:
    …/…/…/…/src/libsanitizer/sanitizer_common/sanitizer_posix.cc:60
    “((“unable to unmap” && 0)) != (0)” (0x0, 0x0)

    
    
  • FIXED: CMake packs must use environment variables.

  • ADDED: Support ninja builds when using CMake

  • FIXED: pack_install/1,2: If we use CMake for configuration, we should
    also build in the CMake directory.

  • TEST: Signalled thread may already be dead.

  • ADDED: pack_install/1,2: provide pack_install(.) to add the local
    directory to the pack registry and build it. Also add option link(true)
    and rebuild(When) to provide more fine control over the build.

  • FIXED: pack_install/1,2: do not remove contents if the package
    registered as a symbolic link.

  • FIXED: memberchk/2 for partial lists where the unbound part is
    constrained. Reported on Discourse by Abramo Bagnara.

  • BUILD: Avoid GCC-11 warning

  • ENHANCED: Protect assertz/1 and friends (compiler) against C-stack
    overflows.

  • ENHANCED: Use setjmp() instead of sigsetjmp() to reduce the overhead
    of the C-stack guarding.

  • MAINTENANCE: Updated C calltree analysis for CMake build and new
    coding style and conventions.

  • FIXED: Fallback to find a place for packages to install executables.

  • FIXED: Hash consistency on pointer sided integers for 64-bit bigendian
    machines. Only affects consistency of term_hash/2 over platforms.

  • FIXED: Checking that an uncaught exception is caught in an outer
    environment
    , i.e., nested C<->Prolog callback.

  • FIXED: Make C-stack guarding work in threads.

  • ENHANCED: Use C-stack guarding for read/1 and friends.

  • FIXED: format/2,3: Term printing using ~[kpqw] did not propagate
    exception.

  • ENHANCED: Handle C-stack overflows gracefully on POSIX targets with
    sigaltstack().

  • PORT: Alignment on ppc64el. Better version than
    df1f0bf795a16edd313a2a25f0678ce044a4a71d

  • ADDED: argv_options/3: allow including longer descriptions as header,
    usage and footer in the usage message.

  • ADDED: argv_options/3: Allow the user to redefine the bindings for
    help. Suggested by @swi.

  • PORT: Alignment on ppc64el (Debian). See
    ppc64le compilation failure in Alpine for swi-prolog 8.5.0 · Issue #104 · SWI-Prolog/issues · GitHub

  • FIXED: pl_get_uint64() for GMP numbers on 32-bit systems.

  • ADDED: argv_options/3,4: allow for disjunctive types.

  • ADDED: library(prolog_versions) to simplify demanding minimal version
    and features of the hosting Prolog system.

  • ADDED: argv_options/4: options_after_arguments(false) option to
    stop processing options after the first positional argument.

  • FIXED: Re-enable prolog:message//1 hook for print_message/2.

  • ADDED: print_message/2: language detection for Windows for message
    generation.

  • ADDED: win_get_user_preferred_ui_languages/2 to get access to the
    user’s preferred UI languages on Windows.

  • INSTALL: Windows: avoid confusing uninstall version message.

  • ADDED: user:message_property/2: tag(Tag) property to change ERROR
    and/or Warning.

  • ADDED: print_message/2: Allow message term to text translation to be
    language specific.

  • ENHANCED: Allow loading library(prolog_debug) if spy and/or nospy
    are defined as operators.

  • FIXED: Do not reclaim memory on termination when we failed to terminate
    all threads.

  • ENHANCED: Provide a non-polling process termination procedure for
    systems that do not have sem_timedwait() such as MacOS.

  • ENHANCED: Improve performance for process shutdown on POSIX
    systems that support sem_timedwait() by avoiding a polling loop.
    This typically saves 0.1 second on the elapsed time for short lived
    executables.

  • ADDED: Allow --no-pce together with -c (compile) to produce
    a state that does not include xpce.

  • FIXED: Retract for retract((a:-true)). Reported by Fernando
    Sáenz-Pérez.

  • ADDED: argv_options/3: type term

  • ADDED: argv_options/3 to provide a full featured and lightweight
    alternative to library(optparse).

  • FIXED: format/2 and friends: verify error when emitting rubber.

  • ADDED: format/2 and friends: support ~:|, the colon modifier for
    tab stops to insert a newline if the current column already passed
    the tab stop.

  • FIXED: Fixup singleton for cleanup of optspec validation.

  • FIXED: Issue#896: Claim that memory streams as used by
    e.g. open_string/2 are reported as repositionable. Reported by
    Matthijs van Otterdijk.

  • ENHANCED: Allow 64-bit seek function to work on memory streams.

  • ADDED: Allow stream contol functions to return whether the stream
    is repositionable.

  • FIXED: Make optparse:parse_type/3 hook work. Cleanup of optspec
    validation.

  • MODIFIED: opt_parse/4: if an option is unknown only throw an exception,
    i.e., not first print the help message.

  • ADDED: opt_parse/4: Allow using a string as help(Help) value.

  • FIXED: det/1: avoid false non-determinism claim if all relevant
    choicepoints are debug choicepoints.

  • ENHANCED: library(rbtrees): error checks and more test cases.

  • FIXED: Predicate access in nested transactions for clauses that are
    removed in the parent (or a previous nested) transaction. We must
    inspect the affected clauses of all parent transactions. Reported by
    Eric Zinda.

  • FIXED: Answer subsumption tabling case provided by Annie Liu.

  • TEST: Tests for new thread_signal/2.

  • ADDED: Predicate property sig_atomic. Currently only for the
    built-in sig_atomic/1.

  • DOC: Document new thread signal primitives.

  • ADDED: thread signal blocking and unblocking.

  • FIXED: Delay signals in prolog_exception_hook/4.

  • MODIFIED: Signal handling no longer backtracks. This implies it may
    set global variables.

  • ADDED: sig_pending/1 and sig_remove/2.

  • ADDED: sig_atomic/1 to run goals protected from signals. This
    predicate used to be available as the undocumented ‘$sig_atomic’/1.
    ‘$sig_atomic’/1 is now available from library(backcomp).

  • ENHANCED: thread_signal/2: reduce the locked section

  • FIXED: thread_wait/2: return when condition is true before this
    predicate is called.

  • FIXED: thread_wait/2: wait_preds option accepted non-predicate
    indicators.

  • ADDED: sandbox: call_delays/2 as safe meta predicate

  • FIXED: Issue#889: swipl --abi-version crashed.

  • ENHANCED: trace/2 to delete that we are tracing this predicate if
    the port list is empty.

  • DOC: Document key pc of prolog_choice_attribute/3

  • FIXED: 91d73fb8a859c6e0f0d97ff553f96903816bc18c triggers another case
    where the falsecount of a node can underflow during re-evaluation.
    Bit dubious.

  • DOC: LaTeX formatting error

  • FIXED: possible failure to propagate changes in lazy monotonic
    tabling. This happens because answers added during lazy reevaluation
    are propagated eagerly, but ‘$idg_mono_affects_eager’/3 didn’t find
    dependencies to non-lazy tables.

  • ADDED: pack_install/1 and friends: pass a prefix flag to CMake or
    configure that follows the same conventions as the installed Prolog
    system.

  • ADDED: dcg_translate_rule/2 is now declared safe for use in sandboxes.

  • ADDED: notraceall/0.

  • ADDED: Allow authors of packs to not have an email address or URL.

  • ADDED: PL_cvt_i_schar() for explicit signed character handling.

  • ENHANCED: dict_options/2 in mode (-,+) to remove duplicate options,
    keeping the first.

  • ENHANCED: Cleanup code for format/2,3. Allow callback’s to cooperate
    with ansi_format/3.

  • ADDED: prolog_listen/2,3: listen to thread create events.

  • ENHANCED: ord_intersection/2 to raise errors of the input is not a
    proper powerset.

  • FIXED: Possible crash enumerating a trie holding indirect values
    against instantiated data. Reported by Eric Zinda.

  • FIXED: VMI_FUNCTIONS build now works with LDFUNC changes

  • FIXED: Issue#883: Decompiler to preserve order of arguments to
    optimized +/2 and -/2 functions.

  • FIXED: Issue#882: Test failure if xpce is not added to the build.
    Reported by David Tonhofer.

  • BUILD: Make building the docs works if X11 is not included.

  • FIXED: Completion of lazy monotonic tabling to exclude lazy monotonic
    tables without queued dependencies as there is no point in evaluating
    these now.

  • FIXED: Lazy monotonic tabling detection that a mutual dependent
    monotonic dependency network is complete.

  • FIXED: Allow listing/1 from a temporary module.

  • ADDED: customize/edit command to accept --no-wait option.
    Requires latest xpce package. Can by used with editor plugin for
    terminator.

Package RDF

  • PORT: Make library(rdf_write) work without the RDF db.

Package archive

  • FIXED: Allow an open archive to be garbage collected.

  • CLEANUP: Renamed internal functions to make it clearer which
    context they’re called in - added internal documentation about
    the state transitions - added AR_ERROR state (renamed AR_OPENED
    to AR_OPENED_ARCHIVE) - added archive_wrapper_init_value for
    initializing the blob - removed a double-free (ar->entry in read
    mode)

    Improved tests to check full file contents. Cleanup some CMake
    property
    checks.

  • CLEANUP: Removed references to libarchive versions before 3.0.0a -
    Version 3.0.0a was released 2008/05/26 - The “seek” functionality
    was added 2011/11//18 - The “filter count” functionality was added
    2010/02/19 Changed the archive blob from PL_BLOB_NOCOPY to instead
    be allocated by PL_unify_blob(), which simplifies cleanup on some
    failure situations. Set blob fields to NULL after they have been
    freed. Removed unused free_archive()

  • TEST: Remove assumptions about the build environment and other details
    such that the tests also run in different environments such as the
    installed environment.

  • TEST: Added tests for code snippets in documentation and
    check_installation Fixed typos in documentation Added tests that
    cause memory leaks and exercise error conditions / failure

Package bdb

  • PORT: Support static linking

Package chr

  • WASM: Install generated files in wasm-preload

Package clib

  • TEST: Disable tests that require threads on the single threaded
    version.

  • ENHANCED: prolog_server/2: ensure the server thread terminates,
    also if the client disappears with an error. Improved docs.

  • TEST: Synchronize libraries included and tests included. Also includes
    library(filesex) into the Emscripten version.

  • PORT: Windows executable files may not have read access if they are
    a reparse point.

  • FIXED: relative_file_name(Dir, SameDir, Rel) to return Rel as .
    rather than ''.

  • TEST: Disable tests that need threads on the single threaded version.

  • WASM: Re-group plugins to make it easier to select only those that
    do not depend on OS features.

  • PORT: Replace old K&R declarations

  • ADDED: library(sched), providing a start at accessing the OS scheduling
    primitives.

  • FIXED: read_line_to_codes/2: avoid line ending with \r if the \n is
    found just after a flush. This patch also includes a rewrite of this
    predicate and read_stream_to_codes/3 to use UTF-8 as intermediate
    representation rather than wchar_t, avoiding the need for UTF-16
    surrogate pairs.

Package cpp

  • TEST: Fixed C interface PL_scan_options() tests.

  • TEST: Renamed foreign function test module to test_ffi. This avoids
    a conflict (and confusion) with the ffi pack to run the tests
    interactively.

  • TEST: Added PL_scan_options example

  • TEST: Avoid dependency on gethostname introduced by the tests.

  • TEST: Remove .as_string.c_str() as this is unsafe.

  • DOC: Document both version 1 and version 2.

  • DOC: Setup for documenting both SWI-cpp.h and SWI-cpp2.h

  • ENHANCED: added PlTerm::record(), PlTerm::write(), PlTerm_recorded,
    PlRewindOnFail(), PlStringBuffers Removed PlTerm::unify_check()
    Added example code for backtracking predicate that gets info on int
    types Fixing integer overloading for win32, MacOS - remove many of the
    overloaded methods and instead use names derived from the underlying
    SWI-Prolog PL_put
    () and PL_unify*()

  • DOC: Added a porting section

  • PORT: Make SWI-cpp2.h compile on systems where long int is 32 bits
    (Win64). Patch by Peter Ludemann.

  • CLEANUP: better reuse of Prolog exceptions.

  • ENHANCED: Version 2 of C++ interface - removed some implicit
    conversions and constructors whose use can cause subtle bugs -
    made most conversions and constructors explicit - added subclass
    constructors to make Prolog types explicit and avoid some subtle bugs

    • added copy constructors, assignment operators - renamed handle_,
      ref_ to C_, for simplified “getter/setter” - added PlCheck() for
      easier calling of SWI-Prolog.h functions - removed conversion
      (cast) operator - added pseudo-exception PlFail for returning
      failure from a PREDICATE - also used by the unify_XXX_ex() methods -
      deprecated assignment operator for term unification - replaced by
      unify_XXX() and unify_XXX_ex() methods - added some support for
      std::string, std::wstring - and additional support for wchar_t -
      added some more methods that allow using PlTerm:xxx(…) instead of
      PL_xxx(t.get_term_t(), …); also for PlAtom - added PlTerm::type(),
      PlTerm::is_variable(), etc. methods - moved atom_t handle into private
      PlAtom, term_t into private PlTerm - added get_atom_t(), get_term_t() -
      added verify(), is_valid(), reset() methods - some refactoring, e.g.,
      PlTerm::check(), PlTerm::null - refactored the integer “getters”
      to get around problems with C++ built-in conversions and integer
      promotion. - refactored comparison methods, added PlTerm::compare() -
      replaced “int” as return type by “bool” in many places - use common
      C++ naming practice for class fields (suffixed by “_”) - added unit
      tests - moved examples from test.cpp to unit tests file (cpp4pl.cpp,
      test_cpp.pl) - used C++ initializer lists where possible - added
      [[nodiscard]] to many methods - added [[deprecated]] to some methods -
      (internal: used a template class to handle some boilerplate)
  • ADDED: PlTerm casts for bool and uint32_t

Package http

  • CONFIG: Reorganise installation and docs to distinguish core part we
    always want, the HTTP client and HTTP server libraries.

  • FIXED: term//2 from library(http/term_html) left a choicepoint.

  • WASM: Support more the HTML related infrastructure.

  • PACKAGE: Include http_quasiquotations.pl and the term_html.pl imported
    from the Pengines package into the minimal installation.

  • TEST: Synchronize installed and tested packages.

  • DOC: http_open/3: missing docs due to empty line.

  • WASM: Provide a stripped down version for the WASM target, currently
    providing the library(http/html_write), the json and stream library.

  • ADDED: Mime type mappsing from .data to
    application/octet-stream.

  • ADDED: MIME type rules: added .wasm → application/wasm.

  • FIXED: Also escape line terminators when writing graphql strings…
    …as per GraphQL

  • ADDED: library(http/graphql) implementing a GraphQL reader and QQ

Package jpl

  • TEST: simplify & tidy unit tests Tidier, simpler JUnit tests, removing
    dead code and duplicated stuff, with reduced noise from succeeding
    tests (still available via REPORT flag, but now quieter by default).

  • ENHANCED: non-recursive Term.getSubsts reimplementation This
    fixes another term-depth-limited issue with JPL’s public API by
    reimplementing Term.getSubsts() non-recursively

  • ENHANCED: Non-recursive Term.getTerm reimplementation Replaces the
    original recursive implementation of Term.getTerm() etc. (which runs
    out of JVM stack for e.g. lists of more than a few thousand members)
    with a depth-unlimited non-recursive version (see Term.getLoop)
    and adds a couple of JUnit tests

  • ENHANCED: Non-recursive Term.put reimplementation Replaces the original
    recursive implementation of Term.put() etc. (which runs out of JVM
    stack for e.g. lists of more than a few thousand members) with a
    depth-unlimited non-recursive version (see Term.putLoop) and adds a
    couple of JUnit tests

  • TEST: Cleanup and enhancements.

Package ltx2htm

  • FIXED: Memory error.

  • PORT: Allow for static linking

Package mqi

  • DOC: hard links to swipl manual
  • DOC: hard links to swipl manual the “section references” do not get
    connected properly

Package odbc

  • PORT: Allow compiling in single threaded mode.

Package pcre

  • TEST: Add Unicode>0xffff test

  • TESTS: Fixed tests to work on systems without pcre2 jit

  • DEBUG: Removed debugging prints. The print statement in the
    pcre_release() function is unsave as during proces cleanup the pattern
    may vanish before the regular expression.

  • FIXED: Make comparison and printing the blob work for Unicode patterns.

  • ENHANCED: re_config/1 backtracks through all possible values
    re_config/1 fails if an invalid otption is given instead of throwing
    an error fixed some PCRE1 vs PCRE2 documentation for re_config/1 added
    a test to check that re_config/1’s documentation is a complete list
    comparison now uses the pattern; blob-write also shows pattern fix
    bug in compare_pcres() that incorrectly resulted in equality

  • FIXED: memory leak if re_compile fails or throws an error

  • PORT: Make compiled and test using pcre2 10.31.

  • PORT: Make work on systems that do not provide JIT support.
    Possibly it is better to fail on the option in that case?

  • ENHANCED: use pcre2 library instead of pcre1 - Issue #2 - Numerous
    small bug fixes and enhancements (e.g., handling of duplicate
    options, capture_type, error checking). - This commit takes
    advantage of refactoring that was done on the pcre1 code to make
    it easier to handle the pcre2 options (which are both more numerous
    and have a different underlying API). - Added new pcre2 options -
    Removed some obsolete options, preserving backwards compatibility
    where possible - The meaning of optimise(true) has changed - it now
    calls the JIT compiler - Renamed bsr(…) and newline(…) options
    to bsr2(…) and newline2(…) because the pcre2 interface has
    changed - compat(javascript) is replaced by alt_bsux(true) and
    extra_alt_bsux(true) - Code improvements: use uint32_t wherever
    possible instead of unsigned or int - Does not use the new
    pcre2_substitute() for re_replace/{4,5}, re_split/{3,4}, re_foldl/6
    (however, some improvements have been made to the APIs for these). -
    Added test cases

  • FIXED: re_config/2 for jittarget may return a NULL string, crashing
    re_config/2. Mapped to failure.

  • ENHANCED: re_replace/{4,5}, re_split/{3,4} handle capture_type option -
    some refactoring - some bug fixes - added tests

  • FIXED: re_replace/4 can now handle duplicated back references (Issue
    #6) - added escapes for “$” and "" Refactored “capture map” code
    Minor reformatting

  • ENHANCED: re_replace/5 with options list, similar to re_matchsub.
    There are still some “fixme” tests, related to global capture_type.
    Fixed: caching of compiled patterns with options. Renamed some
    predicates to make things clearer.

  • FIXED: re_config/1 throws error for all cases of invalid argument
    Added Unicode tests (for migration to PCRE2 Issue #2) Fixed uncleared
    exception Use convenience function or error returns Regularize some
    names Documentation had “optimize” option; code had “optimise”

    • allow both Fixed detection of type suffix in pattern names Fix
      potential memory leaks and missed error checks Refactor conflated pcre
      return code PL_… return code Document return codes Lower-case cmake
      functions that are lower-case elsewhere Small fixes from turning on
      more compiler warning

Package pengines

  • PACKAGE: Move term_html.pl to the http package. It is not specific
    for Pengines.

Package pldoc

  • CONFIG: Make most of PlDoc work in the single threaded version.

  • CONFIG: Make PlDoc work if the HTTP server components are not part
    of the configuration.

  • ENHANCED: Source button to prefer loaded code over xref data.

Package redis

  • FIXED: Handle push messages that do not include a pubsub header (@swi).

Package semweb

  • FIXED: rdfa.pl: Avoid dependency oin development tools

  • DOC: Fixed LaTeX errors.

  • TEST: Make tests work in restricted single threaded version.

  • BUILD: add cmake dependency

  • PORT: Make the turtle and ntriples readers and writers load without
    library(semweb/rdf_db). Still issues using them.

  • PORT: Do build build library(semweb/rdf_db) in single threaded
    mode. In this mode the semweb only provides the turtle and ntriple
    readers and writers.

  • FIXED: Better ordering of pre_ground_object/2 clauses

Package sgml

  • CLEANUP: Avoid function pointers with incomplete prototypes and make
    the install function follow the conventions to allow for statically
    linked extensions.

Package ssl

  • TEST: Drop tests when single threaded.

  • FIXED: Zero the PL_CRYPTO_HASH_CONTEXT struct on first allocation

  • PORT: RTools42, link order for OS libs, add libz

  • BUILD: Ensure HOME is set to a writable path for generating the SSL
    test certificates.

  • PORT: Avoid deprecated SecKeychainOpen().

  • ADDED: Implement clean shutdown hook support for HTTPS.

  • TEST: test_ssl won’t SIGPIPE without signals

  • PORT: Override OPENSSL_OS_LIBS with cmake -Detc. For some reasons,
    RTools42 needs libz included in the OPENSSL_OS_LIBS

Package swipl-win

  • FIXED: Check return codes of many operations on lists.

  • PORT: Changes for SWI-cpp.h API Version 2

Package windows

“the install function of a library must be called install_
and the Prolog side must use use_foreign_library/1”

Package xpce

  • CONFIG: Avoid dependency on threads.

  • FIXED: replace internal expand_path/2 with absolute_file_name/3
    old code could not handle aliases like swi(library/clp) only
    swi(‘library/clp’)

  • ENHANCED: PceEmacs: properties of predicates in status line (better
    text and ignore more irrelevant).

  • ADDED: pce_xref_gui:gxref_called/2 hook into gxref/0 to allow silencing
    predicates that are called by means of hooks or some other mechanism.

  • FIXED: gxref/0: edit predicate on click to properly handling included
    files.

  • PORT: suppress uninitialized warning in msys2 gcc

  • PORT: msys2-compatible mkdir and wildcards

  • FIXED: PceEmacs sgml mode: use setup_call_cleanup/3 to ensure Prolog
    streams to editors are always closed.

  • TEST: Create files and directories in temp.

  • PORT: Avoid using Windows stat()

Package zlib

  • TEST: Disable tests that requires threads

  • TEST: Disable socket based tests if sockets are not supported.

4 Likes

updated on msys2, e.g. pacman -S mingw-w64-x86_64-swi-prolog