Portable SWI-Prolog Changelog

What's new in Portable SWI-Prolog 9.2.2-1

Mar 22, 2024
  • SWI-Prolog Changelog from version 9.2.1 to 9.2.2:
  • [Feb 27 2024]:
  • ADDED: library(sandbox): allow for current_predicate/1 without modules.
  • FIXED: Using the -l file option multiple times This used to load the first file into user (correct) but all others into the toplevel system module. Now all files are loaded into user.
  • ENHANCED: #1237 check_installation/0: hide details. Due to changes in the message format failing to load shared objects, failing tests due to shared object failures causes long error reports.
  • [Feb 26 2024]:
  • FIXED: Highlighting (SWISH). Avoid double brace_term_open/close for {} goal terms. Still needs proper highlighting in SWISH, as it is now just marked as brace term.
  • [Feb 23 2024]:
  • DOC: Clarify details of PL_get_chars() et al
  • [Feb 16 2024]:
  • DOC: pack management and a few minor patches.
  • [Feb 20 2024]:
  • DOC: Replaces !1232 with example for using PL_rewind_foreign_frame().
  • Package cpp:
  • [Feb 23 2024]:
  • CLEANUP: tests and clarification of term to string conversion.
  • [Feb 20 2024]:
  • DOC: add missing method/function documentation
  • [Feb 19 2024]:
  • FIXED: term-to-string and related functions
  • ENHANCED: added PlTerm::must_be*() methods
  • ENHANCED: remove unnecessary "const ...&" from parameters; deprecate some dubious functions
  • Package http:
  • [Feb 28 2024]:
  • ENHANCED: http_read_data/3: map syntax errors to status 400 If reading the data results in a syntax error we add context that causes http_exception.pl to map the error to a HTTP 400 reply rather than HTTP 500.
  • [Feb 26 2024]:
  • FIXED: HTTP Session data plugin for Redis timeout handling.
  • [Feb 21 2024]:
  • ENHANCED: Redis support for HTTP sessions This patch deals with IPv6 peers and allows for specifying both an RW and RO Redis database. An RO Redis database may be used for high-availability (sentinel) or clustered Redis DB.
  • [Feb 19 2024]:
  • FIXED: json_write/2,3: deal with high Unicode characters on Windows.
  • FIXED: use-after-free memory access error This notably causes the close/0 on a stream opened using http_open/3 to fail on some platforms.
  • Package redis:
  • [Feb 16 2024]:
  • ADDED: sentinel_slave/4
  • FIXED: redis_get_list/3,4: LLEN can return OK. Unclear why this is possible. It happens in HTTP Redis based session management, where the list is created using LPUSH. As a work-around, we return the empty list.
  • Package ssl:
  • [Feb 21 2024]:
  • FIXED: #170 crypto_data_hash/3: allow hmac key to contain 0-bytes.

New in Portable SWI-Prolog 9.0.4 (Feb 6, 2023)

  • TEST: Run unsafe thread_wait tests only if SWIPL_TEST_FAIL_ON_UNLIKELY is set to y.
  • FIXED: `1Inf` should be invalid syntax.
  • DOC: Foreign language details. Notable PL_raise_exception().
  • FIXED: With float_undefined set to nan, 0/0 must return NaN.
  • FIXED: with_output_to/3 to flush the streams before finishing the capture.
  • ADDED: Sdprintf() and friends to accept the t integer size specified for ptrdiff_t.
  • FIXED: Allow signal handling and e.g. call_with_time_limit/2 on raw terminal input.
  • FIXED: ansi_hyperlink/3. Also unify ansi_hyperlink/3 and ansi_hyperlink/2.
  • FIXED: trace/2 using -all to stop considering the predicate traced.
  • FIXED: prolog_stack_frame_property/2 for the predicate property.
  • FIXED: Windows: string_length/2 did not handle UTF16 surrogate pairs correctly.
  • DOC: Document PL_write_term()
  • FIXED: Possible deadlock in a transaction commit due to different ordering in locking L_GENERATION and L_PREDICATE locks.
  • DOC: fix minor typo:
  • FIXED: Issue#195: cmpFloatNumbers() for NaN.
  • FIXED: Implement A_MPZ and A_MPQ instructions when using LibBF binding. This fixes using such numbers in expressions compiled with optimization enabled. Reported by Rick Workman.
  • FIXED: Issue#1091: optimised compilation of clauses containing big integers or rational numbers in expressions.
  • FIXED: Issue#1092: term_hash/2,4 crashes on Unicode strings.
  • ADDED: list_debug_topics/1 to search, only print active topics, etc. This predicate now uses print_message/2. debugging/0 is hooked to show the active topics.
  • ADDED: debugging/0: allow extensions using prolog_debug_tools:debugging_hook/0
  • DOC: Fixed PL_Q_CATCH_EXCEPTION interaction with the debugger.
  • DOC: Reviewed and updated foreign language sections on exception handling. Thanks to Peter Ludemann for pointing the many parts of the docs that were unclear or outdated.
  • DOC: Added some details for PL_exception()
  • FIXED: Issue#1087: crash on inlined unification against a rational number.
  • DOC: rational/1 and rationalize/1 use current notation.
  • PORT: msys2, add %MINGW_PREFIX%/bin to dll path
  • PORT: msys2, do not copy system dlls into home
  • ADDED: Prolog flag msys2 to detect the MSYS2 installation.
  • Package archive:
  • PORT: Simply use int64_t as older 3.x libarchive versions do not define la_int64_t. Simply using int64_t seems the easiest way out.
  • Package clib:
  • FIXED: uri_iri/2 to not decode encoding &=; in the query string.
  • FIXED: detach_IO/1: Protect I/O stream against garbage collection.
  • Package http:
  • FIXED: `1Inf -> 1.0Inf` syntax.
  • ENHANCED: More robust restoring of current output after redirection to the CGI stream.
  • ADDED: library(http/http_error): dynamic predicate suppress_code/1 to make the library silent on specific reply codes.
  • ENHANCED: Avoid confusing "Unknown message" from library http/http_error.
  • FIXED: Avoid recursion when garbage collecting HTTP sessions under Redis session management.
  • ENHANCED: Do not try to send websocket broadcast messages after shutdown progressed too far.
  • ADDED: library(http_unix_daemon) to broadcast http(shutdown) before calling halt(0).
  • ENHANCED: http_absolute_uri/2 to use the setting http:public_scheme or the port to find the scheme (http or https)
  • ENHANCED: Redis http session plugin to use caching to speedup checking whether a session is alive.
  • FIXED: Issue#120: term//2 (term to HTML) rendering of infix terms if these contain "member" terms with arity 2.
  • Package odbc:
  • PORT: Include patch from Debian for some 32-bit systems. Some versions of sql.h depend on HAVE_LONG_LONG. Our code does not use any of the properties for `long int`.
  • Package pldoc:
  • FIXED: Possible race condition when pldoc is loaded concurrently from multiple threads. Hook is installed before the predicates it needs are defined.
  • Package redis:
  • ENHANCED: Avoid hanging connection on invalid authentication.
  • ADDED: Split authentication for the redis instances from the sentinel network.
  • FIXED: Also connecting to the sentinels require authentication.
  • ADDED: Connect to a master through a sentinel network.
  • ADDED: Support Redis TLS connections.
  • Package sgml:
  • FIXED: Back skip over UTF-16. @UweR.
  • ENHANCED: Partial support for full Unicode handling ion Windows (UTF-16).
  • ADDED: Add ignore_doctype(+Bool) option to explicitly ignore DOCTYPEs embedded in XML
  • Package ssl:
  • FIXED: Allow HTTPS server to be started as Interface:Port.
  • Package sweep:
  • DOC: improve documentation for holes
  • ADDED: command to pipe output of Prolog goals to Emacs buffers * sweep.c (sweep_open_channel(), sweep_fd_open()): new helper functions for obtaining Prolog streams from Emacs pipe buffers. * sweep.pl (sweep_async_goal/2, sweep_interrupt_async_goal/2): new predicates.
  • sweeprolog.el (sweeprolog-async-goal): new command, executes a goal in a separate thread and redirects its output to a buffer with mode.. (sweeprolog-async-goal-output-mode): new major mode, derived from Compilation mode. (sweeprolog-mode-map, sweeprolog-prefix-map, sweeprolog-menu): bind sweeprolog-async-goal. * README.org (Executing Prolog Asynchronously): new manual section.
  • FIXED: possible race condition when signaling new top-level threads
  • ENHANCED: consult with library index for finding predicate defs * sweep.pl (sweep_predicate_location_/4): also check library_index/3.
  • sweeprolog-tests.el: add test for finding the source location of a predicate in the package clib.
  • FIXED: stale xref data when jumping across files with M-.
  • ADDED: right-click context menus in sweeprolog-mode * sweeprolog.el (sweeprolog-context-menu-find-module) (sweeprolog-context-menu-find-module-other-window) (sweeprolog-context-menu-describe-module) (sweeprolog-context-menu-find-file) (sweeprolog-context-menu-find-file-other-window) (sweeprolog-context-menu-describe-predicate): new commands, add to context menus by... (sweeprolog-context-menu-for-predicate) (sweeprolog-context-menu-for-module) (sweeprolog-context-menu-for-file): new functions, used in... (sweeprolog-context-menu-functions): new abnormal hook, used by... (sweeprolog-context-menu-function): new function. (sweeprolog-mode): add it to context-menu-functions.
  • README.org (Context Menu): new section.
  • ADDED: short description for tokens on mouse hover (help-echo)
  • sweep.pl (sweep_predicate_dependencies/2): new predicate. * sweeprolog.el (sweeprolog-enable-help-echo): new user-option, when non-nil sweeprolog-analyze-region-start-hook and sweeprolog-analyze-region-fragment-hook are extended with... (sweeprolog-analyze-start-help-echo) (sweeprolog-analyze-fragment-help-echo): new functions, manage the help-echo text property for Prolog text. * README.org ("Hover for Help"): new section about help-echo.
  • ENHANCED: improve semantic highlighting for several constructs
  • sweep.pl (sweep_color_normalized_/4): fix handling of non-callable terms, propagate type error expected type to Elisp. (sweeprolog_goal_kind_normalized/2): rename to... (sweep_goal_kind_normalized/2): normalize all goal and head classes.
  • sweeprolog.el (sweeprolog-analyze-fragment-to-faces): adapt to new info from sweep_goal_kind_normalized/2, and highlight some missing token kinds.
  • DOC: improve listings in the "Editing Prolog Code" section
  • ADDED: command for sending a goal to top-level from any buffer
  • sweeprolog.el (sweeprolog-top-level): extract buffer setup logic to... (sweeprolog-top-level-buffer): new function. (sweeprolog-top-level-send-string): new function, used by... (sweeprolog-top-level-send-goal): new command, reads a goal from the minibuffer and sends it to a Prolog top-level buffer. (sweeprolog-mode-map): bind it to C-c C-q. (sweeprolog-menu): add "Send Goal to Top-level" entry. * README.org ("Sending Goals to the Top-level"): new manual section.
  • DOC: explain how to follow source locations in top-level messages
  • MODIFIED: do not force set next-error buffer to Prolog buffer
  • ENHANCED: use terms at point as "future history" for term-search * sweep.pl (sweep_terms_at_point/2): new predicate. * sweeprolog.el (sweeprolog-terms-at-point): new function. (sweeprolog-read-term): use it for setting the future history. (sweeprolog-read-goal): new function. (sweeprolog-term-search): use it for reading a goal when called with prefix argument.
  • ENHANCED: Support refining term searches with arbitrary goals * sweep.pl (sweep_term_search/2): extend with an extra goal argument.
  • sweeprolog.el (sweeprolog-read-term): new function, similar to read--expression but for Prolog terms rather than Elisp expressions. (sweeprolog-term-search): use it, and prompt for goal with prefix arg.
  • ENHANCED: restore original point when a term search is quit
  • ADDED: command for finding terms subsumed by a given term * sweep.pl (sweep_term_search/2): new predicate. * sweeprolog.el (sweeprolog-term-search-in-buffer): new function. (sweeprolog-term-search): new command. * README.org ("Term Search"): new manual section.
  • FIXED: find next predicate definition more reliably
  • sweep.pl (sweeprolog_beginning_of_last_predicate/2) (sweeprolog_beginning_of_last_predicate/2): explicitly sort results, don't assume xref_defined/3 yields ordered results.
  • ADDED: user option to control predicate documentation composition * sweeprolog.el (sweeprolog-insert-pldoc-for-predicate): remove in favor of... (sweeprolog-insert-predicate-documentation): new function. (sweeprolog-format-term-with-holes): new utility function, used by... (sweeprolog-read-predicate-documentation-with-holes) (sweeprolog-read-predicate-documentation-default-function): new functions, used for... (sweeprolog-read-predicate-documentation-function): new user option, used by... (sweeprolog-read-predicate-documentation): new function, used by... (sweeprolog-document-predicate-at-point): refactor.
  • ADDED: New command sweeprolog-insert-term-with-holes * sweep.pl (sweep_format_term/2, sweep_current_functors/2): new predicates. * sweeprolog.el (sweeprolog-read-functor-history): new variable, history list for... (sweeprolog-read-functor): new function. (sweeprolog-forward-hole-repeat-mode): rename to... (sweeprolog-forward-hole-repeat-map): corrected name for keymap. (sweeprolog-analyze-end-font-lock): don't rely on sweeprolog--next-hole to move point. (sweeprolog-at-hole-p, sweeprolog-beginning-of-hole) (sweeprolog-end-of-hole): new functions, used by... (sweeprolog--previous-hole, sweeprolog--next-hole): revise. (sweeprolog--precedence-at-point): new function, used by... (sweeprolog-insert-term-with-holes): new command. (sweeprolog-mode-map): bind it to C-c C-m * sweeprolog-tests: test it. * README.org ("Filling Holes"): move to top and rename to... ("Holes"): document sweeprolog-insert-term-with-holes.
  • ENHANCED: use variable names from docs when inserting next clause
  • sweep.pl (sweep_format_head/2): new predicate. * sweeprolog.el (sweeprolog-insert-clause): use it.
  • ENHANCED: highlight holes in incomplete terms * sweeprolog.el (sweeprolog-predicate-completion-at-point): fontify holes when inserting them. (sweeprolog-analyze-start-font-lock): reset font-lock-face in analyzed region. (sweeprolog-analyze-fragment-to-faces): fix syntax error handling, don't highlight holes as it is done by... (sweeprolog-analyze-end-font-lock): new function, highlights holes in analyzed region when sweeprolog-highlight-holes is non-nil. (sweeprolog-analyze-region-end-hook): add it. (sweeprolog--hole): fix text property used for setting stickiness.
  • FIXED: possible crash after calling sweeprolog-restart
  • Package swipl-win:
  • PORT: qmake.pro and includes to compile in QtCreator (up to Qt 6.4)
  • Package xpceL:
  • TEST: Skip test if xpce cannot be found.

New in Portable SWI-Prolog 9.0.3 (Dec 20, 2022)

  • PORT: Fix crash in walking the Prolog stack for gcc 12 on arm 32-bit. This is caused by padding added in `struct queryFrame between saved_environment and top_frame`
  • PORT: Fixed rationalize/1 and cmpFloatNumbers() to fail due to gcc optimization using internal wide float registers rather than comparing 64 bit doubles. Not entirely sure this is our mistake or within GCC's claim to work with the extended float registers. Bottom line is that comparing a double (from memory, so 64 bits) to the result of a computation may return non-equal even if the extended float when forced to 64 bits is equal. This problem surfaced in i386 using gcc 12.2.0.
  • FIXED: Issue#119: library(apply_macros) goal expansion for phrase/3 using a partial terminal was too greedy. Uwe Neumerkel.
  • FIXED: Initialise Prolog flag encoding from locale name. Internal UTF-8 decoding is typically faster than the C library multibyte operations.
  • FIXED: clause/2,3: possible GC crash when dealing with moved unification. We cannot have references to the local stack and thus we must allocate the support variable on the global stack.
  • ENHANCED: If one of the standard streams of a thread has been closed, rebind the stream to the original process streams. This can happen if, for example, we create a thread while output is redirected to some stream. If now this stream is closed the thread ends up with a closed standard stream.
  • PORT: Build MacOS bundle using LibBF based big integers. Somehow the build for the universal binaries covering a large series of MacOS versions (since 10.14) breaks after uograde to MacOS Ventura when linking against libGMP. The results are random segfaults, bus errors and memory corruption.
  • Package http:
  • TEST: Avoid using test condition bindings.
  • Package mqi:
  • TEST: Avoid recorsive Python exception
  • Package plunit:
  • ADDED: current_test_unit/2 to enumerate the available unit tests.
  • Package redis:
  • TEST: More relaxed timing to make test pass on heavily loaded machines.
  • Package semweb:
  • PORT: Support full Unicode input for ntriples and trutle on Windows. Based on PR#108 by @mgondan.
  • Package sweep:
  • ADDED: new command sweeprolog-infer-indent-style * sweeprolog.el (sweeprolog-infer-indent-style): new command. * sweeprolog-tests.el: test it. * README.org ("Indentation"): mention it.
  • FIXED: stale predicate locations in loaded modified buffers * sweep.pl (sweep_predicate_location_/2,3): prefer xref over loaded predicate properties. * sweeprolog.el (sweeprolog-predicate-location): first analyze buffer if modified to update xref data.
  • Package xpce:
  • FIXED: file<-time default was accidentally to access where it used to be modified.
  • login:
  • Powered by SWI-Prolog 9.1.2

New in Portable SWI-Prolog 8.4.1-1 (Dec 14, 2021)

  • 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.
  • FIXED: Be more relaxed about existence of the current predicate when pushing and popping the compilation context.
  • 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.
  • 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().
  • 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. Better version than df1f0bf795a16edd313a2a25f0678ce044a4a71d
  • PORT: Alignment on ppc64el (Debian). See https://github.com/SWI-Prolog/issues/issues/104
  • 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.
  • 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.
  • 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: 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: det/1: avoid false non-determinism claim if all relevant choicepoints are debug choicepoints.
  • 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.
  • ADDED: Predicate property sig_atomic. Currently only for the built-in sig_atomic/1.
  • FIXED: Delay signals in prolog_exception_hook/4.
  • 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
  • Package cpp:
  • CLEANUP: SWI-cpp.h: more consistent type handling and silence several more casts.
  • COMPATIBILITY: SWI-cpp.h to use static_cast<type>(expression) to avoid warnings on modern C++ compilers.
  • Package http:
  • ADDED: JSON writer for dicts now have a hook json_dict_pairs/2 that allows the user to select keys from the dict and particularly define the order of keys in the resulting JSON.
  • ADDED: http_read_data/4: handle the input_encoding/1 option when using to(Type).
  • FIXED: range streams: be careful about race conditions when asynchronously finding all streams that refer to OS file handles.
  • Package jpl:
  • BUILD: Silence GCC-11 warning (ugly)
  • Package mqi:
  • UPDATE: Missing file from last commit
  • FIXED: File Handle Leak reported by @andrzej-at-mazurkiewicz-org Original bug report is: https://github.com/SWI-Prolog/packages-mqi/issues/13
  • Need to call: self._process.__exit__(None, None, None)
  • instead of:
  • result = self._process.wait()
  • as it will close the stderr/out handles too. Otherwise they will leak since they are used and thus opened (but not closed) by the Popen object.
  • TEST: Handle all failures from test_server_options_and_shutdown as warnings unless "SWIPL_TEST_FAIL_ON_UNLIKELY=y" This test has lots of threading and potential race conditions so it can fail when the system is heavily loaded.
  • Handle by catching all exceptions and only actually failing if SWIPL_TEST_FAIL_ON_UNLIKELY - y
  • DOC: Update URLs from EricZinda/swiplserver to packages-mqi
  • ADDED: All files needed to actually build the Python 'swiplserver' model and post to pypi.org so that 'pip install swiplserver' works Includes instructions on how to the build the model in /BuildingAndTesting.md
  • ENHANCED: Use new controlled options and automatic help.
  • ENHANCED: Include dependencies to make mqi run with disabled autoloading.
  • FIXED: Use argv rather than os_argv. Breaks on new argv_options/3.
  • Package odbc:
  • CMAKE: Requires minimally cmake 3.9
  • TEST: Include ODBC tests based on the environment variable SWIPL_TEST_ODBC_DRIVER. Also fixes cleanup of the ODBC tests.
  • FIXED: Ensure statement is closed in two scenarios.
  • FIXED: Properly translate non-ASCII ODBC messages to Unicode.
  • FIXED: Cleanup the remains of old work-arounds or broken MS SQLServer SQLColumns() and add a new one. odbc_table_column/3 stops with the error Invalid Descriptor Index trying to fetch the column name using SQLGetData(). The work-around sets the column with for this query to 8K, avoiding SQLGetData(). Thanks to Fernando Sáenz-Pérez for reporting and providing access to a server.
  • Package pengines:
  • ENHANCED: Provide CSS style wfs_undefined for undefined answers.
  • ADDED: portray//2 hook that plays a role similar to portray/1 for HTML rendering of terms.
  • Package protobufs:
  • FIXED: Issue #15 (long directory name) Shorten directory protoc_gen_prolog_pb to gen_pb for R build (R build outputs a warning if a the path is more than 100 bytes)
  • FIXED: uint32_codes/2 in mode (-,+) on may return a negative value on 32-bit systems.
  • Package redis:
  • TEST: Prevent occasional early termination in test(primes).
  • TEST: Make sure the Redis test group consumers are properly discarded.
  • Package semweb:
  • BUILD: Trick GCC-11 we are not really freeing a non-heap address.
  • Package sgml:
  • FIXED: xml_quote_cdata/3: possible race condition if two threads use this for the first time.
  • Package ssl:
  • BUILD: Silence (incorrect) GCC-11 uninitialized warning.
  • Package xpce:
  • PORT: remove Cygwin from targets requiring dllexport Cygwin ld uses auto-export by default. Mixing that with dllexport in some cases leaves other symbols unexported.
  • Signed-off-by: Corinna Vinschen <[email protected]>
  • BUILD: Avoid GCC-11 warning.
  • FIXED: Do not setup search path for library(pce) if --no-pce is given.

New in Portable SWI-Prolog 8.2.4-1 (Jan 27, 2021)

  • FIXED: Various small issues that allow using []/N (notably []/3) as a predicate. After report by Rick Workman.

New in Portable SWI-Prolog 8.2.3-1 (Nov 23, 2020)

  • [Nov 20 2020]:
  • FIXED: Typo in MemoryBarrier() based sync macros.
  • [Nov 19 2020]:
  • DOC: Fix priority of `|` operator. Spotted by Falco Nogatz.
  • [Nov 18 2020]:
  • FIXED: protect dynamic clauses in continuations. This patch solves the same problem as cca23badcbfb2dad7089696348aae56e50b84a3c, but also protects the clause itself during the execution of the continuation.
  • [Nov 17 2020]:
  • FIXED: Issue#706: call_continuation/1: environment clause reference cannot be from the blob in the continuation as this may be reclaimed in AGC. May cause a crash while getting a backtrace from restarted continuation. GC also uses the clause info, so this can probably crash as well. Reported by David Tonhofer.
  • PORT: Set MACOSX_DEPLOYMENT_TARGET for building the MacOS dependencies.
  • DOC: Corrext examples for rational numbers to use lowercase "r" instead of formerly discussed "R"
  • [Nov 15 2020]:
  • DOC: CHR section names to include CHR to make them easier to find and reduce ambiguity in search results.
  • [Nov 11 2020]:
  • FIXED: Do not use sandboxing during autoloading. Note that the autoload directive is not permitted in sandboxed code, so users cannot load untrusted code using autoload/1,2.
  • [Nov 10 2020]:
  • FIXED: debugger could reset wrong variable when debugging a redo action. May lead to incorrect behaviour in debug mode.
  • FIXED: set_prolog_flag/2: propagate errors from switching debug mode using the debug flag.
  • [Nov 9 2020]:
  • ADDED: PL_put_term_from_chars(): flag CVT_EXCEPTION to raise an exception on a failure rather than returning the exception term.
  • ENHANCED: PL_get_nchars(): immediately write to a UTF-8 string if REP_UTF8 is specified. This used to first write ISO Latin 1, then wchar and finally transfer to UTF-8 for terms that cannot be represented as ISO Latin 1.
  • FIXED: PL_get_nchars(): avoid pending exception in write conversion if the term cannot be represented as ISO Latin 1.
  • FIXED: XDG path handling for common_config. common_data returned both the common data and config paths, while common config had no locations.
  • FIXED: incremental tabling with answer subsumption call to start reevaluation.
  • [Nov 6 2020]:
  • TEST: wrong format/3 usage causing a failure unrelated to the test.
  • [Nov 5 2020]:
  • TEST: Relax XSB tabling test abol_test3b.P as reclaiming the tables is not guaranteed.
  • FIXED: Possible race in shared table handling. Leads to "Oops, worklist trie doesn't point back at me!" messages.
  • [Nov 4 2020]:
  • TEST: Test file for destroying local definitions.
  • [Nov 3 2020]:
  • FIXED: Race between destroying thread-local definitions and clause garbage collection. With Matt Lilley.
  • FIXED: Thread-local definitions corrupted the argument declaration. Matt Lilley.
  • DOC: debug/0 does not affect trace points.
  • [Nov 2 2020]:
  • FIXED: Issue#702: call_with_inference_limit/3 determinism when the inference limit is exceeded. David Tonhofer.
  • [Nov 1 2020]:
  • DOC: reset/3: document interaction between delimited continuations and choicepoints.
  • FIXED: Save/restore tabling status over break/0.
  • [Oct 31 2020]:
  • FIXED: Possible assertion failure in WFS handling for tabling on 32-bit hardware. Lev Lamberov.
  • Package clib:
  • [Nov 20 2020]:
  • FIXED: library(udb_broadcast): determine subnet mask for 127.*.*.* network. Jacob Friedman.
  • [Nov 13 2020]:
  • ADDED: uri_resolve/3 and related predicates that take a base URI to accept a string in addition to an atom for the base URI.
  • Package cql:
  • [Nov 15 2020]:
  • DOC: Add CQL to the section headers to improve searching.
  • Package libedit:
  • [Oct 28 2020]:
  • FIXED: Avoid double preparation of the libedit signal handling. Double preparation may lead to an infinite recursion in el_sighandler() and can happen if multiple threads prepare the library.
  • Package ltx2htm:
  • [Nov 15 2020]:
  • ADDED: Support tabulary environment.
  • Package pldoc
  • [Nov 16 2020]:
  • ADDED: Create a link from ... flag `name` ... if name is a current Prolog flag.
  • [Nov 15 2020]:
  • ADDED: `name/arity` to create a link as name/arity. Using double backticks creates a predicate indicator that is not a link.
  • ENHANCED: Use LaTeX package tabulary for dealing with tables that have one or more columns with long text in cells.
  • ADDED: PlDoc Wiki tables to use a possible column alignment specification and interpret the header.
  • [Nov 14 2020]:
  • ADDED: Markdown notation [@cite;@cite;...] to allow for citations in the Markdown in the documentation pipeline. After discussion with Eric Zinc.
  • Package semweb:
  • [Nov 19 2020]:
  • FIXED: sparql_query/3: ignore white space in values. Johan Romme. Bug introduced by ef7ee735df9445b061cecc23c5d707d51e470edd
  • Package ssl:
  • [Nov 4 2020]:
  • FIXED: Possible buffer overflow when reading certificates with too long lines. Matt Lilley.
  • Package table:
  • [Oct 30 2020]:
  • FIXED: Handle empty table files.
  • Package xpce:
  • [Nov 17 2020]:
  • FIXED: Example defaults file: emacs_prolog_mode.dependency_directive class variable must be quoted.
  • [Nov 10 2020]:
  • ENHANCED: Cleanup trace/spy dialog

New in Portable SWI-Prolog 8.0.3 (Aug 8, 2019)

  • SSL: Updated versions for Windows and MacOS

New in Portable SWI-Prolog 7.6.4 (Jan 16, 2018)

  • CLEANUP: Avoid strict-aliasing issues in some of the Windows code.
  • FIXED: Port to 32-bit platforms. Fixes 73e5eb44f40ae3e96e25bff39d7c50c2e016f6d9.
  • FIXED: Possibility of GC thread missing signals, notably to abort when the system is idle.

New in Portable SWI-Prolog 7.6.3 (Dec 13, 2017)

  • FIXED: Avoid triggering GC in fast if-then-else condition. If we do so we have to make sure to mark the `then' branch in GC, but the simplest seems to avoid GC in the first place. Also added an assertion that we are not in this position. Reported by Alan Baljeu.
  • DEBUG: Fix print_val() for summarised atoms
  • FIXED: cherry-pick of 4ffba6cc6648e1ef18165d0faf4995327965b25e needed more edit.
  • FIXED: exception/3 handling for undefined predicates if the predicate is locally defined rather than imported and thus the predicate id does not change. Breaks lazy loading of wordnet driver.

New in Portable SWI-Prolog 7.6.2 (Nov 27, 2017)

  • FIXED: Possibly crash in AGC when another thread is doing findall. Keri Harris.
  • ENHANCED: library(prolog_colour): handling of cross-module calls.
  • FIXED: Avoid instantiation errors when colouring insufficiently instantiated goals.
  • ENHANCED: Colour library: classify m:Var and m:noncallable as errors.
  • FIXED: predicate_property(m:P, autoload(File)) raised an instantiation error instead of enumerating the autoloadable predicates.
  • PORT: Global generation handling on machines without atomic 64-bit operations. James Cowgill. This is a temporary workaround. On the long run we should use libatomic to guarantee properly ordered operations that are fully portable. This should be a temporary fix for 32-bit platforms (mips, mipsel, powerpc, powerpcspe)
  • ADDED: Multiline CSV rows where newlines are embedded in quoted fields.
  • FIXED: atom_is_named_var(): incorrect classification of wide-character atoms leading to false multiton messages. Arthur Wang.
  • FIXED: _<non-upper> is not subject to multiton check
  • FIXED: atom-garbage collection when compiled for single threading. Abramo Bagnara.
  • DOC: Document engine_destroy/1
  • FIXED: maplist/N expansion for qualified goals. Samer Abdallah.
  • FIXED: Engine symbol's are not referenced to allow reclaiming engines in atom-gc. Thus, we should also not unregister them on completion.
  • DEBUG: Fix printing -1 reference issues
  • CLEANUP: Duplicate test in atom-completion
  • CLEANUP: PL_unregister_atom(): style and properly check for references dropping below zero.
  • FIXED: veto atom-destruction in the type->release and GD->atoms.gc_hook.
  • DOC: asserta/1,2, assertz/1,2, assert/1,2: join, add example.
  • Package jpl
  • PORT: Find Java9 shared object dir from the java home.
  • PORT: Also check new Java 9 directory structure
  • Package pldoc
  • ENHANCED: Do not not include the synopsis when including a predicate documentation into markdown using [[Name/Arity]].
  • Package plunit
  • ADDED: show_coverage/2. Predicate show_coverage/2 receives a list of module names of interest as second argument and it prints detailed information of the uncovered clauses that belong to any of those modules. Statistics have been improved. Clauses originated from system calls such as :-use_module or pldoc comments are no longer taken into account to compute for the total number of clauses in a file.
  • Package semweb
  • FIXED: prioritize base URI explicitly set through option.
  • FIXED: File input clause for read_rdfa/3 would not be reached.
  • PORT: ntriple parser for platform with unsigned char (arm)
  • CLEANUP: Move RDF prefix handling into its own library as this can also be used for XML and other RDF backends.
  • FIXED: rdf_nth1/3, rdf_nth0/3: really raise a type error.
  • Package ssl
  • ENHANCED: SAML certificate checking: ignore data appearing before the first BEGIN CERTIFICATE delineator and everything after the first END CERTIFICATE
  • Package xpce
  • ADDED: PceEmacs: Support two context arguments for colour fragments

New in Portable SWI-Prolog 7.6.1 (Nov 10, 2017)

  • FIXED: maplist/N expansion for qualified goals. Samer Abdallah.
  • FIXED: Engine symbol's are not referenced to allow reclaiming engines in atom-gc. Thus, we should also not unregister them on completion.
  • DEBUG: Fix printing -1 reference issues
  • CLEANUP: Duplicate test in atom-completion
  • CLEANUP: PL_unregister_atom(): style and properly check for references dropping below zero.
  • FIXED: veto atom-destruction in the type->release and GD->atoms.gc_hook.
  • DOC: asserta/1,2, assertz/1,2, assert/1,2: join, add example.
  • DOC: LaTeX syntax
  • FIXED: Possible write reordering when creating the predicate supervisor code.
  • PORT: Enable shared objects for aarch* architecture on Linux.
  • FIXED: possible race when rehashing functors
  • ADDED: load_files/2: option check_script(+Boolean) to prevent checking for a #! script line.
  • FIXED: Race conditions around GD->functors.highest.
  • TEST: More stressful test that found several issues in atom handling.
  • FIXED: Avoid reordering of memory access impact lookupFunctor().
  • FIXED: possible race condition when calculating the highest atom index
  • CLEANUP: Move true(type, PL_BLOB_UNIQUE) to inside the loop.
  • FIXED: Allow for safe vetoing of atom destruction from the release hook.
  • FIXED: Avoid overflow of atom reference counts.
  • FIXED: race condition(s) when creating new atoms
  • FIXED: race condition when iterating over atom table
  • ENHANCED: Avoid creating modules for '$def_modules'/2 (part of expansion)
  • ENHANCED: Avoid creating modules for qualified goals to non-existing modules.
  • FIXED: Issue#275: mv/2 not to demand the target to exist when moving a single file.
  • DOC: number_chars/2 and name/2: clarified.
  • DOC: Clarify the set predicates from library(lists). Still incomplete and their definition is highly dubious.
  • DOC: Removed style_check(+atom) from the docs and references to it. Wouter Beek.
  • DOC: Document that number_codes/2 supports number signs.
  • DOC: Document the difference between put_dict/4 and `.'-notation.
  • DOC: Fixed documentation of get_dict/5.
  • DOC: Typo in website name Wikipedi[A]; also HTTPS.
  • DOC: Document the Reference (handle) argument of assertz/2.
  • DOC: GET is an HTTP method, not a protocol.
  • DOC: Document the support for Wildcard expansion in mv/2.
  • DOC: Document important limitations of union/3.
  • DOC: Explain the difference between get_dict/3 and `.`-notation.
  • DOC: Document the default value of option eof_action/1 to open/4. Also fixes some small typos.
  • DOC: Documented the full range of control characters.
  • DOC: Fixed examples that are given for char_type/2.
  • DOC: Completed the table of supported types for must_be/2.
  • DOC: Fixed typo in example for predicate_options.
  • FIXED: Race condition in reserveAtom().
  • FIXED: Way simpler handling for starting AGC/CGC on a separate thread lazily.
  • FIXED: more issues around the creation of the gc thread. Note that these problems only affect programs in the startup phase.
  • FIXED: Continue if we cannot create the gc thread
  • TEST: Test race conditions around gc thread startup.
  • FIXED: Added thread_create/2 to xref meta-declarations.
  • FIXED: Possible deadlock starting the gc threads. With help from Keri Harris.
  • FIXED: Crash on ARM cpus due to memory access reordering. With lots of help from Keri Harris. This patch introduces some additional state in free atoms to make similar issues easier to debug.
  • FIXED: Cleanup recorded database after finishing enumeration. Can have a very big performance impact and memory reduction on programs that use recorded/2,3. Fabrizio Riguzzi.
  • FIXED: recorded database race condition.
  • FIXED: get_procedure() using GP_FINDHERE should not create the target module.
  • ENHANCED: current_op/3: avoid creating a module if the name is qualified with the name of an non-existing module.
  • ENHANCED: get_procedure(): avoid creating modules and undefined procedures.
  • ENHANCED: source_file/2: avoid creating predicate to find files from its autoloaded definition.
  • ENHANCED: Avoid '$c_current_predicate'/2 from creating the target module on qualified calls.
  • ENHANCED: write_term/2,3: if a module(M) argument is provided, but the requested module does not exist use user. This avoids recreating the pengine module if a delayed pull_response query arrives after the pengine destroy.
  • ADDED: csv_read_row/3: handle r delimited files.
  • FIXED: 65581363122939a884ea0583277b98f8e9d59a6e completed to actually read r line-terminated CSV files.
  • DOC: pack_property/2: make clear this concerns local packs. Nicos Angelopoulos.
  • ENHANCED: Issue#274: better determinism of stream_property(-,+). Douglas Miles.
  • Package clib:
  • DOC: Issue#18: uri_is_global/1. Wouter Beek.
  • DOC: Document structure of Components in uri_authority_components/2.
  • FIXED: graceful shutdown of sockets on Windows. An FD_CLOSE event arriving after an EOF has been read must not cause a WSAECONNRESET error
  • FIXED: possible race condition on Windows when closing sockets
  • Package clpqr:
  • CLEANUP: Use nb_current/2 instead of catch around nb_getval/2.
  • CLEANUP: Meta-predicate declarations, removing unneeded qualifications and make code more tractable by avoiding predicate renaming using goal_expansion/2.
  • Package http:
  • DOC: Part of the documentation of http_open/3 was not processed.
  • DOC: Fixed typo in module http_log.
  • DOC: Mention all supported HTTP methods for http_read_request/2.
  • DOC: GET is an HTTP method, not a protocol.
  • DOC: Fixed missing closing brackets.
  • FIXED: http_schedule_logrotate/2: Allow for full weekday as the docs state should be allowed.
  • Package pengines:
  • FIXED: Infinite loop if solutions(all) is requested and the query raises an error.
  • SECURITY: pengine_property/2: prevent revealing information about other Pengines. This is not a security issue for the server, but does allow attackers to hijack Pengines created by other users.
  • DOC: Fixed typo.
  • ADDED: pass on style to <img>
  • Package semweb:
  • PORT: ntriple parser for platform with unsigned char (arm)
  • DOC: The representation of SPARQL NULL values in sparql_query/3.
  • DOC: Refer users of rdf_atom_md5/3 to the modern crypto library.
  • DOC: Improved documentation for lookup/2 in rdf_statistics/1.
  • DOC: Improved documentation of rdf_global_term/2. Document that both rdf_global_id/2 and rdf_global_object/2 are used.
  • DOC: fixed ungrammatical sentence
  • ADDED: sparql_query/3: endpoint(+Endpoint) option as alternative to separate host, scheme, etc. specification.
  • Package sgml:
  • DOC: minor typo
  • Package xpce:
  • BUILD: Deal with renamed README --> README.md
  • Package zlib:
  • FIXED: Update byte position of stream such that seek/4 and byte_count/2 keep working. Should/can we also update the other?

New in Portable SWI-Prolog 6.6.0 (Jul 9, 2014)

  • Processing of #!, binding a file to an interpreter in Unix no longer tries to be smart about processing options to the interpreter. The effect of this change depends on the Unix versions: some only pass the first option, others pack all options into one and yet others pass the options after breaking them.
  • The Prolog flag argv only provides arguments that have not been processed by Prolog.
  • The init file .plrc (pl.ini on Windows) is no longer searched for in the working directory for security reasons.

New in Portable SWI-Prolog 6.4.1 (Oct 30, 2013)

  • Updated the RDF library to version 3. Anyone caring about RDF was probably already using the development version for this reason. Added fast parsers for ntriples, Turtle and TriG formats.
  • Introduction of quasi quotation for smooth and safe inclusion of external language snippets
  • Upgrade of PlDoc to accept the common markdown constructs.
  • Many enhancements to the development tools, HTTP libraries, clib package. etc. Better support for Unix daemon processes (syslog, UID/GID management, etc.)
  • A start for locale handling (supporting format/3, notably writing locale specific large integers.
  • Lots of stability stuff: fixed crashes, portability patches, build system enhancements, etc.

New in Portable SWI-Prolog 6.2.5 (Jan 8, 2013)

  • Initial version of the `pack' package manager
  • Better source file handling, notably wrt. :- include(File).
  • Many fixes to the debugger, improving source handling and the logic that decides on which ports are hidden.
  • Windows version now build using the MinGW compiler project, resulting in 10-20% speedup. Enhancements to swipl-win.exe console: copy/paste and color support.