SWI-Prolog Changelog

What's new in 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 SWI-Prolog 9.3.3-1 Development (Mar 15, 2024)

  • FIXED: tell/1: properly manage standard stream references.
  • FIXED: Stream reference counting and reset when closing a standard stream.
  • FIXED: Memory leak in string_bytes/3.
  • FIXED: Properly close temporary redirect to a string tellString()/toldString() could fail to reclaim the temporary stream object.

New in SWI-Prolog 9.3.2-1 Development (Mar 1, 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.

New in SWI-Prolog 9.2.0-1 (Jan 31, 2024)

  • ADDED: library(dom) (WASM version) bind/4: allow passing JavaScript objects.
  • FIXED: Qlf file generation for :- include(File) The include statements can come in more places, even in the middle of a predicate. This changes the identifier from 'I' to 'L' to make the statement unique in all contexts and defines handling the include statements.

New in SWI-Prolog 9.1.22-1 Development (Jan 26, 2024)

  • MODIDIED:
  • library(prolog_pack) This is an extensive rewrite of the package infra structure. The pack format has not changed. A brief summary of the changes:
  • Plan the installation of multiple packages, selecting a compatible combination.
  • Plan the installation, including dependencies before installing anything, first asking consent from the user. On accept, the packs are downloaded and the build process is established.
  • Easily support installing packs specifically for a project in addition to user and system-wide packs.
  • More informative listing of packs, including listing only outdated packs.
  • More work on the app pack.

New in SWI-Prolog 9.1.22-1 Development (Jan 26, 2024)

  • MODIDIED:
  • library(prolog_pack) This is an extensive rewrite of the package infra structure. The pack format has not changed. A brief summary of the changes:
  • Plan the installation of multiple packages, selecting a compatible combination.
  • Plan the installation, including dependencies before installing anything, first asking consent from the user. On accept, the packs are downloaded and the build process is established.
  • Easily support installing packs specifically for a project in addition to user and system-wide packs.
  • More informative listing of packs, including listing only outdated packs.
  • More work on the app pack.

New in SWI-Prolog 9.1.21-1 Development (Dec 15, 2023)

  • FIXED: Avoid dependency from library(edit) on library(pce).
  • FIXED: Loading library(readutil) without foreign support Was broken since the changes to support static extensions.
  • CLEANUP: list_debug_topics/1 to use a single print_message/2 call. Also fixes hooking into debugging/0

New in SWI-Prolog 9.1.20-1 Development (Nov 30, 2023)

  • DOC: Improve `swipl --help` (list "app" mode)
  • SANDBOX: Declare flag write_attributes as safe. This may call portray, but local definitions are verified and global definitions cannot be changed.
  • CLEANUP: Move installation locations to cmake/Locations Moving it into a separate file keeps the main file short and it needs to be before Ports because we need to act on them. Possibly though, we need part of the locations before and part after the Ports? As is, that does not seem to be the case. Alternatively we could move part of this into the Port files?

New in SWI-Prolog 9.1.19-1 Development (Nov 16, 2023)

  • ADDED: create_prolog_flag/3: type(oneof(ListOfAtoms)) This patch also cleans up the relation to create_prolog_flag/3 and existence of a flag with some value. Adds test cases.
  • MODIFIED: set_prolog_flag/2: convert Booleans If set_prolog_flag/2 is used to create a new flag and the value is an atom that is recognised as a Boolean, normalise the value.
  • ADDED: must_be/2 and friends: constructed types and compounds Allow for e.g. compound(atom-integer) to express a pair mapping an atom to an integer. Also introduces constructed types such as (atom;integer)

New in SWI-Prolog 9.1.18-1 Development (Nov 1, 2023)

  • ADDED: Start applications using swipl app-name [arg ...]
  • CLEANUP: Code and docs for '$initialise'/0 that starts the system

New in SWI-Prolog 9.1.17-1 Development (Oct 16, 2023)

  • MODIFIED: Make the Prolog flag float_overflow to affect read_term/3. With this flag setting, too large floats are read as infinity rather than raising a syntax error.
  • MODIFIED: Issue a warning on suspect autoloading The autoloader now issues a warning if it loads a library that contains global goal or term expansion rules. Expansion typically improves performance or otherwise enhances the functionality of some of the predicates defined in the module.
  • FIXED: Preserve table properties on reconsult. Reported by Jan Burse.
  • CLEANUP: Removed unfinished and not maintained packages/cpproxy
  • FIXED: PL_thread_attach_engine()/PL_thread_destroy_engine() on main thread The main thread did not set the open_count to 1, causing hthe attach/destroy cycle in the main thread to kill the main thread.
  • DOC: read_string/3 [no ci]
  • DOC: clarify some details of stream error handling
  • TEST: Enable rational number tests when using LibBF.
  • TEST: Test suite for bomb DoS vulnerabilities.
  • SECURITY: Allow interrupts in the compiler This avoids using the "bomb" DoS attack using assertz/1 and friends.
  • SECURITY: Allow interrupts in term_variables/2 and numbervars/4 variants Some of these variant goals require processing the tree such that shared terms are walked normally. Such goals can take exponential time. This patch allows processing interrupts.
  • Without this, notably services such as SWISH that allow users to run arbitrary Prolog goals become subject to DoS attacks.
  • ENHANCED: Speedup arithmetic comparision in non-O mode.
  • Package cpp:
  • ENHANCED: PlStream error handling + wrapper methods (and remove PlAcquireStream)
  • Package http:
  • ENHANCED: Pass number reading exceptions rather than generating invalid_number.
  • Package ltx2htm:
  • FIXED: Various math symbols Unicode translation
  • Package plunit:
  • ENHANCED: If --on-warning=status or --on-error=status is active, consider such messages testv failures When running tests using --on-error=status, printing an error message that does not cause a test to fail silently ignores the message while Prolog exits with status 1. That is hard to debug. Now, if these flags are present, tests that emit warnings or errors are considered failed and thus the test is printed.
  • Package ssl:
  • FIXED: Avoid leaking file handle in test
  • PORT: Handle the zlib OpenSSL dependency correctly on Windows.
  • Package swipy:
  • FIXED: Avoid crash in callback when finializing.
  • DOCS: Documentation updates Also enhanced py_all_lib_dir/0-2
  • MODIFIED: Renamed janus.Query() into janus.query().
  • MODIFIED: Renamed janus.once() to janus.query_once() Old function is still available as deprecated function. As this is under discussion, it might be wise to stick to once() until the next release.
  • ADDED: apply() functional style iterator Also makes the benchmarks look nice and flexible to handle.
  • ADDED: janus.apply1() As agreed in the Oct 13 Janus meeting. The name is still tentative.
  • ENHANCED: Allow initializing Python in a thread and terminate that thread.
  • FIXED: Allow clean exit from py_shell/0 using quit()
  • ENHANCED: Allow Python threading to continue when inside a Prolog thread.
  • ADDED: py_gil_owner/1.
  • ADDED: py_pp/1-3: option nl(Bool) to add a newline. Previous versions did not add a newline. Now we do by default, while adding nl(false) provides the old behavior.
  • FIXED: Multithread support Improve interaction with the Python GIL. Claim the GIL for printing Python object references from Prolog (<py_<Class>>(Ref)).
  • ADDED: Partial attempt to get rid of Python cleanly at shutdown.
  • FIXED: Avoid main thread keeping the GIL This allows creating Python threads and have these making callbacks.
  • ADDED: Allow calling Prolog from multiple Python threads.
  • PORT: Only use Python3.dll if it really exists.
  • FIXED: Wrong order in Python initialization for old Python versions.

New in SWI-Prolog 9.1.16-1 Development (Sep 26, 2023)

  • PORT: Partial work to allow MSVC build under Conda. This patch works around issues for CMake FindThreads.cmake. It also explicitly enables MSVC `/MD` to compile the packages if threading is enabled.
  • BUILD: Runtime configuration during boot for Windows As, on Windows, we install all DLLs in the same directory we do not need to add the package bin dirs to the foreign search path. But, we must use prolog_to_os_filename/2 to ensure proper handling of the search based on the executable.

New in SWI-Prolog 9.1.15-1 Development (Sep 6, 2023)

  • BUILD: Avoid dependency on Threads::Threads when building single threaded. This applies to the packages and blocks e.g., the WASM build.
  • DOC: check/0 Document new checks and using check/0 for batch mode static analysis (linter).
  • ADDED: check/0: run check_predicate_options/0.
  • FIXED: check_predicate_options/0: avoid several false warnings.
  • ADDED: must_be/2: type list_or_partial_list(Type)

New in SWI-Prolog 9.1.15-1 Development (Sep 6, 2023)

  • BUILD: Avoid dependency on Threads::Threads when building single threaded. This applies to the packages and blocks e.g., the WASM build.
  • DOC: check/0 Document new checks and using check/0 for batch mode static analysis (linter).
  • ADDED: check/0: run check_predicate_options/0.
  • FIXED: check_predicate_options/0: avoid several false warnings.
  • ADDED: must_be/2: type list_or_partial_list(Type)

New in SWI-Prolog 9.1.14-1 Development (Aug 14, 2023)

  • PORT: Further refine terminal support detection. Recent regression cause tty_size/2 to be undefined on systems where it can be supported.
  • ENHANCED: Compile all plugins using -fvisibility=hidden
  • ENHANCED: Use visibility attribute for install_t This allows compiling plugins with gcc -fvisibility=hidden, reducing the risc for symbol conflicts and reducing load time.
  • ADDED: open_shared_object/3: support all glibc RTLD_* options.
  • DOC: Clarify some details of blob and I/O functions
  • PPA: Dropped kinetic, added lunar
  • Package clib:
  • FIXED: Export install function from hashstream.so
  • Package cpp:
  • CLEANUP: Simplify blob interface and more Simplify blob interface (PlBlob) - Add PlTerm::unify_blob for unique_ptr - Add try/catch to blob callbacks - Improve documentation of PlBlob Rename some implementation functions to more meaninful names Fix inverted condition test (zero vs non-zero return code) Move some code from SWI-cpp2.h to SWI-cpp2.cpp Add PREDICATE_CATCH macro to remove copy&paste code duplication Rename some example classes to improve the documentation Improve some garbage collection tests for blobs Update with changes from swipl v9.1.12
  • Package ltx2htm:
  • ENHANCED: Use more Unicode characters for math commands.
  • Package sgml:
  • FIXED: Race condition in dtd_property/2 Can lead to Domain error: dtd_property’ expected, found entities(_37838)'
  • Package sweep:
  • PORT: Explicitly export the symbols we need By default, plugins are now compiled with hidden visibility for internal symbols.
  • [Jun 23 2023]
  • MODIFIED: Replace "faces styles" with a theme emulating PceEmacs This adds a custom theme called 'sweeprolog-pce' that mimics the highlighting of SWI-Prolog's built-in editor, PceEmacs. It obsoletes the "faces styles" feature that Sweep provided thus far. For backward compatibility, The user option 'sweeprolog-faces-style' is retained and mostly still respected.
  • Thanks to Stefan Monnier for suggesting this approach for simplifying Sweep's code and making it more conformant with Emacs conventions.
  • sweeprolog-pce-theme.el: New file.
  • sweeprolog.el: Remove 'sweeprolog-defface' macro its 'sweeprolog-*-face' functions, use plain face definitions and refer to them directly by their names instead. Also extend 'custom-theme-load-path' to include the new sweeprolog-pce-theme.el.
  • README.org (Semantic Highlighting): Replace "Available Styles" subsection with new subsection "PceEmacs Theme".
  • [Jun 20 2023]
  • DOC: Extend the "Overview" manual section * README.org (Main Features) (Comparison with Emacs's built-in Prolog mode): New subsections.
  • [Jun 18 2023]
  • ADDED: Persistent history for Sweep top-levels This adds a new user option that controls the value of 'comint-input-ring-file-name' in Sweep top-level buffers.
  • sweeprolog.el (sweeprolog-top-level-persistent-history): New user option. (sweeprolog-top-level-sentinel) (sweeprolog-top-level-setup-history): New functions. (sweeprolog-top-level-setup-buffer): Call 'sweeprolog-top-level-setup-history' when creating a new top-level buffer.
  • [Jun 14 2023]
  • FIXED: Correctly recognize DCG grammar rules in 'C-c C-d' * sweeprolog.el (sweeprolog-beginning-of-predicate-at-point): Also return the module and neck operator of the predicate at point. (sweeprolog-insert-predicate-documentation) (sweeprolog-read-predicate-documentation-function) (sweeprolog-read-predicate-documentation-with-holes) (sweeprolog-read-predicate-documentation-default-function) (sweeprolog-read-predicate-documentation) (sweeprolog-document-predicate-at-point): Adapt to support DCGs and non-local predicates.
  • [Jun 11 2023]
  • ENHANCED: Guess argument names for DCG grammar rules * sweeprolog.el (sweeprolog-predicate-completion-at-point) (sweeprolog-insert-clause): Support guessing argument names from documentation also for DCG grammar rules.
  • ENHANCED: Also highlight "undefined" head terms
  • ENHANCED: 'sweeprolog-find-predicate/module' improvements Allow finding modules and predicates in another window with prefix argument. Also improve prompt for 'sweeprolog-find-predicate'.
  • sweeprolog.el (sweeprolog-read-predicate-prompt): Remove trailing colon and space. (sweeprolog-predicate-visible-p-function): New user option. (sweeprolog-read-predicate): Use it, and format PROMPT with predicate at point as the default argument. (sweeprolog-find-module) (sweeprolog-find-predicate): Add optional argument OTHER-WINDOW. (sweeprolog-describe-predicate): Adapt PROMPT argument passed to 'sweeprolog-read-predicate'.
  • README.org (Finding Prolog Code): Expand.
  • [Jun 8 2023]
  • ENHANCED: Improve DCG support Take into account DCG grammar rules and ensure they're supported all around. Crucially, allow 'sweeprolog-describe-predicate' to display documentation for DCG grammar rules.
  • FIXED: Don't change hooks globally * sweeprolog.el (sweeprolog-mode): Extend 'kill-buffer-hook' and 'context-menu-functions' locally rather than global.
  • [Jun 6 2023]
  • ENHANCED: Add tooltip info for string-stye DCG terminals
  • ENHANCED: Export DCG non-terminals as 'foo//N', not 'foo/N+2' * sweep.pl (strip_det/2): Handle DCG non-terminals with determinism specification. (sweep_local_predicate_export_comment/2, sweep_exportable_predicates/2) * sweeprolog.el (sweeprolog-local-export-comment) (sweeprolog-local-export-comment): Adapt for DCG non-terminals.
  • ENHANCED: Highlight string-style DCG terminals
  • [Jun 1 2023]
  • ADDED: highlighting and tooltip info for declaration options * sweep.pl (sweep_color_normalized_/4): Handle 'decl_option/1' fragments.
  • sweeprolog.el (sweeprolog-declaration-option): New face, used in... (sweeprolog-analyze-fragment-to-faces): ...for 'decl_option' frags. (sweeprolog--help-echo-for-declaration-option): New function. (sweeprolog-analyze-fragment-help-echo): Use it.
  • [May 30 2023]
  • ADDED: command for inserting example usage comments * sweeprolog.el (sweeprolog-top-level-example-mode): New minor mode. (sweeprolog-make-example-usage-comment): New command. (sweeprolog-mode-map): Bind it.
  • README.org (Example Usage Comments): New section.
  • [May 26 2023]
  • ADDED: New command for expanding macros * sweep.pl (sweep_expand_macro/2): New predicate. * sweeprolog.el (sweeprolog-expand-macro-at-pos): New function. (sweeprolog-expand-macro-at-point): New command. (sweeprolog-context-menu-functions): Add... (sweeprolog-context-menu-for-macro): New function. * README.org (Macro Expansion): New section.
  • ADDED: Highlighting and tooltip info for macros * sweep.pl (sweep_color_normalized_/4): Handle 'macro(String)' terms. * sweeprolog.el (sweeprolog-macro): New face. (sweeprolog-analyze-fragment-to-faces) (sweeprolog-analyze-fragment-help-echo): Handle 'macro' fragments.
  • FIXED: tokenizing adjacent operators Make Sweep's Prolog tokenization functions more careful in their handling of unrelated adjacent operators. This fixes an issue that affects term-based movement commands and other commands that rely on 'sweeprolog--forward-sexp' and friends.
  • sweeprolog.el (sweeprolog-next-token-boundaries) (sweeprolog-last-token-boundaries): Fix handling of adjacent (distinct) operators.
  • sweeprolog-tests.el (forward-sexp-with-adjacent-operators): New test case.
  • [May 24 2023]
  • MODIFIED: Remove '-face' suffix from face names Remove the '-face' suffix from the names of all defined faces as prescribed in (info "(elisp)Defining Faces").
  • [May 20 2023]
  • ENHANCED: faster completion-at-point for predicates Filter predicate completion candidates according to the text near point before formatting and computing argument names. This makes completion-at-point for predicates much faster when there are lots of known predicates.
  • sweeprolog.el (sweeprolog-predicate-completion-at-point): Pass (partial) functor at point to...
  • sweep.pl (sweep_predicate_completion_candidates/2): Filter predicates based on new Sub argument.
  • Package swipy:
  • FIXED: janus.Query(): properly handle exceptions.
  • ADDED: Allow compiling a Python string and compile into a module.
  • MODIFIED: Renamed installed module to janus_swi
  • COMPAT: added is_py_object/1, renamed add_py_libdir/1,2 to py_add_libdir/1,2
  • FIXED: Several issues wrt Python reference counts.
  • COMPAT: Use @true, @false and @none for the Python constants.
  • COMPAT: Functor for PyTuples in Prolog changed to -/N Decided in Zoom call August 11.
  • FIXED: Wrong return code (ignoring error)
  • FIXED: Memory leak in py_iter/2,3
  • MAINTENANCE: Use debug version of Python when enabling asan.
  • FIXED: PyEval_GetBuiltins() returns a borrowed reference Decrementing destroys the builtins ...
  • FIXED: We should not Py_DECREF the output of PyErr_Fetch()
  • FIXED: the output of PyUnicode_AsUTF8AndSize() disappears with the object __name__ seems to generate a new PyObject and thus we must use the UTF-8 string before decrementing the reference count for the PyObject *name.
  • PORT: CMake option() is only boolean.
  • PORT: Allow asking for a Python version Use cmake -DCPYTHON_VERSION=3.11 or -DCPYTHON_VERSION=3.11;EXACT.
  • TEST: Port XSB Janus tests
  • TEST: Imported tests from XSB
  • ENHANCED: Connect Python console I/O to Prolog's when rebound.
  • FIXED: Return empty tuple as :().
  • ENHANCED: Various fixes, allow passing arbitrary Prolog terms, docs This is a elaborative commit that introduces janus.Term to represent arbitrary Prolog terms, represents Prolog exceptions using janus.PrologError which uses janus.Term for storing the exception term.
  • It also cleans up the documentation and fixes several issues.
  • ENHANCED: Error handling for calls from Python to Prolog. Introduce a class janus.PrologError to represent the errors. This patch also changes the representation and printing of Python errors.
  • PORT: py_run("from janus import *") requires Python >= 3.10 This patch ensure the shell is still started and prints a message.
  • TEST: Avoid running tests using := in < 3.8 versions of Python.
  • Package xpce:
  • ENHANCED: Hide internal xpce symbols This avoids symbol conflicts and reduces the startup time

New in SWI-Prolog 9.1.13-1 Development (Aug 7, 2023)

  • FIXED: Pass check/0 dependency check if tty_size/2 is not defined.

New in SWI-Prolog 9.1.12-1 Development (Aug 2, 2023)

  • TEST: Avoid crash in unicode save/load test when pldoc is loaded. This is a work-around for an issue in PlDoc interacting with qcompile/1.

New in SWI-Prolog 9.1.11-1 Development (Jul 3, 2023)

  • ADDED: evaluable_property/2 Proposal to inspect evaluable functions.

New in SWI-Prolog 9.1.9-1 Development (Apr 29, 2023)

  • DOC: limitation of PL_record_external() with blobs
  • ADDED: library(main) cli flag processing for debugging. See cli_debug_opt_type/3 and friends.
  • ADDED: argv_options/4: typed directory and directory(+Access).

New in SWI-Prolog 9.1.8-1 Development (Mar 23, 2023)

  • BUILD: Only setup CMake rpath stuff if the Prolog core is a shared library. This allows building a completely static executable without RPATH/RUNPATH.
  • ENHANCED: Better error if process argv cannot be processed in current locale.

New in SWI-Prolog 9.1.6-1 Development (Feb 14, 2023)

  • SNAP: Updated KDE/Qt build framework. This required a kludge to run cmake twice to work around a dangling link in the KDE/Qt build snap. See https://forum.snapcraft.io/t/kde-frameworks-5-99-qt-5-15-7-core20-sdk-wrong-link-for-libcrypto-so/33880/3?u=janw
  • SNAP: core20 seems to require usr/bin/swipl for the command.
  • Package clib:
  • FIXED: socket address length to be the actual used length. Linux does not care, but MacOS does.
  • Package xpce:
  • FIXED: Marshall 64 bit integers from xpce to Prolog.
  • FIXED: pce->write for integers > 32 bits.
  • CLEANUP: Use PRIdPTR from <inttypes.h>for printing intptr_t rather than our own creation.

New in SWI-Prolog 9.1.4-1 Development (Feb 13, 2023)

  • CLEANUP: Remove profiling library and (dummy) built in predicates if execution profiling is not supported.
  • DOC: Fix typos + fix example code. Make PL_get_nil_ex() explicitly propagate an old exception. Effectively that would have happened anyway.
  • MODIFIED: Move profile interface from library(statistics) to library(prolog_profile), With that we can easily omit installing this library and C API if the system does not support profiling. This is a first rough split, making as few as possible changes.
  • MODIFIED: Deal with return value of the blob save function, propagating a possible exception. Documented the save and load functions. Joined work by Peter Ludemann and Jan Wielemaker.
  • DOC: Better explanation for list iteration by Peter Ludemann.
  • TEST: More sub_atom/5 and sub_string/5 tests.
  • DOC: sub_atom/5, sub_string/5 by Peter Ludemann.
  • PORT: Silence tcmalloc except for Linux. Not ported to Windows and conflicts with libc on MacOS.
  • CLEANUP: Remove old Pentium counters based statistics. Especially since we can compile virtual machine instructions to functions we have better mechanisms to achieve the same.
  • ADDED: halt/1 to accept signal names as status code. This causes an exit with status 128+signum.
  • FIXED: make halt(abort) really ignore halt cancellation.
  • DOC: Clarify some details of PL_put_list(), PL_cons_list(), PL_unify_list() and modify some sample code
  • MAINTAINANCE: Added printf format checking to PL_message() and PL_fatal_error()
  • DOC: Issue#1116: typo in example.
  • BUILD: Allow building with -DUSE_GMP=OFF -DUSE_LIBBF=OFF
  • FIXED: LibBF: bug in mpz_rootrem() optimization Tripped over case when rop same as OP in degenerate case. Also replace mpz_sub_ui with mpz_add_si since argument op_sign is signed.
  • DOC: tweak WASM port introductory text
  • WASM: Added swipl-bundle-no-data.js, providing SWI-Prolog as bundle (with wasm bundled in js), but no data file, so you must provide the application as saved state.
  • MODIFIED: standard order of terms to use cmpr/2 for comparison, comparing mixed float/rational exact (i.e., as rationals).
  • MODIFIED: min/2 and max/2 functions propagate NaN rather than the concrete value.
  • ADDED: functions cmpr/2, minr/2 and maxr/2 that compare mixed float/rationals exact (i.e., after converting the float to rational). The min/max versions propagate the rational in case of a tie and propagate numbers rather than NaN.
  • FIXED: If locking mutexes can be interrupted, handle signals and exceptions properly.
  • PORT: fix cat2 test for windows

New in SWI-Prolog 9.0.4-1 (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 SWI-Prolog 9.1.3-1 Development (Jan 13, 2023)

  • 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.
  • DOC: Use PlDoc for trace/1,2 documentation.
  • ADDED: trace/1,2: print wall time since call port for other ports.
  • 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 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.

New in SWI-Prolog 9.1.2-1 Development (Dec 19, 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`.

New in SWI-Prolog 9.1.1-1 Development (Dec 6, 2022)

  • 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.

New in SWI-Prolog 9.1.0-1 Development (Nov 25, 2022)

  • DOC: Fixed LaTeX issues blocking the generation of the PDF manual.
  • TEST: Avoid name conflict between two tests to make test_installation/0 work again.
  • 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.

New in SWI-Prolog 9.0.0-1 (Nov 24, 2022)

  • TEST: Avoid name conflict between two tests to make test_installation/0 work again.
  • 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.

New in SWI-Prolog 8.5.19-1 Development (Oct 18, 2022)

  • 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).

New in SWI-Prolog 8.5.18-1 Development (Oct 6, 2022)

  • 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.

New in SWI-Prolog 8.5.17-1 Development (Sep 19, 2022)

  • 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.

New in SWI-Prolog 8.5.16-1 Development (Sep 7, 2022)

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

New in SWI-Prolog 8.5.15-1 Development (Jul 28, 2022)

  • DDED: PL_get_stream_from_blob()
  • PORT: config/win32.h and config/win64.h have been removed.

New in SWI-Prolog 8.5.11-1 Development (May 6, 2022)

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

New in SWI-Prolog 8.5.9-1 Development (Mar 27, 2022)

  • SNAP: Updated snap package dependency for pcre2.

New in SWI-Prolog 8.5.8-1 Development (Mar 7, 2022)

  • 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.

New in SWI-Prolog 8.4.2-1 (Feb 10, 2022)

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

New in SWI-Prolog 8.5.7-1 Development (Feb 4, 2022)

  • 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).

New in SWI-Prolog 8.4.1-1 (Jan 24, 2022)

  • [Nov 16 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.
  • [Nov 15 2021]:
  • 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.
  • [Nov 12 2021]:
  • FIXED: Be more relaxed about existence of the current predicate when pushing and popping the compilation context.
  • [Nov 11 2021]:
  • 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.
  • [Nov 10 2021]:
  • DOC: meta_predicate/1: updated mode declarations.
  • [Nov 8 2021]:
  • 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.
  • [Nov 7 2021]:
  • 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)
  • [Nov 3 2021]:
  • 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.
  • [Nov 2 2021]:
  • 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
  • [Oct 31 2021]:
  • 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.
  • [Oct 30 2021]:
  • 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.
  • [Oct 28 2021]:
  • 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.
  • [Oct 27 2021]:
  • ENHANCED: Handle C-stack overflows gracefully on POSIX targets with sigaltstack().
  • [Oct 26 2021]:
  • 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
  • [Oct 25 2021]:
  • FIXED: pl_get_uint64() for GMP numbers on 32-bit systems.
  • ADDED: argv_options/3,4: allow for disjunctive types.
  • [Oct 24 2021]:
  • 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.
  • [Oct 22 2021]:
  • 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.
  • [Oct 21 2021]:
  • 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.
  • [Oct 20 2021]:
  • ADDED: argv_options/3: type term
  • [Oct 19 2021]:
  • 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.
  • [Oct 18 2021]:
  • FIXED: det/1: avoid false non-determinism claim if all relevant choicepoints are debug choicepoints.
  • [Oct 14 2021]:
  • 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.
  • [Oct 11 2021]:
  • FIXED: Answer subsumption tabling case provided by Annie Liu.
  • ADDED: Predicate property sig_atomic. Currently only for the built-in sig_atomic/1.
  • [Oct 9 2021]:
  • FIXED: Delay signals in prolog_exception_hook/4.
  • [Oct 10 2021]:
  • 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
  • [Oct 11 2021]:
  • 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
  • [Oct 6 2021]:
  • FIXED: Issue#889: swipl --abi-version crashed.
  • [Oct 5 2021]:
  • ENHANCED: trace/2 to delete that we are tracing this predicate if the port list is empty.
  • [Oct 1 2021]:
  • 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:
  • [Oct 27 2021]:
  • 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:
  • [Oct 25 2021]:
  • 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.
  • [Oct 12 2021]:
  • ADDED: http_read_data/4: handle the input_encoding/1 option when using to(Type).
  • [Oct 7 2021]:
  • FIXED: range streams: be careful about race conditions when asynchronously finding all streams that refer to OS file handles.
  • Package jpl:
  • [Nov 2 2021]:
  • BUILD: Silence GCC-11 warning (ugly)
  • Package mqi:
  • [Nov 11 2021]:
  • 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.
  • [Nov 1 2021]:
  • 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
  • [Oct 22 2021]:
  • 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
  • [Oct 20 2021]:
  • 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:
  • [Nov 10 2021]:
  • CMAKE: Requires minimally cmake 3.9
  • [Oct 13 2021]:
  • 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.
  • [Oct 5 2021]:
  • 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:
  • [Oct 11 2021]:
  • ENHANCED: Provide CSS style wfs_undefined for undefined answers.
  • [Oct 7 2021]:
  • ADDED: portray//2 hook that plays a role similar to portray/1 for HTML rendering of terms.
  • Package protobufs:
  • [Oct 31 2021]:
  • 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)
  • [Oct 25 2021]:
  • FIXED: uint32_codes/2 in mode (-,+) on may return a negative value on 32-bit systems.
  • Package redis
  • [Nov 8 2021]:
  • TEST: Prevent occasional early termination in test(primes).
  • TEST: Make sure the Redis test group consumers are properly discarded.
  • Package semweb:
  • [Nov 2 2021]:
  • BUILD: Trick GCC-11 we are not really freeing a non-heap address.
  • Package sgml:
  • [Oct 7 2021]:
  • FIXED: xml_quote_cdata/3: possible race condition if two threads use this for the first time.
  • Package ssl:
  • [Nov 2 2021]:
  • BUILD: Silence (incorrect) GCC-11 uninitialized warning.
  • Package xpce:
  • [Nov 7 2021]:
  • 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]>
  • [Nov 2 2021]:
  • BUILD: Avoid GCC-11 warning.
  • [Oct 21 2021]:
  • FIXED: Do not setup search path for library(pce) if --no-pce is given.

New in SWI-Prolog 8.5.6-1 Development (Jan 24, 2022)

  • 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.

New in SWI-Prolog 8.5.5-1 Development (Jan 9, 2022)

  • TEST: Started a few operator tests
  • FIXED: handling postfix operators must reduce the left side before reducing the postfix operator.

New in SWI-Prolog 8.5.3-1 Development (Nov 29, 2021)

  • 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.

New in SWI-Prolog 8.4.0 (Oct 26, 2021)

  • [Sep 30 2021]
  • 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.
  • [Sep 29 2021]
  • 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.
  • [Sep 28 2021]
  • ADDED: Allow authors of packs to not have an email address or URL.
  • [Sep 27 2021]
  • ADDED: PL_cvt_i_schar() for explicit signed character handling.
  • ENHANCED: dict_options/2 in mode (-,+) to remove duplicate options, keeping the first.
  • [Sep 24 2021]
  • ENHANCED: Cleanup code for format/2,3. Allow callback's to cooperate with ansi_format/3.
  • [Sep 23 2021]
  • ADDED: prolog_listen/2,3: listen to thread create events.
  • [Sep 21 2021]
  • 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.
  • [Sep 16 2021]
  • FIXED: VMI_FUNCTIONS build now works with LDFUNC changes
  • FIXED: Issue#883: Decompiler to preserve order of arguments to optimized +/2 and -/2 functions.
  • [Sep 15 2021]
  • 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.
  • [Sep 14 2021]
  • 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.
  • [Sep 11 2021]
  • FIXED: Allow listing/1 from a temporary module.
  • [Sep 8 2021]
  • ADDED: customize/edit command to accept --no-wait option. Requires latest xpce package. Can by used with editor plugin for terminator.
  • [Sep 7 2021]
  • DOC: Updated section "Prolog exceptions in foreign code". Was pretty outdated.
  • [Sep 6 2021]
  • FIXED: clause/2 moved unification for s(X) :- X = f(Y), p(Y). Bug introduced in fb96dc77bbd86df31ed7bd2282dd5b20f341f534.
  • [Sep 3 2021]
  • FIXED: clause/2 (decompiler for moved unification instructions against the head.
  • FIXED: clause/2 (decompiler for moved unification instructions against the head.
  • RELEASE: Merging devel (V8.3.29-8-gf6e856bdb)
  • DOC: enhanced docs for ;/2, ->/2, and other control structures.
  • [Sep 2 2021]
  • PORT: The MUSL C runtime library as used in e.g. Alpino Linux cannot safely call pthread_detach() from the pthread cleanup handler.
  • [Sep 1 2021]
  • BUILD: Fixed building docs when building without xpce.
  • BUILD: Use PGO optimization for the Debian builds.
  • FIXED: clause/2 (and related predicates) on clauses where unifications are moved into the head failed in a saved state.
  • FIXED: clause/2 for unification that was migrated to the head and used nested in a term used as argument to some body call (using B_ARGVAR instead of B_VAR).
  • ADDED: format_time/3: handle '%P' on systems not using glibc.
  • [Aug 30 2021]
  • FIXED: Adding missing newlines in tracer commands
  • [Aug 26 2021]
  • TEST: Fixed answer tests for new toplevel output.
  • [Aug 24 2021]
  • ADDED: Prolog flag toplevel_name_variables, which causes variables in toplevel answers to be named _A, _B, etc. Singleton variables are printed as _.
  • ADDED: current_temporary_module/1 to library(modules).
  • [Aug 15 2021]
  • FIXED: Avoid optimizing memory load, causing an infinite loop when creating a new atom.
  • FIXED: =../2 to avoid truncating to int (for arity > 2g).
  • [Aug 11 2021]
  • ADDED: trap/1, notrap/1 as commandline utilities to trap exceptions.
  • CLEANUP: Move the command line debug utils such as spy/1 from the boot files into a new library(prolog_debug).
  • [Aug 10 2021]
  • FIXED: make sure the monotonic propagation flag is only set during monotonic propagation and not while reevaluating non-monotonic nodes.
  • FIXED: Possibly loop adding a lazy monotonic dependency.
  • FIXED: date_time_stamp/2 was broken in timezone handling after e68098ba2b38d7d9597def1b4fc0a8cef1ed43cb.
  • FIXED: Possibly crash in completion detecting for lazy monotonic tabling.
  • [Aug 9 2021]
  • FIXED: format_time/3 using date/9 term computed the weekday and year day of the UTC time rather than the local time. Mike Elston.
  • TEST: one more test for lazy monotonic tabling.
  • FIXED: We must remove the queued answers or a recursive call will keep re-evaluating them. This triggered tabling_monotonic_lazy_14 after fixing the issues from tabling_monotonic_lazy_16. The disadvantage is that if we get an exception during the propagation we cannot retry. There are probably more troubles with that and we should probably just abolish the involved tables.
  • [Aug 7 2021]
  • FIXED: If we call an invalid table we must re-evaluate the table immediately, also if this is a lazy table and we are inside lazy answer propagation.
  • [Aug 9 2021]
  • ENHANCED: Avoid recording duplicate dependencies for lazy monotonic tabling.
  • [Aug 6 2021]
  • ENHANCED: trace/1,2: add recursion depth to output to make it easier to understand.
  • [Jul 10 2021]
  • FIXED: Inconsistent behavior of current_prolog_flag/2 and prolog_flag/2 in SICStus emulation. With SICStus emulation active, current_prolog_flag/2 and prolog_flag/2 now always give the same results, and always take priority over the autoloadable prolog_flag/2 from library(quintus).
  • [Aug 5 2021]
  • FIXED: write_term/2,3 numbervars for '$VAR'(N) terms where N is a GMP integer.
  • [Aug 4 2021]
  • PPA: Groovy is no longer supported. Added Hirsute
  • DOC: absolute_file_name/2. Issue#871
  • MODIFIED: absolute_file_name/3 to return directories if the requested access is none and no file type is specified as regular or directory.
  • [Aug 1 2021]
  • MODIFIED: b_setval/2: backtracking over creating a global variable deletes the variable. If the old behavior is desired one can use nb_setval(Var, []) before calling b_setval/2.
  • MODIFIED: Global variables no longer use exception/3 for lazy evaluation after nb_delete/1 or after exception/3 called by nb_current/2 with a given variable name failed to define the variable.
  • [Jul 28 2021]
  • ADDED: Integrate language_server package into the infrastructure
  • ADDED: language_server package by Eric Zinda
  • [Jul 22 2021]
  • FIXED: Removed remaining literal __PL_ld references
  • ADDED: SICStus-compatible "FD set" API to library(clpfd).
  • [Jul 21 2021]
  • ADDED: fd_degree/2 to library(clpfd).
  • ADDED: dict_size/2. Issue#864. David Tonhofer.
  • [Jul 20 2021]
  • MODIFIED: LDFUNC refactor, part 2 (manual) This is the second of two commits that applies a refactor across the entire SWI-Prolog codebase, changing the syntax of passing LD from one function to another in internal library code. The bulk of the changes in this refactor were automated via Perl script in the previous commit; see that commit message for more details on that.
  • Previously, functions that wanted to access LD (the local data structure) could either use the GLOBAL_LD macro, declare the GET_LD/PRED_LD macros early in the function, or declare ARG_LD/ARG1_LD somewhere in the function parameter list. Calling these functions required either declaring a macro (usually in pl-ldpass.h) that would add the LD argument to any call to the function, or adding a PASS_LD/PASS_LD1 annotation to each callsite.
  • The new style revolves around a new macro called LDFUNC, defined in src/pl-builtin.h; see that file for details on its use. PASS_LD and its variants are no longer required at callsites; all LDFUNC-augmented functions have macro definitions that add the necessary arguments to the function call. Additionally, name-mangling is performed on function names, so it is no longer required to add __LD to a function name to keep it from colliding with externally-visible API functions.
  • This commit also adds the API_STUB macro, which ensures that API function definitions do not have their names mangled, along with including a GET_LD declaration automatically.
  • For more information, see the following post:
  • https://swi-prolog.discourse.group/t/changes-to-ld-handling-in-library-code/4067
  • [Jun 24 2021]
  • MODIFIED: LDFUNC refactor, part 1 (automated) This is the first of two commits that applies a refactor across the entire SWI-Prolog codebase, changing the syntax of passing LD from one function to another in internal library code. More details on the refactor are in the following commit, but since this touches so much code and to avoid having to manually verify a 20,000+ line diff, the bulk of the changes in this commit are automated by a Perl script, saved here (for this commit only) as src/ld-refactor.perl, with the output of the run saved in src/ld-refactor.out. This way, the script itself can be audited for correctness, and only the special cases in the following commit need to be checked manually.
  • [Jul 15 2021]
  • FIXED: Re-evaluation through a cycle where the argument of tnot/1 is invalid.
  • FIXED: reloading with :- discontiguous/1 directive in included file. Edison Mera.
  • ADDED: predicate_property/2 property discontiguous to reflect the effect of the discontiguous/1 directive.
  • FIXED: If tnot/2 is evaluated from an existing table we must make sure this table is part of the dependency graph.
  • FIXED: We must reset some worklist properties prior to reevaluation for WFS to work properly.
  • FIXED: We must preserve the TN_IDG_UNCONDITIONAL flag during re-evaluation to be able to detect that a previously conditional answer became unconditional after reevaluation. This also implies we no longer need the save/restore related to exception handling.
  • FIXED: we must consider a table modified if an answer turns unconditional while it was conditional before.
  • [Jul 13 2021]
  • FIXED: If reevaluation changes conditions for a trie we must recompile the trie.
  • FIXED: tnot/1 table status evaluation during incremental re-evaluation.
  • [Jul 12 2021]
  • ENHANCED: cli_enable_development_system/0: avoid loading xpce when creating a state.
  • [Jul 9 2021]
  • FIXED: Failure in incremental tabling if a leaf predicate is both tabled and dynamic.
  • FIXED: Issue#861: blobs with PL_BLOB_NOCOPY|PL_BLOB_UNIQUE must only compare the pointer.
  • [Jul 7 2021]
  • BUILD: Issue#860: PGO building did not work with make on MacOS.
  • [Jul 6 2021]
  • ADDED: Initial partial library(clpfd) to SICStus 4 emulation.
  • [Jul 7 2021]
  • BUILD: Issue#859: Building main.pl docs now depends on xpce.
  • [Jul 6 2021]
  • PORT: Allocator detection.
  • ADDED: trim_heap/0 and a Prolog flag malloc to identify the malloc implementation and provide additional features when detected.
  • ADDED: Integrated stomp into the build process
  • ADDED: packages/stomp.
  • [Jul 5 2021]
  • FIXED: lazy monotonic tabling requires a proper completion check. Such a table is complete if the dependencies do not contain any invalid incremental tables and all lazy queues are empty. Dependency tracking must be recursive and has to deal with loops. This fix avoids non-termination whil reevaluating lazy monotonic tables that contain cycles.
  • FIXED: While reevaluating a lazy monotonic node we should not consider it invalid.
  • FIXED: lazy monotonic update to set the current IDG node properly.
  • [Jul 2 2021]
  • ENHANCED: explain/1 to support dicts, hide references from the cross-referencer and show file and line numbers for references from clauses.
  • [Jul 1 2021]
  • ADDED: Supply a depth with the tracer r command to retry immediately on a parent goal.
  • ADDED: [level] S trace command to save a goal to the recorded database.
  • ENHANCED: Command line debugger 'h' command
  • ADDED: Command line debugger 'g' command to accept a negative number of frames as numeric parameter to print the outermost N frames rather than the innermost. As a result, the '-' command (no spy) must be followed by the RETURN key.
  • [Jun 30 2021]
  • FIXED: Issue#853: prolog_walk_code/1 did not respect the module_class option, scanning all modules.
  • ENHANCED: library(prolog_codewalk): avoid trying to find the file -.
  • FIXED: Avoid permission error when using autoload/1 after autoload/2.
  • [Jun 29 2021]
  • ADDED: library(main): cli_parse_debug_options/2 and cli_enable_development_system/0.
  • ADDED: mapsubterms/3 to recursively substitute arguments in a sub term.
  • FIXED: on_signal/3 claims the signal is wrong on a type error on the handler.
  • [Jun 27 2021]
  • FIXED: Avoid a race condition between thread_join/2 and thread_detach/1 and disallow multiple threads to join the same thread. Updated docs for thread_join/2.
  • [Jun 24 2021]
  • ENHANCED: trace/1,2 to work better on imported predicates, applying the wrapper directly to the implementation.
  • [Jun 23 2021]
  • ADDED: File access mode search as an alias for execute. Improves compatibility with SICStus.
  • [Jun 22 2021]
  • FIXED: Prevent source analysis to loop on an unbound module export list.
  • [Jun 23 2021]
  • ADDED: library(file_systems) to SICStus 4 emulation.
  • [Jun 22 2021]
  • FIXED: Accidentally left debug test that could lead to an "Too many stacked strings" fatal error.
  • FIXED: Monotonic table that depends on a monotonic table that has forced reevaluation due to a retract and a normal monotonic table.
  • ADDED: PL_get_uint64() and PL_get_uint64_ex() API functions for consistency.
  • [Jun 20 2021]
  • ENHANCED: nb_setarg/3 to only copy for a compound term
  • [Jun 17 2021]
  • ADDED: samkeysort/2 to SICStus 4 library(samsort) emulation.
  • DOC: Tabling and transactions
  • FIXED: Invalidate lazy monotonic tables when reevaluation inside a transaction introduces new dependencies on predicates modified inside the transaction.
  • [Jun 16 2021]
  • TEST: transactions and lazy monotonic tabling
  • TEST: transaction and monotonic tabling
  • ADDED: Consistency of eager monotonic tables over transactions.
  • TEST: transactions and incremental tabling
  • ADDED: Keep track of incremental tables that needs reevaluating when we rollback a transaction.
  • [Jun 15 2021]
  • MODIFIED: Interaction between thread_wait/2 and transactions: database changes do not wakeup threads that are in a transaction because the change is invisible anyway and thread_wait/2 cannot be called inside a transaction as nothing can cause a wakeup.
  • ENHANCED: Avoid unnecessary wakeup in thread_wait/2 from modifications inside a transaction. Do notify on the transaction commit.
  • CLEANUP: Make role of special transaction generations clear by using a macro for them.
  • FIXED: last_modified_generation logic for predicates that are modified inside a transaction.
  • [Jun 14 2021]
  • BUILD: Single threaded version still requires pthread library on Windows as this is a dependency for the gcc runtime library.
  • MODIFIED: Do not define rational/1 if rational number support is not enabled.
  • FIXED: library(sandbox) to handle the possibility that rational/1 is not defined.
  • TEST: Avoid rational number syntax errors when GMP is not used.
  • [Jun 13 2021]
  • ADDED: eol//0 to library(dcg/basics).
  • [Jun 12 2021]
  • FIXED: Build for single threading
  • [Jun 9 2021]
  • FIXED: missing GMP exports, -Wmissing-prototypes This addresses issues exposed by adding -Wmissing-prototypes to the build, hacked in as cmake -DCHECK_PROTOTYPES=1. This flag emits a warning when any non-static function is defined without first declaring a separate prototype, which usually means that either a header hasn't been included, or that a function that should have been static wasn't marked as such. The Linux compile is clean now, after having:
  • added static to functions not called outside the file
  • completed incomplete header prototypes, usually by adding (void)
  • removed old functions no longer called anywhere
  • included gmp.h before SWI-Prolog.h, to enable the missing GMP exports The Windows build still has some missing-prototype warnings because of various #ifdefs, but I'm not addressing those right now.
  • MODIFIED: Moved includes to files that use them This also moves some inline definitions out of pl-inline.h, specifically those that call functions defined in other headers.
  • [Jun 8 2021]
  • FIXED: Changing _xos defs to function-like macros Fixes a compilation error in atom.c:1151, where a->type->write is transformed into a->type->_xos_write.
  • [Jun 4 2021]
  • MODIFIED: Refactoring to per-module header files
  • [Jun 3 2021]
  • BUILD: Changing default visibility to hidden. This makes portable shared library builds work like Windows DLL builds, i.e. all symbols are library-private rather than exported by default. This fixes a fair amount of symbol leakage that had been happening when functions and variables weren't marked COMMON().
  • [Jun 6 2021]
  • BUILD: Fix possibly failing PGO build due to lacking dependency
  • FIXED: optimise_unify Prolog flag was handled negated. Jan Burse.
  • [Jun 1 2021]
  • BUILD: Moved pl-alloc/index/fli out of pl-wam This adds USE_*_INLINES as a flag that can be set before including pl-incl.h, to include some of the function definitions from various files in a "can-inline" context. It also separates the majority of pl-alloc.c, pl-index.c, and pl-fli.c out into their own object files, to speed up the build.
  • This may result in a slight (1-2% at max, in my testing) performance loss since the pl-wam compilation doesn't have access to all the function definitions in those three files, but enabling LTO on the build (which I have not yet, since it currently generates warnings) avoids the performance drop entirely by allowing the linker itself to perform any applicable cross-file inlining.
  • [Jun 2 2021]
  • PORT: Avoid UTF-8 characters in source code.
  • PORT: Avoid relying on GCC -Werror=missing-profile flag that is not supported on older systems.
  • [May 26 2021]
  • FIXED: Silent failure in CLP(FD) domain calculation for truncated division.
  • [May 28 2021]
  • ADDED: Prolog flag shift_check to check for suspicious continuations.
  • FIXED: flipped shift/1 and shift_for_copy/1 behaviour.
  • FIXED: Capturing the continuation inside a meta-predicate restores the wrong module context.
  • [May 26 2021]
  • FIXED: frozen/2 leaves residual variables on backtracking.
  • [May 25 2021]
  • DOC: frozen/2, copy_term/3 and attribute_goals//2 interaction.
  • [May 24 2021]
  • FIXED: frozen/2 to allow attribute_goals//1 to modify the attributes.
  • [May 23 2021]
  • FIXED: negative numerical argument for format from argument list
  • [May 19 2021]
  • PGO: Updated docs and utility scripts to use the new CMake PGO build type.
  • [May 18 2021]
  • BUILD: Added self-contained PGO process to CMake. This change makes it possible to run a PGO build with a single invocation of the build process. To do so, use the "PGO" configuration in CMake rather than "Debug" or "Release", which will:
  • 1) Compile all libswipl objects with profile generation enabled. This uses auxiliary target names with "-pgo-instrumented" appended. 2) Link the executable "swipl-pgo-instrumented" in src, using these. 3) Use swipl-pgo-instrumented to create boot.prc (since no other swipl exists yet). Clear the PGO-data directory, then run the benchmark. 4) Build the libswipl objects again, using the PGO data generated. 5) Link the final swipl executable from these.
  • The dependencies are set up such that if any source file changes, ninja will recompile the instrumented version of the affected file(s) and then restart the process from step 3, recompiling ALL libswipl objects using the new PGO data.
  • Tested with gcc 9/10 and clang 10/11.
  • [May 14 2021]
  • DEBUG: Debug wildcard and complement; DEBUG_IF The -d command line option now takes an optional asterisk (*) on the end of a debug flag name to enable all flags that begin with that name. Also, flag names can be prefixed with a caret (^) to disable that flag; only particularly useful in combination with the wildcard, to silence chatty channels. For example,
  • swipl -d MSG_SHIFT*,^MSG_SHIFT_FRAME
  • will enable all MSG_SHIFT channels except for MSG_SHIFT_FRAME.
  • On the internal side, we now have the DEBUG_IF(cond, channel) macro, which functions much like DEBUG(channel, statements) except it provides more control over the conditions, and it avoids statements in a macro. As a result, the statement
  • DEBUG(MSG_CHANNEL, Sdprintf(...));
  • is (for a named channel, at least) equivalent to
  • int debug_active = DEBUGGING(MSG_CHANNEL);
  • DEBUG_IF(debug_active, MSG_CHANNEL)
  • { Sdprintf(...); }
  • which itself is roughly equivalent to:
  • #if O_DEBUG
  • int debug_active = DEBUGGING(MSG_CHANNEL);
  • if (debug_active)
  • { ENTER_DEBUG(MSG_CHANNEL); Sdprintf(...); EXIT_DEBUG(MSG_CHANNEL);
  • #endif
  • This commit also includes some improvements to the GC debug messaging.
  • [May 13 2021]
  • CLEANUP: Issue#835: Avoid singleton variable in branch when compiling with optimization.
  • TEST: Added when/2 test suite.
  • FIXED: Issue#818: when/2 conditions with nested disjunctions not being displayed properly by toplevel and copy_term/3.
  • [May 7 2021]
  • ADDED: copy_term/2 to SICStus 4 emulation (same as SWI copy_term_nat/2).
  • [Apr 20 2021]
  • ADDED: library(types) to SICStus 4 emulation.
  • ADDED: max_member/3 and min_member/3 (with an order predicate argument) to library(lists).
  • [May 11 2021]
  • REFACTOR: This patch completes the first round of refactoring the VM. It allows for the same source to create a VM as threaded code jumping to label addresses in a giant function as well as a VM that has an array of function pointers, one function for each VM instruction. This is work by @dmchurch.
  • CMAKE: Added -DVMI_FUNCTIONS=ON
  • ADDED: Allow foreach//2 from library(dcg/high_order) to work with non-lists.
  • FIXED: listing/1 and friends for compound terms using [] as functor.
  • [May 10 2021]
  • FIXED: Make PGO build work again
  • ADDED: Define undo/1 as sandbox-safe
  • [May 9 2021]
  • FIXED: Issue#830: assertion failure in GUI debugger. Wouter Beek.
  • [May 8 2021]
  • TEST: Make a test fail if an error message is printed.
  • FIXED: locale_create/3: handling of default and current_locale.
  • ADDED: Make the new on-error and on-warning options work both in normal mode and in compilation (-c) mode.
  • ENHANCED: Handle underscores and minus the same when parsing compilation options for -c.
  • ENHANCED: Enable color output when compiling
  • ADDED: Prolog flags on_error and on_warning connected to commandline options.
  • ADDED: Provide a (silent) message reporting the error and warning count while loading a file and document error handling during compilation.
  • ADDED: statistics/2 and thread_statistics/3 keys warnings and errors.
  • [May 7 2021]
  • ADDED: undo/1 to schedule goals to be called on backtracking.
  • FIXED: Issue#110: Nested consult/1 on already loaded files (reconsult) did not do generation management correctly.
  • [May 6 2021]
  • MODIFIED: Renamed incr_propagate_answer/1 to incr_propagate_calls/1. Removed incr_invalidate_answer/1 (is incr_invalidate_calls/1).
  • FIXED: Ensure a compiled trie never ends in I_FAIL. This crashes the debugger.
  • FIXED: vm_list/1 for compiled tries.
  • [May 5 2021]
  • ADDED: incr_propagate_answer/1 and incr_invalidate_answer/1.
  • MODIFIED: Move library(increval) from dialect/xsb to the core library. Code using the XSB emulation should run unmodified. Code that uses this library as library(dialect/xsb/increval) must be updated to load library(increval) or rely on autoloading.
  • DOC: Updated stream_property/2 for representation_error
  • ADDED: Prolog flag character_escapes_unicode
  • CLEANUP: Generalize fast access to boolean Prolog flags such that we can host more than 32.
  • ENHANCED: Use Unicode classifiers for deciding on which characters to escape for quoted write.
  • [May 4 2021]
  • DOC: Escape sequences used for quoted write.
  • MODIFIED: Make quoted write depend on iswgraph() rather than not quote any non-ascii character. Escaped characters are written as x<hex>.
  • ADDED: code_type/2: category print
  • FIXED: Tighter checking correctness of sandbox declarations and fix wrong declaration for '$moded_wrap_tabled'/5 (was /4).
  • DOC: stream_property/2 representation_errors property.
  • [May 3 2021]
  • DOC: Explain current status wrt dynamic and static linking.
  • [May 2 2021]
  • BUILD: Added -DSWIPL_STATIC_LIB=ON config option to also build a static library.
  • BUILD: Use CMake OBJECT library as intermediate.
  • ENHANCED: Issue#825: Error handling when goal_expansion/2 binds a variable in +/1 or ;/2.
  • [Apr 30 2021]
  • ADDED: Prolog flag optimise_unify to prevent moving unifications to the head. as these harm notably the source level debugger experience.
  • [Apr 29 2021]
  • FIXED: runtime change of det/1 property. Peter Ludemann.
  • FIXED: Fresh table that depends on an invalid monotonic lazy table causes a permission error.
  • [Apr 26 2021]
  • DOC: "pinned" -> "developed"
  • [Apr 28 2021]
  • PORT: Make Windows build work again due to changed debug infrastructure.
  • [Apr 24 2021]
  • BUILD: Issue#819: CMake Policy CMP0115. Wouter Beek.
  • [Apr 23 2021]
  • FIXED: same_functor/4 and derived predicates to be fully compatible with SICStus and handle zero-argument compounds.
  • ADDED: functor/4 to make dealing with zero-argument functors and atoms easier. This is a result of Issue#815
  • [Apr 21 2021]
  • FIXED: library(prolog_colour): prevent pce_arg highlighting to cause a failure to highlight dict objects.
  • [Apr 11 2021]
  • DEBUG: Early/better internal debug output Initialize the global debug_level as soon as possible if "-d" is passed first on the command line, to avoid missing early debug lines. Also, track use of the DEBUG() macro on a per-thread basis and use Serror as the default output stream when inside a DEBUG clause, so that statements that mix e.g. Sdprintf() and write_term() will get printed to a single output. Finally, prefix debug lines with the debug channel and the file/line source.
  • [Apr 20 2021]
  • FIXED: Issue#815: same_functor/4 (and friends) to be more SICStus compatible.
  • [Apr 9 2021]
  • ADDED: library(aggregate), library(between) and library(samsort) to SICStus 4 emulation.
  • ADDED: sublist/[3,4,5] to SICStus 4 library(lists) emulation.
  • ADDED: host_type Prolog flag to SICStus emulation.
  • ADDED: at_end_of_stream/[0,1] to SICStus emulation.
  • ENHANCED: SICStus emulation now disables quoted printing of atoms.
  • [Apr 19 2021]
  • FIXED: vm_list/1 to handle clauses with breakpoints and list these.
  • ENHANCED: Multiple clauses may be registered at a specific source line. We need to consider all of them for set_breakpoint/4.
  • [Apr 16 2021]
  • FIXED: Context module handling in a tail-recursive transparent predicate.
  • [Apr 12 2021]
  • FIXED: $/1 for goals doing variable balancing using C_VAR_N
  • [Apr 7 2021]
  • FIXED: Save det/1 flag in saved states and Qlf files.
  • [Apr 6 2021]
  • FIXED: Propagate error when tabling traps an update to a dynamic predicate that is involved in a table reevaluation.
  • ENHANCED: Error message when using =>/2 as a goal. Boris Vassilev.
  • FIXED: Bug#810: Failed to re-initialize trailing of table operations in a nested transaction. Crashed. Eric Zinda.
  • [Apr 5 2021]
  • ENHANCED: Handle $/1 as control structure for goal_expansion/2 such that var_property/2 is correct.
  • ENHANCED: lazy_list/2 to avoid duplicating the iterator closure. This allows for using a complicated closure and using destructive assignment in the closure to update the state.
  • FIXED: Decompilation (clause/2 and friends) for unifications moved into the head had several bugs, mainly related to optimized-away H_VOID before I_ENTER and friends. Reported by Edison Mera.
  • FIXED: H_LIST_FF translation for a unification against a list moved to the head.
  • [Apr 4 2021]
  • FIXED: $/1: garbage collector crashes on GC inside the goal.
  • FIXED: Variable balancing, decompilation and error reporting of $(Goal) if Goal introduced new variables.
  • [Apr 2 2021]
  • ADDED: IDE support for det/1: highlighting and checking that there are clauses.
  • [Apr 1 2021]
  • ENHANCED: locale_create/3: allow an atom for the name.
  • DOC: det property for predicate_property/2.
  • [Mar 30 2021]
  • FIXED: cb55f2c3da164d61c5f684482653bee1c31d51f3 for handling of -0.0.
  • ENHANCED: Issue#806: Also use SSU rules for the wrapper in max_member/2 and max_list/2. David Tonhofer.
  • MODIFIED: Issue#808: The functions max/2 and min/2 now return the type used for the comparision when the two numbers are numerically equivalent. David Tonhofer.
  • FIXED: Allow changing :- predicates to => or back while reloading a file.
  • MODIFIED: Allow unifications in the guard of => rules to migrate to the head. This patch also adds documentation that answers questions on Discourse about the behaviour of the guard.
  • [Mar 29 2021]
  • FIXED: Error reporting from $/1 crashed.
  • ENHANCED: Simplify !/0 if there is nothing to prune.
  • [Mar 28 2021]
  • ADDED: $/1 to state that the argument goal must succeed deterministically.
  • FIXED: When re-evaluating a monotonic table falsecount propagation should not pass the node we are reevaluating. This was already the case for incomplete tables, blocking this propagation for incremental tabling.
  • [Mar 25 2021]
  • FIXED: Detection of which choice-point references are captured in a continuation.
  • FIXED: Make cross referencer split head and guard in Head,Guard => Body rules.
  • [Mar 21 2021]
  • FIXED: Positioning fixes and tests for ansi_format/3. Changes ansi_format/3 to format prepended and appended escape sequences separately while keeping line position information on the stream intact.
  • Also adds tests for position information correctness and single nonlist arguments.
  • [Mar 18 2021]
  • FIXED: Use safer shift_for_copy/1 to erroneous interaction with choicepoints in tabling.
  • ADDED: shift_for_copy/1 to deal with the rstrictions for shift that we need if we want to restart the continuation in a different context.
  • FIXED: clause_info/5 to avoid creating a cyclic term. due to wrongly recognised X -> call(X) translation.
  • ENHANCED: Move unification to plain head arguments at the start of the body to unification in the head. Possible reuse of these arguments in the body reuse the head argument. This allows for clauses like below to exploit clause indexing while avoiding to copy the f(_) term. p(X) :- X = f(_), q(X).
  • [Mar 17 2021]
  • ADDED: $/0: Cut that claims determinism for the remainder of the predicate.
  • [Mar 16 2021]
  • ADDED: det/1 declaration to declare a predicate deterministic and check this at runtime at the VM level.
  • REFACTOR: Move P_INCREMENTAL flag to tabling properties.
  • ENHANCED: Compilation of head => true to avoid calling true/0.
  • [Mar 15 2021]
  • ENHANCED: Remove true guard for SSU unification.
  • FIXED: instance/2 to handle single sided unification rules. Abramo Bagnara.
  • FIXED: goal_expansion/2 on the guard for an SSU rule head, guard => body. Abramo Bagnara.
  • FIXED: Updated QLF version number as fix for => breaks loading old qlf files.
  • [Mar 12 2021]
  • FIXED: Handle => rules in saved states and .qlf files. Abramo Bagnara.
  • [Mar 11 2021]
  • FIXED: When updating a monotonic answer subsumptive tabled node we must remove old answers from the queues before removing these answers from the trie.
  • [Mar 10 2021]
  • FIXED: GUI tracer could reset live variables in a stack trace, leading to different behaviour in trace mode.
  • FIXED: Recursive calls from C should reset the FR_INRESET flag as delimited continuations do not pass callbacks.
  • FIXED: goal_expansion/2 for => rules. Abramo Bagnara.
  • FIXED: Uninitilized tr_erased_no for clauses loaded from a QLF file or state.
  • FIXED: Transaction rollback from lazy monotonic tables did not properly delete new answers, leaving the trie in an inconsistent state.
  • DEBUG: Wrong assert() check when compiled for debugging.
  • [Mar 8 2021]
  • FIXED: Provide new internal API for dealing with UTF-8 decoding that cannot peek after the given buffer when decoding UTF-8 from a length-delimited string. The old code could read up to 5 characters after the buffer on invalid UTF-8 input. Decoder provided by Abramo Bagnara.
  • [Mar 4 2021]
  • FIXED: Processing lazy monotonic queued answers may queue new answers for this table, so can only mark it valid if all dependents are valid and no new answers are queued.
  • [Mar 3 2021]
  • ENHANCED: update of falsecount after partial reevaluation of a lazy monotonic predicate can be accurate, possibly avoiding recomputation.
  • [Feb 25 2021]
  • ADDED: CLP(FD): implement propagation for bitshifts This is a squash of 3 commits. Their commits messages are shown below
  • ENHANCED: clp/clpfd.pl propagate bitshifts Fixes issue #568
  • MODIFIED: clp/clpfd.pl pshift/4 propagation Shortened the nonvar(Y) case a bit
  • MODIFIED: CLP(FD): Fix pshift propagation bug Occurs when X =:= 0, in which case Y cannot be restricted, and when X =:= -1, in which case Y =< 0, but this is now handled in the last condition. These errors were caught in the test case mentioned in the previous commit message, but with `Op = (X << Y #= Z)`
  • [Feb 24 2021]
  • ADDED: CLP(FD): implement div propagation Squash of 4 commits, their commit messages are shown below
  • MODIFIED: clp/clpfd.pl cis_div_/3 fix typo? s=//div
  • ENHANCED: clp/clpfd.pl propagation of pdiv/3 Improve propagation basing code on ptzdiv/3's propagation
  • MODIFIED: CLP(FD): Fix mistake in cis_div Effectively reverting the previous s=//div. Introduces cis_fdiv for floor division to compensate for this, although note that there div has slightly more failures (a few thousand) than // according to Triska's test in commit 435209799b58ae01537c82baea6754f8e27a5c70. Also the inf,sup checks in cis_fdiv need to be checked.
  • MODIFIED: CLP(FD): Fix mistakes in div propagation by modifying domain_expand_more and domain_contract_less to consider the differences between div and //. I tried to use =.. to generate the expressions in domain_contract_less, but couldn't, this should be a TODO. Additionally, if I noted correctly, the previous uses of cis_slash could have been replaced with the previous cis_div, and so I merged them to rename cis_fdiv to cis_div, to then be able to use cis_div for floor division and cis_slash for round-to-zero division, with the same sup,inf handling.
  • [Mar 3 2021]
  • FIXED: Re-evaluation of lazy monotonic tables with cyclic dependencies
  • could result in non-termination after e13b73087dcd64e252430bb19f36e37681f7e8a1
  • ENHANCED: Use efficient list_to_set/2 internally.
  • ENHANCE: prune valid nodes from the re-evaluation graph.
  • FIXED: transaction rollback of a new lazy monotonic answer must
  • remove the deleted answer node from the affected queues.
  • [Mar 2 2021]
  • FIXED: Lazy monotonic reevaluation with not equal length falsepaths.
  • FIXED: tabled re-evaluation path minimization (mainly avoids some redundant memory usage and computations).
  • [Mar 1 2021]
  • ENHANCED: trace/1,2: show calling thread if not main
  • [Feb 28 2021]
  • FIXED: Need to enable capturing dependencies when processing lazy monotonic answers.
  • [Mar 1 2021]
  • ENHANCED: library(portray_text): updated docs, added set_portray_text/3
  • to get current settings and added to main documentation.
  • [Feb 28 2021]
  • FIXED: abolish_all_tables/0 inside a transaction (more generally, abolishing tables inside a transaction).
  • [Feb 27 2021]
  • FIXED: Predicates using trie_gen_raw() did not properly handle cuts.
  • [Feb 26 2021]
  • FIXED: '$idg_mono_empty_queue'/2 should only empty the
  • dependency that we just processed (now '$idg_mono_empty_queue'/1).
  • [Feb 24 2021]
  • FIXED: Issue#791: compiling calls to dynamically creating
  • calls that exceed the maximum procedure arity. Exception changed to representation_error(max_procedure_arity) (was `max_arity)`. Added Prolog flag max_procedure_arity.
  • FIXED: transaction_updates/1: avoid reporting compiled trie
  • clauses. Tabling consistency must be managed elsewhere.
  • DOC: transaction_updates/1: erased clauses are flagged erased(Ref) rather than erase(Ref).
  • [Feb 23 2021]
  • ENHANCED: Save --no-signals state into a saved state.
  • [Feb 21 2021]
  • DOC: csv_read_file_row/3: to be done note was outdated. Boris Vassilev.
  • [Feb 19 2021]
  • FIXED: After lazy reevaluation of table using answer subsumption we
  • should not queue a possibly deleted answer and we must delete pruned trie nodes from the lazy queues to affected nodes.
  • [Feb 17 2021]
  • FIXED: Issue#785: Crash when creating too many "predicate references" as created by e.g. clause/2 and retract/1.
  • [Feb 16 2021]
  • FIXED: Path canonisation for relative directories with sequences of
  • "../". Makes read_link/3 fail on links to ../../file. Nicos Angelopoulos.
  • ADDED: attach_pack/2. Suggested by Falco Nogatz.
  • PORT: Make compile using MinGW 10: include new libssp*.dll runtime dll in distribution.
  • [Feb 15 2021]
  • PORT: Windows: use __declspec(dllexport) extern type. Abramo Bagnara.
  • [Feb 14 2021]
  • FIXED: propagate changing lazy monotonic into incremental tabling.
  • [Feb 12 2021]
  • FIXED: Only clear falsecount if the table is eager.
  • [Feb 11 2021]
  • FIXED: False count update after lazy evaluation of monontonic
  • dependencies does not need to decrement the falsecount to zero. Instead we need to decrement after we processed all answers from an dependency edge.
  • [Feb 10 2021]
  • MODIFIED: Use SSU rules for some of the library(lists) predicates:
  • max_member/2, min_member/2, sum_list/2, max_list/2, min_list/2, intersection/3, union/3, subset/2 and subtract/3. This causes errors if the input arguments are non-lists or insufficiently instantiated.
  • ADDED: Single sided unification with commit clauses using =>.
  • [Feb 9 2021]
  • DOC: get_prolog_backtrace/3: wrong doc for options.
  • DOC: Fixed "Predicate behaviour and determinism" table. Jan Burse.
  • [Feb 8 2021]
  • FIXED: If we normal incremental re-evaluation considers a monotonic
  • table valid again we must clear force_reeval to avoid a second re-evaluation.
  • [Feb 6 2021]
  • CLEANUP: Move implementations from deprecated library(oset) to
  • library(ordsets) and make library(oset) a thin wrapper.
  • DOC: del_vertices/3 wrong argument order. Moved LaTeX docs completely to PlDoc for this library. Nicos Angelopoulos
  • [Feb 3 2021]
  • FIXED: We should not decrement the falsecount on incomplete tables that
  • are created while reevaluating incremental tables.
  • FIXED: reevaluation completion may be in a merged SCC. In that
  • case we must be careful not to propagate falsecount through re-evaluating nodes by setting the reevaluating status to FALSE after completing all reevaluated tables.
  • [Feb 2 2021]
  • MODIFIED: extend_goal/3 from library(prolog_code) to return the goal
  • using call/N in case the callable to extend is insufficiently instantiated.
  • [Feb 1 2021]
  • TEST: Fixed user defined arithmetic tests. Rick Workman.
  • [Jan 29 2021]
  • ADDED: More statistics/2 keys to SICStus emulation, especially ones introduced in SICStus 4 and later.
  • ADDED: library(sockets) to SICStus 4 emulation. The server socket-related predicates are not emulated yet.
  • [Jan 30 2021]
  • ADDED: Prolog flag max_char_code and updated docs wrt. A is "a".
  • [Jan 27 2021]
  • FIXED: Issue#772: tmp_file/2 not to generate the same name in two threads.
  • ADDED: Partial library(sets) to SICStus 4 emulation.
  • ADDED: ord_member/2 to SICStus emulation.
  • ADDED: More library(lists) predicates to SICStus emulation remove_dups/2, rev/2, same_length/3, shorter_list/2, append_length/[3,4], [proper_]prefix_length/3, [proper_]suffix_length/3, cons/3, last/3, head/2, tail/2, [proper_]prefix/2, [proper_]suffix/2
  • FIXED: Possible crash in PL_get_dict_ex() if the dict data contains a duplicate key.
  • [Jan 26 2021]
  • ADDED: win_module_file_names/1 to enumerate the Windows DLLs used by the process.
  • [Jan 22 2021]
  • FIXED: Make lazy monotonic tabling using answer subsumption avoid fully invalidating indirect dependencies and keep using the lazy monotonic reevaluation.
  • [Jan 21 2021]
  • FIXED: Lazy monotonic predicate depending on two nodes may fail to be updated if the first node has no new answers.
  • [Jan 20 2021]
  • FIXED: Various small issues that allow using []/N (notably []/3) as a predicate. After report by Rick Workman.
  • ADDED: Undocumented way to define new functions. Experimental.
  • [Jan 19 2021]
  • FIXED: Like monotonic dynamic predicates, avoid monotonic tabled predicates to shift a dependency if there is no innermost monotonic tabled predicate.
  • [Jan 17 2021]
  • FIXED: A monotonic table that was invalidated twice including a retract could be re-evaluated twice, first as normal incremental predicate and later as monotonic predicate. This could re-validate an affected node twice.
  • [Jan 16 2021]
  • FIXED: Nest re-evaluation of an invalidated monotonic table (lazy or due to a retract).
  • [Jan 14 2021]
  • ENHANCED: Speedup generation of false paths for incremental tabling by only reporting one edge to a dynamic or complete node of the IDG and merge fetching the edge and getting the status.
  • DOC: Deprecate current_stream/3. Patch by David Tonhofer.
  • DOC: sub_string/5: clarify type handling on input and output.
  • DOC: Unified descriptions of sub_atom/5 and sub_string/5
  • DOC: Removed erroneous markup
  • [Jan 13 2021]
  • DOC: Reviewed length/2 description
  • DOC: Remove reference to -L, -G and -T options.
  • [Jan 11 2021]
  • FIXED: Issue#767: print_term/2 for printing zero-argument compounds. Wouter Beek.
  • FIXED: current_table/2 for shared tables.
  • FIXED: Possible crash when creating a dict from a list if the list contains an invalid key.
  • FIXED: Issue#766: debug portray for continuations in boot/tabling.pl prevents printing zero-arity compounds. Wouter Beek.
  • [Jan 10 2021]
  • MODIFIED: Renamed mapterm/3 into mapargs/3 after discussion on Discourse.
  • [Jan 9 2021]
  • ADDED: Allow monotonic tables to depend on incremental dynamic predicates. As a result, a change to an incremental dependent invalidates the monotonic table.
  • [Jan 8 2021]
  • ENHANCED: A dynamic monotonic predicate should only try to capture the continuation if the inner dependency is monotonically tabled.
  • FIXED: Issue#763: Attempt to create cycle import module dependency exception was not handled correctly. Reported by David Tonhofer.
  • [Jan 7 2021]
  • FIXED: thread_wait/2 handling of the timeout option.
  • [Jan 6 2021]
  • FIXED: incr_is_invalid/1 from library(dialect/xsb/increval) to enumerate instances of the arguments that have invalidated tables.
  • [Jan 4 2021]
  • ADDED: sumlist/2, transpose/2, partition/5, clumped/2 to SICStus 4 library(lists) emulation.
  • ADDED: nonmember/2 to SICStus 4 emulation.
  • ADDED: [is_]mutable/1 to SICStus 3 and 4 emulation.
  • ADDED: More SICStus 4 library(terms) predicates, from SWI library(occurs).
  • FIXED: Windows swipl-win.exe console: check input messages before handling output such that e.g., Control-C works when the output is flooded.
  • MODIFIED: Allow processing interrupts in Windows when in critical state.
  • FIXED: Possible deadlock when passing Control-C from swipl-win.exe.
  • FIXED: possible race in swipl-win.exe output handling.
  • FIXED: sleep/1: interrupt processing for Windows.
  • [Jan 3 2021]
  • MODIFIED: Run compilation of a file in signal atomic mode to avoid partial loads of a source file. Double Control-C allows (dangerous) abort of the load.
  • MODIFIED: Pass sigint on even when in critical mode. Allows for double Control-C to break out of blocked operations.
  • FIXED: detection that we are currently loading a library needed for autoloading, so we need to block.
  • COMPAT: clumped/4 in SICStus does not first sort the list, i.e., it implements run length encoding rather than frequency counting.
  • [Jan 2 2021]
  • DOC: Added library(terms) to the main documentation.
  • ADDED: library(terms): same_functor/2-4, mapterm/3
  • FIXED: Issue#758: unify_with_occurs_check/2: possible false success when attributed variables are involved. Possibly may also involve cases where no attributed variables are involved. Reported by Jan Burse.
  • [Dec 30 2020]
  • CLEANUP: Issue#128: silence maybeUnregisterDirtyDefinition() message for release build. Fabrizio Riguzzi.
  • [Dec 29 2020]
  • ADDED: clumped/2 to library(lists).
  • ADDED: sub_term_shared_variables/3 to library(occurs).
  • [Dec 27 2020]
  • BUILD: Issue#704: skip building the HTML docs if some dependency is missing.
  • [Dec 26 2020]
  • FIXED: absolute_file_name/3 regressing for creating config directories. Resulted in pack install issues reported by Nicholas Hubbard.
  • [Dec 25 2020]
  • ENHANCED: cannot_create_dir message if there are no candidates.
  • [Dec 24 2020]
  • FIXED: Possible crash of the debugger on the call port. We need to set PC to the new predicate before the trace callback or clearUninitialisedVars() may reset wrong variables.
  • [Dec 23 2020]
  • ENHANCED: absolute_file_name/3: do not create XDG directories unless the requested access is write or append.
  • FIXED: Properly detect change after lazy update of a monotonic table.
  • FIXED: Issue#751: call_with_depth_limit/3 with limit -1. David Tonhofer. This patch also cleans up mixed types for handling the limit and possible limit overflows.
  • [Dec 21 2020]
  • ADDED: Support answer subsumption together with incremental and monotonic tabling.
  • [Dec 22 2020]
  • FIXED: Make current_table/2 work for answer subsumption.
  • [Dec 21 2020]
  • FIXED: Issue#747: Windows: expand_file_name/2 Unicode issues.
  • ADDED: Pass additional tabling options for answer subsumption.
  • [Dec 20 2020]
  • ADDED: Initial SICStus 4 emulation (expects_dialect(sicstus4)). This is separate from the existing SICStus emulation (expects_dialect(sicstus)), which emulates almost only SICStus 3 features. The few SICStus 4-only features that were emulated by the sicstus dialect have been moved to the sicstus4 dialect.
  • SICStus 3 and 4 are incompatible enough in some aspects that they cannot be emulated properly as a single dialect. See this discussion: https://swi-prolog.discourse.group/t/expects-dialect-sicstus-how-to-handle-sicstus-3-vs-4-api-conflicts/3381
  • The SICStus 4 emulation currently supports all of library(system) and library(timeout), parts of library(lists) and library(terms), and a few builtins. library(sockets) is not emulated yet, because its API has changed completely between SICStus 3 and 4. library(arrays) has been removed entirely in SICStus 4, so it is not emulated by the sicstus4 dialect.
  • FIXED: SICStus library(lists) emulation now only re-exports predicates that exist on SICStus. This fixes name conflicts when code written for SICStus imports all of library(lists) and then defines its own predicate with a name that isn't used in SICStus library(lists) but is used on SWI, for example flatten/2.
  • ADDED: nth/4, is_list/1, memberchk/2 to SICStus library(lists) emulation.
  • FIXED: expects_dialect/1: always load SWI-Prolog library modules in swi dialect.
  • FIXED: Issue#742: expects_dialect/1: switch emulated_dialect flag after loading the dialect specific library.
  • FIXED: Issue#742: file resolution may be based on the current dialect. This patch includes the dialect in the caches.
  • [Dec 19 2020]
  • DOC: document use of call/N explicitly
  • [Dec 18 2020]
  • FIXED: We cannot catch a delimited continuation through a findall/3. Raise an error and give better messages for attempts to table this way.
  • [Dec 16 2020]
  • DOC: Fixed a typo, added commas and needed spaces.
  • DOC: Fixed a type, added commas and needed spaces.
  • [Dec 15 2020]
  • FIXED: Item#740: cleanup of removed subsumed answers may cause wrong enumeration of tabling worklists as well as use-after-free (and thus crashes). Reported by Damiano Azzolini.
  • FIXED: is_git_directory/1 for submodules.
  • FIXED: Reloading library(git) due to operator conflict.
  • FIXED: is_git_directory/1 for submodules.
  • [Dec 14 2020]
  • ENHANCED: Detection of Emacs inferior mode. Now sets up tty on Windows as we have no way to detect.
  • [Dec 13 2020]
  • FIXED: library(simplex): calling wrong predicate.
  • [Dec 11 2020]
  • DOC: Reviewed Section 5 (extensions) except "Dicts"
  • FIXED: Possible race condition in retract/1 generation management. This patch ensures that when a clause is considered visible in some thread based on GD->_generation, this remains to be the case. Before, the global generation may be updated before the clause generation is updated, which may trigger a thread to consider the clause visible while it is no longer.
  • Finally diagnosed by Keri Harris.
  • [Dec 10 2020]
  • DOC: Issue#735: PL_put_term(). Michael Duggan.
  • [Dec 9 2020]
  • FIXED: untable/1 to remove table attributes such as incremental, monotonic, etc.
  • [Dec 8 2020]
  • ADDED: Lazy monotonic tabling. Still working on test cases.
  • [Dec 7 2020]
  • FIXED: atomic_list_concat/3: possible double free, corrupting memory.
  • [Dec 6 2020]
  • ADDED: op declarations for mode, do, spy, nospy to SICStus emulation.
  • ENHANCED: use_module/2 with SICStus emulation imports all operators. Fixes part of #731.
  • FIXED: SICStus emulation breaking op declarations in standard modules. As a side effect, the goal expansion no longer rewrites op declarations in library(dialect/sicstus), so they now have to be manually declared in the user module.
  • Fixes part of #731.
  • [Dec 2 2020]
  • DOC: library(apply), added test cases for foldl
  • [Dec 5 2020]
  • FIXED: Issue#722: premature reclaim of a clause reference in retract/1.
  • DOC: Fix typos
  • [Dec 4 2020]
  • FIXED: Possible crash in B_UNIFY_FC on a global stack overflow.
  • [Dec 3 2020]
  • FIXED: Make library(prolog_codewalk) work with name() predicate heads.
  • MODIFIED: Delay to start handling SIGINT (Control-C) to when the toplevel is started. Added Prolog flag debug_on_interrupt and command line option --debug-on-interrupt. @swi on Discourse.
  • FIXED: Do not set a Prolog flag if the hook dealing with the side effect fails.
  • ADDED: Dict function get(KeyPath, Default). Suggested by Esad Hajdarevic.
  • ADDED: Dict.get(Key) now allows for a key path, e.g., Dict.get(a/b). Suggested by Esad Hajdarevic.
  • ENHANCED: halt if we tried to handle exit from a thread twice.
  • [Dec 2 2020]
  • DOC: Fixed link to paper in extensions; bibliography rebuild
  • [Dec 1 2020]
  • ADDED: library(sandbox): declare nonground/2 as safe.
  • [Nov 30 2020]
  • DOC: Avoid duplicate section label.
  • [Nov 27 2020]
  • FIXED: Consistent answer count admin for answer subsumptive tabling. Resulted in "OOPS: trie_property/2: counted %zd values, admin says %zdn" messages.
  • ENHANCED: library(aggregate) to hide internal details from the debugger. Suggested by Peter Ludemann.
  • [Nov 26 2020]
  • ADDED: body_term_calls/2 to library(prolog_code).
  • DOC: Slight touches to the documentation.
  • [Nov 25 2020]
  • FIXED: Handling of the Prolog flag compile_meta_arguments.
  • [Nov 24 2020]
  • ADDED: prolog_listen/3: allow naming an event callback using a name(Name) option. Registering a callback on the same channel with the same name updates the associated goal rather than adding a new one.
  • [Nov 23 2020]
  • FIXED: Save/restore whether we are in monotonic answer propagation when doing a save/restore of the tabling status.
  • FIXED: retract((m:head :- Body)) failed.
  • DOC: Document updating the Docker library.
  • [Nov 21 2020]
  • FIXED: Issue#714: transaction semantics on some platforms due to missing volatile declaration.

New in SWI-Prolog 8.2.4 (Oct 26, 2021)

  • [Jan 20 2021]
  • FIXED: Various small issues that allow using []/N (notably []/3) as a predicate. After report by Rick Workman.
  • [Jan 13 2021]
  • DOC: Remove reference to -L, -G and -T options.
  • [Jan 11 2021]
  • FIXED: Issue#767: print_term/2 for printing zero-argument compounds. Wouter Beek.
  • FIXED: Possible crash when creating a dict from a list if the list contains an invalid key.
  • [Oct 5 2020]
  • FIXED: Crash when creating a dict from an invalid key.
  • [Jan 8 2021]
  • FIXED: Issue#763: Attempt to create cycle import module dependency exception was not handled correctly. Reported by David Tonhofer.
  • [Jan 4 2021]
  • FIXED: Windows swipl-win.exe console: check input messages before handling output such that e.g., Control-C works when the output is flooded.
  • MODIFIED: Allow processing interrupts in Windows when in critical state.
  • FIXED: Possible deadlock when passing Control-C from swipl-win.exe.
  • FIXED: possible race in swipl-win.exe output handling.
  • FIXED: sleep/1: interrupt processing for Windows.
  • [Jan 2 2021]
  • FIXED: Issue#758: unify_with_occurs_check/2: possible false success when attributed variables are involved. Possibly may also involve cases where no attributed variables are involved. Reported by Jan Burse.
  • [Dec 30 2020]
  • CLEANUP: Issue#128: silence maybeUnregisterDirtyDefinition() message for release build. Fabrizio Riguzzi.
  • [Dec 27 2020]
  • BUILD: Issue#704: skip building the HTML docs if some dependency is missing.
  • [Dec 24 2020]
  • FIXED: Possible crash of the debugger on the call port. We need to set PC to the new predicate before the trace callback or clearUninitialisedVars() may reset wrong variables.
  • [Dec 23 2020]
  • FIXED: Issue#751: call_with_depth_limit/3 with limit -1. David Tonhofer. This patch also cleans up mixed types for handling the limit and possible limit overflows.
  • [Dec 21 2020]
  • FIXED: Issue#747: Windows: expand_file_name/2 Unicode issues.
  • [Dec 18 2020]
  • FIXED: We cannot catch a delimited continuation through a findall/3. Raise an error and give better messages for attempts to table this way.
  • [Dec 16 2020]
  • DOC: Fixed a type, added commas and needed spaces.
  • [Dec 15 2020]
  • FIXED: is_git_directory/1 for submodules.
  • FIXED: Reloading library(git) due to operator conflict.
  • FIXED: is_git_directory/1 for submodules.
  • [Dec 14 2020]
  • ENHANCED: Detection of Emacs inferior mode. Now sets up tty on Windows as we have no way to detect.
  • [Dec 13 2020]
  • FIXED: library(simplex): calling wrong predicate.
  • [Dec 11 2020]
  • FIXED: Backport of 06e3e152a83ec786a689085274d49da1e56b9287 from devel: FIXED: Possible race condition in retract/1 generation management.
  • [Dec 7 2020]
  • FIXED: atomic_list_concat/3: possible double free, corrupting memory.
  • [Dec 5 2020]
  • FIXED: Issue#722: premature reclaim of a clause reference in retract/1.
  • [Dec 3 2020]
  • FIXED: Make library(prolog_codewalk) work with name() predicate heads.
  • FIXED: Do not set a Prolog flag if the hook dealing with the side effect fails.
  • ENHANCED: halt if we tried to handle exit from a thread twice.
  • [Dec 1 2020]
  • ADDED: library(sandbox): declare nonground/2 as safe.
  • [Nov 30 2020]
  • DOC: Avoid duplicate section label.
  • [Nov 27 2020]
  • FIXED: Consistent answer count admin for answer subsumptive tabling. Resulted in "OOPS: trie_property/2: counted %zd values, admin says %zdn" messages.
  • [Nov 25 2020]
  • FIXED: Handling of the Prolog flag compile_meta_arguments.
  • Package bench
  • [Nov 27 2020]
  • ADDED: Answer subsumption benchmark.
  • Package clib
  • [Jan 25 2021]
  • FIXED: handle pipe(Stream, Options) encoding correctly. @dgelessus
  • [Jan 23 2021]
  • ADDED: process_create/3: SICStus 4 compatible pipe(Pipe,Options) option supporting type(Type) and encoding(Encoding).
  • [Dec 3 2020]
  • FIXED: Issue#33: environment variables may not be passed. This shows on MacOS, but can happen on any system.
  • FIXED: Issue#33: NULL pointer dereference in `process_create('/usr/bin/printenv', [], [environment([])]).
  • Package http
  • [Jan 26 2021]
  • ADDED: `gone 410` to list of status replies
  • [Dec 27 2020]
  • ADDED: Define http_open/map_method/2 as multifile so we can support non-RFC HTTP methods.
  • [Dec 2 2020]
  • COMPAT: Parse cookie values more flexible. Keri Harris.
  • Package jpl
  • [Dec 14 2020]
  • PORT: Apple java_home program doesn't accept -d64
  • [Dec 3 2020]
  • BUILD: Avoid "Value of JAVA_HOME contained a newline" warning on MacOS.
  • Package pldoc
  • [Dec 13 2020]
  • ADDED: Hook doc_object_footer//2 to add per-object examples.
  • [Dec 10 2020]
  • FIXED: Export new HTML output routines.
  • [Dec 2 2020]
  • DOC: Typo fix
  • Package semweb
  • [Dec 11 2020]
  • FIXED: Issue#737: Although unlikely, computed garbage may be < 0 due to asynchronous computation of the different garbage components. As this figure is only used for statistics we just report < 0 as 0 instead of raising an assertion error.
  • Package ssl
  • [Dec 18 2020]
  • TEST: Issue#159: OpenSSL 1.1.1i changed sequence for unknown_issuer certificate reporting. Patch by Kurt Roeckx.
  • Package tipc
  • [Dec 13 2020]
  • FIXED: tipc_paxos_replicate/1 called non-existing predicate. Removed.
  • Package xpce
  • [Dec 3 2020]
  • FIXED: Cross-reference GUI: handle name() definitions.
  • [Nov 29 2020]
  • FIXED: Issue#19: Possibly buffer overflow and incorrect error message if XPCE cannot connect to the given display.

New in SWI-Prolog 8.5.1-1 Development (Oct 26, 2021)

  • 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 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.
  • FIXED: Re-enable 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: 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.

New in SWI-Prolog 8.5.0-1 Development (Oct 5, 2021)

  • 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

New in SWI-Prolog 8.3.29-1 Development (Sep 2, 2021)

  • BUILD: Use PGO optimization for the Debian builds.
  • FIXED: clause/2 (and related predicates) on clauses where unifications are moved into the head failed in a saved state.
  • FIXED: clause/2 for unification that was migrated to the head and used nested in a term used as argument to some body call (using B_ARGVAR instead of B_VAR).
  • ADDED: format_time/3: handle '%P' on systems not using glibc.

New in SWI-Prolog 8.3.28-1 Development (Aug 4, 2021)

  • DOC: absolute_file_name/2. Issue#871
  • MODIFIED: absolute_file_name/3 to return directories if the requested access is none and no file type is specified as regular or directory.

New in SWI-Prolog 8.3.27-1 Development (Jul 13, 2021)

  • FIXED: If reevaluation changes conditions for a trie we must recompile the trie.
  • FIXED: tnot/1 table status evaluation during incremental re-evaluation.
  • ENHANCED: cli_enable_development_system/0: avoid loading xpce when creating a state.
  • FIXED: Failure in incremental tabling if a leaf predicate is both tabled and dynamic.
  • FIXED: Issue#861: blobs with PL_BLOB_NOCOPY|PL_BLOB_UNIQUE must only compare the pointer.
  • BUILD: Issue#860: PGO building did not work with make on MacOS.
  • ADDED: Initial partial library(clpfd) to SICStus 4 emulation.
  • BUILD: Issue#859: Building main.pl docs now depends on xpce.
  • PORT: Allocator detection.
  • ADDED: trim_heap/0 and a Prolog flag malloc to identify the malloc implementation and provide additional features when detected.
  • ADDED: Integrated stomp into the build process
  • ADDED: packages/stomp.
  • FIXED: lazy monotonic tabling requires a proper completion check. Such a table is complete if the dependencies do not contain any invalid incremental tables and all lazy queues are empty. Dependency tracking must be recursive and has to deal with loops. This fix avoids non-termination whil reevaluating lazy monotonic tables that contain cycles.
  • FIXED: While reevaluating a lazy monotonic node we should not consider it invalid.
  • FIXED: lazy monotonic update to set the current IDG node properly.
  • ENHANCED: explain/1 to support dicts, hide references from the cross-referencer and show file and line numbers for references from clauses.
  • ADDED: Supply a depth with the tracer r command to retry immediately on a parent goal.
  • ADDED: [level] S trace command to save a goal to the recorded database.
  • ENHANCED: Command line debugger 'h' command
  • ADDED: Command line debugger 'g' command to accept a negative number of frames as numeric parameter to print the outermost N frames rather than the innermost. As a result, the '-' command (no spy) must be followed by the RETURN key.
  • FIXED: Issue#853: prolog_walk_code/1 did not respect the module_class option, scanning all modules.
  • ENHANCED: library(prolog_codewalk): avoid trying to find the file -.
  • FIXED: Avoid permission error when using autoload/1 after autoload/2.
  • ADDED: library(main): cli_parse_debug_options/2 and cli_enable_development_system/0.
  • ADDED: mapsubterms/3 to recursively substitute arguments in a sub term.
  • FIXED: on_signal/3 claims the signal is wrong on a type error on the handler.
  • FIXED: Avoid a race condition between thread_join/2 and thread_detach/1 and disallow multiple threads to join the same thread. Updated docs for thread_join/2.
  • ENHANCED: trace/1,2 to work better on imported predicates, applying the wrapper directly to the implementation.
  • ADDED: File access mode search as an alias for execute. Improves compatibility with SICStus.
  • FIXED: Prevent source analysis to loop on an unbound module export list.
  • ADDED: library(file_systems) to SICStus 4 emulation.
  • Package clpqr:
  • ENHANCED: Use high level copy built-ins to realize dump/3 and projecting_assert/1. Share code between these.
  • MODIFIED: library(clpq) to throw ISO compliant exceptions
  • Package plunit:
  • ADDED: show_coverage/2: Produce annotated files with coverage information. This information now also shows the number of entries and exits/failures.
  • Package protobufs:
  • TESTING: added many unit tests
  • ADDED: protobuf_serialize_to_codes/3 fixed: uint64_codes et al handling of signed/unsigned improved: error handling for uint64_codes et al renamed integer_zigzag to int64_zigzag, int32_codes => uint32_codes, etc. moved some code into protobufs.c (uint64_int32, etc.) simplified code by using freeze/2 and when/2 instead of nonvar/1
  • ADDED: protobuf_parse_from_codes/3 (using output of protoc-gen-swipl plugin)
  • ENHANCED: handle "group" add protobuf/unittest golden
  • BUILD: Run developer and "demo" tests as part of cmake/ctest build Use installed protoc Refactor Makefiles
  • TEST: Added unittest*.proto and "golden" tests, edge case tests
  • ADDED: Plugin for protoc (protoc-gen-swipl) Copy logic from descriptor_proto_expand.pl to protoc-gen-swipl
  • FIXED: Some edge cases of negative or very large numbers Added round-trip tests Work-around issue #5 Added utf8 encoding directives Replace UTF8 strings by unicode codes, in case tests run in ASCII locale
  • ENHANCED: Added repeated_embedded, unsigned32, unsigned64
  • PORT: Avoid UTF-8 in comment to allow building using non-UTF-8 locales.
  • ENHANCED: handle repeated [packed=true]
  • Package xpce:
  • FIXED: Allow autoloading library(pce_dispatch).

New in SWI-Prolog 8.3.26-1 Development (Jun 22, 2021)

  • FIXED: Accidentally left debug test that could lead to an "Too many stacked strings" fatal error.
  • FIXED: Monotonic table that depends on a monotonic table that has forced reevaluation due to a retract and a normal monotonic table.
  • ADDED: PL_get_uint64() and PL_get_uint64_ex() API functions for consistency.

New in SWI-Prolog 8.3.25-1 Development (Jun 2, 2021)

  • FIXED: Silent failure in CLP(FD) domain calculation for truncated division.

New in SWI-Prolog 8.3.24-1 Development (May 10, 2021)

  • FIXED: Issue#830: assertion failure in GUI debugger. Wouter Beek.
  • TEST: Make a test fail if an error message is printed.
  • FIXED: locale_create/3: handling of default and current_locale.
  • ADDED: Make the new on-error and on-warning options work both in normal mode and in compilation (-c) mode.
  • ENHANCED: Handle underscores and minus the same when parsing compilation options for -c.
  • ENHANCED: Enable color output when compiling
  • ADDED: Prolog flags on_error and on_warning connected to commandline options.
  • ADDED: Provide a (silent) message reporting the error and warning count while loading a file and document error handling during compilation.
  • ADDED: statistics/2 and thread_statistics/3 keys warnings and errors.
  • ADDED: undo/1 to schedule goals to be called on backtracking.
  • FIXED: Issue#110: Nested consult/1 on already loaded files (reconsult) did not do generation management correctly.
  • MODIFIED: Renamed incr_propagate_answer/1 to incr_propagate_calls/1. Removed incr_invalidate_answer/1 (is incr_invalidate_calls/1).
  • FIXED: Ensure a compiled trie never ends in I_FAIL. This crashes the debugger.
  • FIXED: vm_list/1 for compiled tries.
  • ADDED: incr_propagate_answer/1 and incr_invalidate_answer/1.
  • MODIFIED: Move library(increval) from dialect/xsb to the core library. Code using the XSB emulation should run unmodified. Code that uses this library as library(dialect/xsb/increval) must be updated to load library(increval) or rely on autoloading.
  • DOC: Updated stream_property/2 for representation_error
  • ADDED: Prolog flag character_escapes_unicode
  • CLEANUP: Generalize fast access to boolean Prolog flags such that we can host more than 32.
  • ENHANCED: Use Unicode classifiers for deciding on which characters to escape for quoted write.
  • DOC: Escape sequences used for quoted write.
  • MODIFIED: Make quoted write depend on iswgraph() rather than not quote any non-ascii character. Escaped characters are written as x<hex>.
  • ADDED: code_type/2: category print
  • FIXED: Tighter checking correctness of sandbox declarations and fix wrong declaration for '$moded_wrap_tabled'/5 (was /4).
  • DOC: stream_property/2 representation_errors property.
  • DOC: Explain current status wrt dynamic and static linking.
  • BUILD: Added -DSWIPL_STATIC_LIB=ON config option to also build a static library.
  • BUILD: Use CMake OBJECT library as intermediate.
  • ENHANCED: Issue#825: Error handling when goal_expansion/2 binds a variable in +/1 or ;/2.
  • ADDED: Prolog flag optimise_unify to prevent moving unifications to the head. as these harm notably the source level debugger experience.
  • FIXED: runtime change of det/1 property. Peter Ludemann.
  • FIXED: Fresh table that depends on an invalid monotonic lazy table causes a permission error.
  • DOC: "pinned" -> "developed"

New in SWI-Prolog 8.3.23-1 Development (Apr 28, 2021)

  • PORT: Make Windows build work again due to changed debug infrastructure.

New in SWI-Prolog 8.3.22-1 Development (Apr 6, 2021)

  • ENHANCED: Error message when using =>/2 as a goal. Boris Vassilev.
  • FIXED: Bug#810: Failed to re-initialize trailing of table operations in a nested transaction. Crashed. Eric Zinda.

New in SWI-Prolog 8.3.21-1 Development (Mar 24, 2021)

  • FIXED: Positioning fixes and tests for ansi_format/3. Changes ansi_format/3 to format prepended and appended escape sequences separately while keeping line position information on the stream intact.
  • Also adds tests for position information correctness and single nonlist arguments.

New in SWI-Prolog 8.3.20-1 Development (Mar 2, 2021)

  • ENHANCED:
  • Trace/1,2: show calling thread if not main
  • Library(portray_text): updated docs, added set_portray_text/3 to get current settings and added to main documentation.

New in SWI-Prolog 8.3.19-1 Development (Feb 11, 2021)

  • MODIFIED: Use SSU rules for some of the library(lists) predicates: max_member/2, min_member/2, sum_list/2, max_list/2, min_list/2, intersection/3, union/3, subset/2 and subtract/3. This causes errors if the input arguments are non-lists or insufficiently instantiated.
  • ADDED: Single sided unification with commit clauses using =>.

New in SWI-Prolog 8.3.18-1 Development (Jan 24, 2021)

  • FIXED: Make lazy monotonic tabling using answer subsumption avoid fully invalidating indirect dependencies and keep using the lazy monotonic reevaluation

New in SWI-Prolog 8.3.17-1 Development (Jan 8, 2021)

  • FIXED: Issue#763: Attempt to create cycle import module dependency exception was not handled correctly. Reported by David Tonhofer.

New in SWI-Prolog 8.3.16-1 Development (Dec 24, 2020)

  • FIXED:
  • Possible crash of the debugger on the call port. We need to set PC to the new predicate before the trace callback or clearUninitialisedVars() may reset wrong variables.

New in SWI-Prolog 8.3.15-1 Development (Dec 14, 2020)

  • ENHANCED:
  • Detection of Emacs inferior mode. Now sets up tty on Windows as we have no way to detect.

New in 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 SWI-Prolog 8.3.13-1 Development (Nov 16, 2020)

  • BUILD: Handle Markdown core documentation components that do not include Prolog files.

New in SWI-Prolog 8.3.12-1 Development (Nov 16, 2020)

  • BUILD: Handle Markdown core documentation components that do not include Prolog files.

New in SWI-Prolog 8.3.11-1 Development (Nov 4, 2020)

  • TEST: Test file for destroying local definitions.

New in SWI-Prolog 8.3.10-1 Development (Oct 22, 2020)

  • PORT: Windows: Install libswipl.dll.a as libswipl.lib. The MinGW.dll.a is supposed to be accepted by MSVC.
  • ENHANCED: Go more to the limit extending the stacks when we are printing a message, avoiding loosing messages due to resource exceptions.
  • FIXED: Exception term for running out of stack could be huge if the large term is a list ending in a huge compound term.
  • FIXED: globalize_term_ref() didn't properly handling stack overflows, possibly leading to an infinite loop.

New in SWI-Prolog 8.3.9-1 Development (Oct 8, 2020)

  • FIXED: Restore tries when re-evaluation is abandoned due to an exception. Cory Cohen.

New in SWI-Prolog 8.3.8-1 Development (Sep 28, 2020)

  • ENHANCED: library(strings): added indent_lines/3 and test cases for indent_lines, dedent_lines/3 derived from Python.

New in SWI-Prolog 8.3.7-1 Development (Sep 8, 2020)

  • MODIFIED: Issue#665: Added read_term_with_history/2 and moved read_history to library(backcomp). read_term_with_history/2 provides access to all the read_term/2 options, notably the syntax changing options. After discussion with Robert van Engelen.

New in SWI-Prolog 8.3.6-1 Development (Aug 25, 2020)

  • FIXED: Possibly crash in wrap_predicate/4. With help from Peter Ludemann.

New in SWI-Prolog 8.3.5-1 Development (Aug 4, 2020)

  • DOC: Clarifications, fix section levels.
  • DOC: Fix typos in manual
  • FIXED: Issue#646: using {} as postfix operator can cause the output to be confused with a dict. Jan Burse.
  • FIXED: Handle Unicode file names in QLF files and saved states on Windows.
  • FIXED: Do not save the Prolog flag file_name_case_handling.
  • FIXED: listing/1: when used with a partly instantiated head to list a subset of the clauses, do not unify the clause head but only test it is unifyable.
  • ENHANCED: foreach/2: better performance and avoid copying goal.
  • DOC: Fix typos in manual
  • FIXED: HTML text renderer to add a blank line between the first and second par of a list element.
  • FIXED: ht_get/3 on an empty hash table.
  • DOC: functor/3: avoid confusing example.
  • BUILD: Fixed installation. Nicos Angelopoulos
  • FIXED: make_library_index/1 tested whether `.` was changed rather than the target directory.
  • BUILD: Always the library index commands. Prolog checks the dependencies anyway.
  • TEST: Autoload
  • FIXED: Allow importing a predicate using autoload/2 while it is defined in user and make sure the imported predicate actually gets used.
  • FIXED: Autoloading picked predicates from the module user. Test case by Eric Tauber.
  • DOC: Format each summary to have its own line
  • DOC: Fix typos in manual
  • FIXED: Issue#639: system code depended on library, preventing disabling autoloading. James Cash.
  • DOC: get_dict_ex/3 does not exist. Removed the docs. David Tonhofer.
  • ENHANCED: list_debug_topics/0: use quoted print and numbervars to list the topic more precisely. David Tonhofer.
  • Package http:
  • FIXED: Issue#141: Keep-alive with zero content length replies. Esad Hajdarevic.
  • Package jpl:
  • CLEANUP: New code to generate JPL exceptions.

New in SWI-Prolog 8.3.4-1 Development (Jul 17, 2020)

  • FIXED: Actually allow hashtables to have non-ground keys by using variant_hash/2 instead of term_hash/2.
  • DOC: Explain working directory issues for loading likes.pl.
  • FIXED: Issue#637 (following Discourse message): functional notation expansion in ^-meta arguments (bagof/3, setof/3, etc.).

New in SWI-Prolog 8.3.3-1 Development (Jul 2, 2020)

  • ADDED: concurrent_and/2,3 based on Jan Burse's balance/1.
  • DOC: library(persistency).
  • FIXED: Provide elementary thread-safety. Jan Burse.
  • TEST: Added SKIP_SSL_TESTS option to CMake config.
  • ADDED: concurrent_forall/2,3: as forall, running tests in parallel.
  • ENHANCED: thread_signal/1: avoid a max 0.25 sec wait if the signalled thread is blocked on a message queue.
  • PORT: Allow pthread_cond_timedwait() to return EINTR.
  • ENHANCED: copy_term/3 to sort the attvars prior to generating the goals. This produces constraints at the toplevel in more predictable order. Rick Workman.
  • CLEANUP: Term names set to those of ISO Standard
  • DOC: Updated "exception term" page with ISO info
  • DOC: Fix typos in manual
  • DOC: Remove outdated status in manual Shared table space limit was added in commit 6a01fbf70447b419447281826e770ec0cd21ab3d
  • ENHANCED: Issue#625: library(settings): only save when modified and document persistency issues.
  • FIXED: Consider files loaded from a state already loaded.
  • FIXED: Allow for saved states of more than 4Gb.
  • DOC: add missing documentation for native zip handling predicates.
  • MODIFIED: Renamed thread_wait_on_goal/2 into thread_wait/2 and added thread_update/2.
  • ENHANCED: save_settings/1 to use setup_call_cleanup/3 to guarantee reclaiming resources.
  • FIXED: Recursive autoloading when a saved state loads an additional file that sets the Prolog flag autoload to false. Peter Ludemann.
  • MODIFIED: thread_wait_on_goal/2: make it per-module rather than global over the database.
  • ADDED: thread_wait_on_goal/2 to wait for database changes. This predicate is similar to its Qu-Prolog cousin.
  • MODIFIED: Option processing now raises a type_error(option, Option) if an option is malformed (not Name(Value) neither Name = Value).
  • DOC: Fix typos in manual
  • PPA: Removed support for Ubuntu disco (19.10).
  • Package chr:
  • BUILD: Lacking dependency may cause build failures.
  • Package http:
  • DOC: Document the library(zlib) and library(http/http_stream) plugins for library(http_open).
  • Package jpl:
  • CLEANUP: Exptn-generating code & msgs streamlined
  • TEST: Guess /usr/share/java/junit.jar is junit4 if we can't find a clear version 4. Not sure how safe this this.
  • PORT: We do not need javah
  • DOC: Added link to JPL Github repo in main page
  • ADDED: Unit testing for checking Prolog and JPL Exceptions
  • Package ssl:
  • TEST: Allow disabling the SSL tests. Creating the certificates seems really hard inside a docker container using wine as it refuses to seed the openssl.exe random generator. Why remains unclear to me.

New in SWI-Prolog 8.3.2-1 Development (Jun 26, 2020)

  • [Jun 17 2020]:
  • FIXED: library(prolog_codewalk): handle file/4 message terms. Matt Lilley.
  • FIXED: Location of jpl.jar in development tree to be able to run in the dev tree.
  • PORT: Windows: make condition variable abstraction compile again.
  • ADDED: Foreign API to reuse the internal lock-free hash table implementation.
  • DOC: Removed obsolete section on Boehm-GC support.
  • [Jun 16 2020]:
  • FIXED: Make module enumeration safe for temporary modules. This affects notably current_predicate/1 in SWISH. current_predicate/1 using an unbound module now skips enumeration of temporary modules.
  • [Jun 15 2020]:
  • FIXED: Possible race condition when two threads try to compile the same file.
  • FIXED: Possible inconsistent source file reference count.
  • [Jun 14 2020]:
  • CLEANUP: No longer create a source file object for a derived source. This doesn't seem to be used anywhere and the new garbage collecting approach for source files would reclaim the file immediately anyway.
  • FIXED: Make source file admin use reference counts and delete no longer needed source file admin entries. Discarding them is needed by Pengines. The hard-coded discard from '$destroy_module'/1 could cause a use-after-free issue in SWISH when using :- include(file).. The patch is rather involved. Probably there are easier ways to fix this particular issue. Usage based reclaim of source files is a step towards garbage collecting code in general though.
  • CLEANUP: Property balance '$start_consult'/2 and '$end_consult'/1.
  • [Jun 12 2020]:
  • ADDED: message_queue_property/2: property waiting(-Count) to find the number of threads waiting for this queue.
  • ENHANCED: thread_send_message/2: reduce time the queue mutex is held.
  • FIXED: thread_get_message/1,2 could not wakeup after a message arrived.
  • DEBUG: Improved debug channel MSG_QUEUE, notably avoid printing to the possibly redirected current output using pl_writeln().
  • [Jun 11 2020]:
  • FIXED: destroying affected tables should first collect the network. Edward Schwartz
  • DOC: Format CMAKE.md * Justify paragraphs
  • Align CMake options
  • Align table columns
  • [Jun 10 2020]:
  • DOC: Fix typos in CMAKE.md
  • DOC: Fix typos in manual
  • ADDED: wildcard_match/3. Required because wildcard_match/2 no longer listens to case sensitivity of the file system. Suggested by Keri Harris.
  • FIXED: Missing error case for a non-terminated [.. set. Included more test cases.
  • FIXED: wildcard_match/2: peek after string on unmatched "{"
  • FIXED: wildcard_match/2 and expand_file_name/2 used to print a warning and throw a domain_error on an illegal pattern. It now throws a syntax_error exception.
  • TEST: Added files test dir, now containing test_glob.pl
  • FIXED: Memory leak in text canonicalization
  • FIXED: expand_file_name/2 and wildcard_match/2 - Avoid a possible crash using Unicode patterns. Found by Keri harris. - Fully support Unicode in patterns and file names. - Remove the length limit for compiled patterns (used to be 1024 chars).
  • MODIFIED: wildcard_match/2 used to be case insensitive if file names are case insensitive. Now wildcard_match/2 is always case insensitive.
  • [Jun 8 2020]:
  • DOC: Remove duplicate license information * Move the new license down to replace the old one
  • Refer directly to the license page on the website
  • Update the copyright year

New in SWI-Prolog 8.2.0-1 (Jun 26, 2020)

  • [May 27 2020]:
  • FIXED: Download snap source for stable from the correct repo
  • [May 25 2020]:
  • PORT: Handle Windows NetBIOS file names.
  • DOC: Fix typos in manual
  • DOC: Use hyphen as word-separator for long options * For ease of reference, the options names are consistent across the reference manual, man page, and --help message.
  • For better readability, the options names stand out from their corresponding Prolog flags. e.g. --stack-limit vs stack_limit
  • DOC: Fix missing hyphens in command line options
  • DOC: Remove invalid short options
  • DOC: Sort prolog flags
  • PORT: Windows: Recognise //wfs$/ as a share name. Eric Tauber.
  • [May 24 2020]:
  • ENHANCED: Issue#218: portray_clause/2,3 to handle variable_names(Bindings) option (Markus Triska) and move documentation from the core to PlDoc docs from library(listing).
  • [May 22 2020]:
  • DOC: Fix typos in manual
  • [May 24 2020]:
  • MODIFIED: When term-expanding a directive, see whether the goal can be autoloaded and if so, do this. This deals with the common case where a directive is also defined as a predicate. Failing to autoload does not generate an error and thus allows expansion to continue as normal.
  • [May 21 2020]:
  • FIXED: Do not save tmp_dir Prolog flag. Matt Lilley.
  • [May 20 2020]:
  • FIXED: rounding mode when promoting negative rationals to floats
  • CLEANUP: Silence gcc-10 warnings (benign)

New in SWI-Prolog 8.1.32 Development (Jun 18, 2020)

  • FIXED: library(prolog_codewalk): handle file/4 message terms. Matt Lilley.
  • FIXED: Location of jpl.jar in development tree to be able to run in the dev tree.
  • PORT: Windows: make condition variable abstraction compile again.
  • ADDED: Foreign API to reuse the internal lock-free hash table implementation.
  • DOC: Removed obsolete section on Boehm-GC support.

New in SWI-Prolog 8.1.31 Development (May 7, 2020)

  • FIXED: `swipl -c file.pl` without relying on autoloading.
  • PORT: MacOS (clang 11): disable support for gcc threaded bytecode extension (VMCODE_IS_ADDRESS) as this slows down SWI-Prolog by about 30% instead of improving the performance with about 3% (gcc-9).
  • MODIFIED: Move the tables library from library(dialect/xsb/tables) to the main library as the primary interface to reason about created tables.
  • MODIFIED: Memory management for temporary strings used internally and through the foreign language interface functions such as PL_get_nchars(). Such strings used to be managed (by default) in a ring of 16 strings, reusing old buffers. Recent versions used memory mapping for long strings and unmapped these. This exposed a problem that input strings could be incorrectly reused early. Together with Keri Harris we designed and implemented a new stack based management for such strings. Temporary strings are now reclaimed on exit (or failure) of a foreign predicate that created them. In addition, there is this C block ({...}) that may be used to scope strings:
  • PL_STRINGS_MARK();
  • <code>
  • PL_STRINGS_RELEASE();
  • A new flag string_stack_tripwire can be set to get a disagnostic message printed if the string stack reaches some depth limit. This may hint at using the above macros to reduce resource usage.
  • In addition a number of PL_* functions that used to step the string ring now use the above macros to reduce resource usage.

New in SWI-Prolog 7.7.19 Development (Aug 27, 2018)

  • DOC: Issue#320: debugger overview.

New in SWI-Prolog 7.7.18 Development (Jul 11, 2018)

  • PORT: Avoid undefined behavior and implementation defined behavior in shift.
  • PORT: Avoid some undefined C behavior.
  • CLEANUP: Avoid GCC compiler warning due to strict aliasing. Spotted by Andrew Pinski.

New in SWI-Prolog 7.7.16 Development (Jun 12, 2018)

  • PORT: Cross-compilation of defatom tool.
  • ADDED: library(paxos): broadcast hook to support persistency.
  • MODIFIED: Removed undocumented Prolog flag thread_message_prefix and added message_context, which provides a list of context info to add to warning and error messages. Notable intended for server log files.
  • FIXED: CSV writer to write an empty row.
  • ENHANCED: Sandbox limitation message if safety could not be proved due to an instantiation error.
  • FIXED: NLP -> PCRE copy/paste error
  • FIXED: Issue#305: compute result size for ^/2 was off by a factor 8. Results in a signalled stack overflow while there is plenty of space.
  • ENHANCED: csv_write_file/3 and csv_write_stream/3 to run phrase per row and thus avoid creating a giant string in memory. Suggested by Nicos Angelopoulos.
  • FIXED: If the encoding is explicitly stated we should not check for a BOM marker. Arthur Wang.
  • CLEANUP: abstract the interface to the data storage.
  • MODIFIED: Turn paxos as a mapping of arbitrary ground keys to ground values. This changes the message format. It also changes paxos_get/2 and paxos_set/2. Otherwise the term view where the key is the name+arity is maintained using keys '$c'(Name,Arity).
  • PORT: Zip based resource manager for libz < 1.2.7 and OpenBSD I/O functions. Patch by Alexander Shendi.
  • Package clib:
  • PORT: Windows handling of IP multicast options.
  • ADDED: udp_broadcast_close/1 to close a UDP broadcast connection
  • ADDED: support multicast network for udp_broadcast
  • ADDED: Support multicast sockets.
  • ADDED: Add a hook to implement invited joining to a unicast network.
  • ADDED: Unicast UDP broadcast handling.
  • MODIFIED: Allow specifying the UDP message serialization per scope.
  • REDESIGN: Use poll() to handle multiple sockets. Preparing for multiple broadcasting scopes and UDP broadcast/multicast/unicast.
  • MODIFIED: Removed host_to_address/2 and udp_broadcast_service(Scope,Service) event. Both can easily be implemented outside the core of this library.
  • Package http:
  • ADDED: Use new message_context flag to add a time stamp to error messages.
  • ADDED: Query and update session data from explicit sessions. Needed to deal with events from websockets in SWISH.
  • FIXED: WebSocket hub to acknowledge the close package. Fixes clean termination of websocket connections if the close is initiated from the other side.
  • ADDED: supply the queue to the http:schedule_workers/1 hook.
  • FIXED: Detach worker before exitting.
  • Package pengines:
  • REVERT: Reverted the changes to move from jQuery to use the new fetch() API for pengines.js. There are two many issues with the new implementation. notably wrt to aborting queries and error handling. The modifications will be kept in a branch jquery-to-fetch-api.
  • Package semweb:
  • FIXED: Declare rdf_where/1 (rdf11:{}/1) to as sandbox-safe. Jacco van Ossenbruggen.
  • FIXED: make date in example an xsd:date iso xsd:dateTime

New in SWI-Prolog 7.7.14 Development (May 14, 2018)

  • FIXED: Avoid dependency on library(uri)

New in SWI-Prolog 7.7.12 Development (Apr 10, 2018)

  • BUILD: Restore old --server= behavior to only specify the host.

New in SWI-Prolog 7.7.9 Development (Feb 7, 2018)

  • FIXED: stream_property/2 to return the correct value for buffer_size before the buffer is allocated.
  • DOC: Clarified handling cut in *->/2. Paulo Moura.
  • FIXED: issue#285: library(apply_macros): maplist/N expansion if the closure is expanded to a qualified qoal. Markus Triska.
  • DOC: Fixed set_prolog_gc_thread/1 doc declaration.
  • FIXED: Use compound_name_arguments/3 for compounds that may have 0 arguments.
  • FIXED: Make library(prolog_colour) set the xref flag to tell expansion this isn't for real.
  • DEBUG: Add thread id to Foreign predicate %s did not clear exception warning.
  • FIXED: Use Prolog character classification routines to determine whether or not we need a space. Kilian Evang.
  • FIXED: '$btree_find_node'/5 if key is not in tree. Boris Vassilev.
  • ENHANCED: get_assoc/3: use '$btree_find_node'/5
  • MODFIED: '$btree_find_node'/4 has become '$btree_find_node'/5, using a more flexible and intuitive interface.
  • FIXED: compilation of pl-hash.c for WORDSBIGENDIAN machines. Richard Jackson.
  • PORT: Move defining _POSIX_PTHREAD_SEMANTICS to configure to also fix Solaris issues in other files.
  • FIXED: library(prolog_xref): operator handling. This fixes notably locally defined operators for library(prolog_colour).
  • FIXED: library(prolog_colour): handle :- op(Pri, Type, []). that should define the list as an operator.
  • PORT: Find proper grep for float_words_bigendian test. Richard Jackson.
  • PORT: Avoid shell syntax error on empty IFPROLOG. Richard Jackson.
  • PORT: get POSIX sigwait() on Solaris. Richard Jackson.
  • PORT: do not use flags for compiling mkvmi.c. Richard Jackson.
  • PORT: write special floats for machines with fpclass() (Solaris). Richard Jackson.
  • Package clib:
  • SECURITY: library(prolog_stream): invalid memory access.
  • Package jpl:
  • PORT: Do not fail the installation if junit.jar cannot be found.
  • Package sgml:
  • SECURITY: Possible buffer overrun when generating error message
  • Package xpce:
  • MODIFIED: If a callback from xpce to Prolog raises an error, this is printed. XPCE has no proper way to deal with such errors and leaving them around either causes them to be reported much later or being ignored and printed as a non-cleared exception.
  • FIXED: PceEmacs: avoid errors if a goal functor is not a proper atom.
  • Package zlib:
  • ENHANCED: More careful implementation of zcontrol

New in SWI-Prolog 7.6.4 (Jan 12, 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 SWI-Prolog 7.7.7 Development (Dec 22, 2017)

  • TEST: Relax agc-2 test as it may legally fail on heavily loaded and/or slow machines. Keri Harris.
  • FIXED: format/3: Slock()/Sunlock() balancing.
  • Package http:
  • FIXED: http_convert_parameters/2 passing of non-existing declaration goal.
  • Package pengines:
  • FIXED: pengine_property/2: semidet behaviour.
  • Package semweb:
  • ENHANCED: Add support for relaxed XSD date/time literal notation. This adds support for the relaxed XSD date/time literal notations that are already documented for rdf_canonical_literal/2, specifically:
  • date/3
  • date_time/[6,7]
  • month_day/2
  • year_month/2
  • time/3
  • Package ssl:
  • CLEANUP: ssl_negotiate/5: removed obviously wrong and redundant assert() statement.

New in SWI-Prolog 7.7.6 Development (Dec 21, 2017)

  • FIXED: Errornous calls to new setGenerationFrame().
  • PORT: install TeX fonts for generating plaintext manual.
  • ENHANCED: library(nb_set): avoid cyclic term error when compiled with occurs check set to error.
  • DEBUG: Fixed consistency check in nextClause__LD().
  • MODIFIED: current_atom/1 no longer returns the reserved atom '<garbage_collected>'. This atom blocks internal consistency checks.
  • DEBUG: make -d chk_secure work again.
  • TEST: findnsols/4 AGC interaction.
  • FIXED: findnsols/4: prevent early release of findall bag, causing a crash in AGC. Found by Wouter Beek.
  • TEST: Make save state tests run on Windows.
  • TEST: Avoid loading library(limit) if the shared object does not exist.
  • CLEANUP: format/3 and friends: avoid start/endCritical to allow for signal processing and move Slock() to the wrapper to make its use obviously correct.
  • FIXED: Avoid critical regions to stop processing fatal signals such as SEGV. Synchronous handling of such signals in Prolog leads to a signal handling loop.
  • TEST: Allow save-program tests to run concurrently by avoiding fixed file names.
  • CLEANUP: variant/2: Avoid copying inunstantiated data. Although benign, the old implementation leads to messages from debugging tools and performs unnecessary work.
  • FIXED: markAccessedPredicates() did not use atomic management of the last access generation.
  • FIXED: mistakes in previous commit
  • FIXED: Race conditions establishing the generation at which a predicate is about to be accessed for retract/1, retractall/1, clause/2 and nth_clause/3. May lead to accessing freed clauses, typically causing a crash.
  • CLEANUP: retract/1: remove start/endCritical() calls. They are no longer needed and were not properly balanced.
  • CLEANUP: gcClauseRefs() can be static in pl-proc.c
  • FIXED: race condition when adding a fresh atom to a bucket while rehashing is in progress that may cause the bucket to become corrupted
  • FIXED: Use UTF-8 encoding for CLP(FD) source code, closing #281. Without this directive, you may get warnings when CLP(FD) is used in non-UTF8 environments.
  • Now, library(clpfd) is loaded without warnings also with LANG=C.
  • PORT: Provide fallback for sigCrashHandler()
  • PORT: Win32: pthread_setname_np() is a stub in some versions of the winpthread library. Avoid it.
  • CLEANUP: Avoid compiler warnings
  • PORT: Updated build instructions for Ubuntu 17.10
  • TEST: Added test case used for tracking AGC issue
  • CLEANUP: marking atoms
  • FIXED: Possibility that atoms are not marked for GC. With Keri Harris.
  • DEBUG: More atom debugging stuff
  • DEBUG: Make -DO_DEBUG_ATOMGC work again.
  • ENHANCED: Avoid looping when catching a fatal signal in foreign
  • extensions. Now tries: get back to Prolog using a longjmp(). Note that this may leak resources. If that fails, try to print a stack trace and exit. Abramo Bagnara.
  • FIXED: mutex_statistics/0 printing wrong value for lock count if the
  • utex is locked (this predicate only supports analysis of performance issues in multi-threaded applications).
  • MODIFIED: Exit with status 4 when using 'e' from the debugger.
  • Indicate exit status on the terminal with exitting from the debugger and system errors.
  • DOC: wrong arity for thread_join/1, so it doesn't show up in the manual completion.
  • TEST: Make test thread_agc_findall.pl both test different and equal prefixes, stressing AGC better.
  • TEST: Do not considet queue_gc tests failing to reclaim the queues a fatal test failure. This just can happen.
  • Package clib:
  • TEST: library(process): make test suite test availability of programs.
  • MODIFIED: open_memory_file/3,4 to use POSIX newlines on all platforms.
  • FIXED: chmod/2 for Windows to use _wchmod().
  • CLEANUP: remove unused winsock code
  • PORT: winsock rewrite to bring Windows socket code in line with POSIX socket code
  • PORT: use correct winsock error codes
  • ENHANCED: support blocking UDP sockets
  • FIXED: enable signals to be handled when send() blocks on a partially-full TCP buffer
  • FIXED: typo it -> in
  • Package cpp:
  • CLEANUP: Update links to manual tools

New in SWI-Prolog 7.7.5 Development (Dec 12, 2017)

  • [Dec 12 2017]:
  • FIXED: retract/1: terminate with error if decompilation raises an error. Without, it is possible that retract/1 should logically succeed on a clause but skips the clause due to e.g., a resource exception.
  • [Dec 11 2017]:
  • FIXED: Race condition updating the frame generation and the notion of the global generation. Solution suggested by Keri Harris.
  • CLEANUP: Move global_generation() to pl-inline.h for all platforms for better readability.
  • TEST: Remove more concrete file names to allow tests to run concurrently.
  • TEST: Avoid hard-coded file names such that we can run the test from the same directory concurrently.
  • FIXED: Lowering the oldest_generation must be thread-safe. Spotted by Keri Harris.
  • FIXED: Dirty predicates activated while CGC is running must have their active generation updated.
  • FIXED: race condition for cleaning lingering data on predicates.
  • [Dec 10 2017]:
  • FIXED: If we push an accessible predicate while clause GC is active, we must update the generation if it is dirty.
  • DEBUG: Protect against recursive use of acquire_def()
  • FIXED: acquire_def() cannot be used recursively. Doing so in hashDefinition may lead to early release of indexes and clause references.
  • [Dec 9 2017]:
  • FIXED: Possible race extending referenced predicate dynamic array.
  • FIXED: Test for kill(), such that core dumps work after fatal signals are trapped.
  • [Dec 8 2017]:
  • FIXED: Could not build due to syntax error. Wouter Beek.
  • [Dec 7 2017]:
  • ADDED: PL_cvt_i_uint(), PL_cvt_i_ulong(), PL_cvt_i_uint64()
  • MODIFIED: PL_get_integer() no longer silently converts a float that happens to be integer into an integer if O_GMP is used. This is a remain from the days that floats were used as a poor mens replacement for large integers.
  • ENHANCED: On 64 bit machines we do not have to check bignums as these never fit an int.
  • ADDED: PL_cvt_i_uchar() and PL_cvt_i_ushort()
  • [Dec 6 2017]:
  • ADDED: PL_cvt_i_char() to accept one-character atoms, strings and lists
  • [Dec 5 2017]:
  • FIXED: open_string/2: double free if stream argument is instantiated.
  • [Dec 4 2017]:
  • FIXED: debug/1, nodebug/1: possible duplication of clauses when called at the same time from multiple threads. Wolfram Diestel.
  • [Dec 1 2017]:
  • FIXED: perform DCG and goal expansion if the result of term-expansion is a list.
  • FIXED: Find clauses if depth limit for deep indexing is exceeded. Jos de Roo.
  • [Nov 29 2017]:
  • ADDED: PL_cvt_i_char(), PL_cvt_i_short() and PL_cvt_i_int64(), extending Quintus/SICStus style native C conversions
  • Package http:
  • [Dec 1 2017]:
  • FIXED: Typo's in type documentation for `http_parameter/2'.
  • Package pengines:
  • [Dec 7 2017]:
  • FIXED: make sure that the variable names are also correct when the goal is being executed rather than only when the goal is being expanded.
  • Package plunit:
  • [Dec 11 2017]:
  • MODIFIED: Depth limit when printing failure terms from 10 to 100.
  • Package semweb:
  • [Dec 6 2017]:
  • ENHANCED: rdf_save/2: more efficient enumeration of subjects if a small graph from a large database is saved.
  • FIXED: Meta-predicate declaration for rdf_save_canonical_trig/2.

New in SWI-Prolog 7.6.3 (Nov 29, 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 SWI-Prolog 7.7.4 Development (Nov 29, 2017)

  • [Nov 28 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.
  • [Nov 27 2017]
  • DEBUG: Fix print_val() for summarised atoms
  • DOC: Document new indexing
  • [Nov 25 2017]
  • FIXED: Reported location of indexes
  • ADDED: statistics/2 indexes_{created,destroyed} keys
  • [Nov 24 2017]
  • ENHANCED: Small speedup of critical linkVal() function
  • [Nov 23 2017]
  • ADDED: Report size of index tables. Updated documentation.
  • [Nov 22 2017]
  • TEST: Update for new index representation
  • MODIFIED: predicate_property(P, indexed(Indexes)).
  • CLEANUP: Remove unneeded argument to clauseNo()
  • [Nov 21 2017]
  • REFACTOR: Move argument info into clause-list, such that it can be reused in sub-indexes
  • HACK: Use `lists' for all indexes to debug this
  • [Nov 27 2017]
  • FIXED: cherry-pick of 4ffba6cc6648e1ef18165d0faf4995327965b25e needed more edit.
  • [Nov 26 2017]
  • 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 SWI-Prolog 7.6.2 (Nov 24, 2017)

  • [Nov 20 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)
  • [Nov 7 2017]
  • ADDED: Multiline CSV rows where newlines are embedded in quoted fields.
  • [Nov 11 2017]
  • 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
  • [Nov 8 2017]
  • FIXED: atom-garbage collection when compiled for single threading. Abramo Bagnara.
  • [Nov 6 2017]
  • DOC: Document engine_destroy/1
  • [Nov 3 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
  • [Nov 2 2017]
  • 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.
  • [Nov 1 2017]
  • DOC: asserta/1,2, assertz/1,2, assert/1,2: join, add example.
  • Package jpl
  • [Nov 15 2017]
  • PORT: Find Java9 shared object dir from the java home.
  • [Nov 13 2017]
  • PORT: Also check new Java 9 directory structure
  • Package pldoc
  • [Nov 13 2017]
  • ENHANCED: Do not not include the synopsis when including a predicate documentation into markdown using [[Name/Arity]].
  • Package plunit
  • [Nov 22 2017]
  • 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
  • [Nov 22 2017]
  • FIXED: prioritize base URI explicitly set through option.
  • FIXED: File input clause for read_rdfa/3 would not be reached.
  • [Nov 4 2017]
  • PORT: ntriple parser for platform with unsigned char (arm)
  • [Nov 3 2017]
  • 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
  • [Nov 13 2017]
  • ENHANCED: SAML certificate checking: ignore data appearing before the first BEGIN CERTIFICATE delineator and everything after the first END CERTIFICATE
  • Package xpce
  • [Nov 20 2017]
  • ADDED: PceEmacs: Support two context arguments for colour fragments

New in SWI-Prolog 7.6.1 (Nov 6, 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 SWI-Prolog 7.7.2 Development (Nov 1, 2017)

  • [Nov 1 2017]:
  • 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
  • [Oct 31 2017]:
  • ADDED: load_files/2: option check_script(+Boolean) to prevent checking for a #! script line.
  • FIXED: Race conditions around GD->functors.highest.
  • [Oct 30 2017]:
  • 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
  • [Oct 27 2017]:
  • ENHANCED: Avoid creating modules for '$def_modules'/2 (part of expansion)
  • ENHANCED: Avoid creating modules for qualified goals to non-existing modules.
  • [Oct 29 2017]:
  • 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.
  • [Oct 28 2017]:
  • 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.
  • [Oct 27 2017]:
  • FIXED: Race condition in reserveAtom().
  • [Oct 26 2017]:
  • FIXED: Way simpler handling for starting AGC/CGC on a separate thread lazily.
  • PORT: Compilation on systems that do not have pthread_attr_setaffinity_np() and SCHED_SETAFFINITY. Paulo Moura.
  • FIXED: more issues around the creation of the gc thread. Note that these problems only affect programs in the startup phase.
  • [Oct 25 2017]:
  • 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.
  • ADDED: thread_affinity/3 to query and control the thread affinity mask
  • 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.
  • ADDED: thread_create/3: option affinity(CpuSet)
  • [Oct 22 2017]:
  • MODIFIED: current_key/1 used to succeed on empty record lists. This seems inconsistent with the rest of the recorded database.
  • 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.
  • [Oct 21 2017]:
  • ADDED: call_nth/2 to library(solution_sequences).
  • [Oct 20 2017]:
  • MODIFIED: Mapping from errno to Prolog exceptions. The following errors used to be mapped to existence errors and are now mapped to more meaningful errors: - EPERM, EROFS and ENOTEMPTY are now mapped to permission_error - ELOOP is now mapped to representation_error
  • [Oct 19 2017]:
  • FIXED: get_procedure() using GP_FINDHERE should not create the target module.
  • [Oct 18 2017]:
  • ENHANCED: current_op/3: avoid creating a module if the name is qualified with the name of an non-existing module.
  • ENHANCED: time_file/2: support sub-second resolution on systems where the time field of `struct stat` is a timespec instead of time_t (e.g., Linux).
  • [Oct 17 2017]:
  • ENHANCED: get_procedure(): avoid creating modules and undefined procedures.
  • [Oct 16 2017]:
  • 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.
  • [Oct 14 2017]:
  • ADDED: csv_read_row/3: handle r delimited files.
  • [Oct 13 2017]:
  • FIXED: 65581363122939a884ea0583277b98f8e9d59a6e completed to actually read r line-terminated CSV files.
  • [Oct 11 2017]:
  • DOC: pack_property/2: make clear this concerns local packs. Nicos Angelopoulos.
  • ENHANCED: Issue#274: better determinism of stream_property(-,+). Douglas Miles.
  • [Oct 10 2017]:
  • FIXED: pack installation: detect we need to build foreign resources if configure.ac is present.
  • Package chr:
  • [Oct 30 2017]:
  • CLEANUP: internally renamed line_number into source_location to reflect the change of the data structure.
  • FIXED: line number patch: part of the code expected an integer
  • ENHANCED: Print file name along with line numbers for CHR errors and warnings. Wouter Beek.
  • Package clib:
  • [Oct 29 2017]:
  • DOC: Issue#18: uri_is_global/1. Wouter Beek.
  • [Oct 28 2017]:
  • DOC: Document structure of Components in uri_authority_components/2.
  • [Oct 19 2017]:
  • FIXED: graceful shutdown of sockets on Windows. An FD_CLOSE event arriving after an EOF has been read must not cause a WSAECONNRESET error
  • [Oct 16 2017]:
  • FIXED: possible race condition on Windows when closing sockets
  • [Oct 8 2017]:
  • ADDED: chmod/2 to change the mode of a file entry on POSIX systems.
  • Package http:
  • [Oct 28 2017]:
  • 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.
  • [Oct 21 2017]:
  • FIXED: http_schedule_logrotate/2: Allow for full weekday as the docs state should be allowed.
  • [Oct 8 2017]:
  • ADDED: http_log_stream/1: broadcast http_log_open(Term) before opening the log file.
  • FIXED: Possible race condition opening the HTTP log file.
  • [Oct 7 2017]:
  • FIXED: possible socket leak if HTTP servers are created and stopped in quick succession. Unlikely to occur in practice
  • [Oct 6 2017]:
  • FIXED: possible hang when restarting HTTP worker pools in quick succession
  • Package pengines:
  • [Nov 1 2017]:
  • FIXED: Infinite loop if solutions(all) is requested and the query raises an error.
  • [Oct 31 2017]:
  • 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.
  • Package pldoc:
  • [Oct 28 2017]:
  • DOC: Fixed typo.
  • [Oct 20 2017]:
  • ADDED: pass on style to <img>
  • Package semweb:
  • [Oct 28 2017]:
  • 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.
  • [Oct 27 2017]:
  • DOC: fixed ungrammatical sentence
  • [Oct 15 2017]:
  • ADDED: sparql_query/3: endpoint(+Endpoint) option as alternative to separate host, scheme, etc. specification.
  • Package sgml:
  • [Oct 29 2017]:
  • MODIFIED: Issue#21: Allow for years with more than 4 digits, as allows in XML Schema part 2.
  • [Oct 24 2017]:
  • DOC: minor typo
  • Package xpce:
  • [Oct 25 2017]:
  • BUILD: Deal with renamed README --> README.md
  • Package zlib:
  • [Oct 20 2017]:
  • 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 SWI-Prolog 7.7.1 Development (Oct 7, 2017)

  • FIXED: thread_get_message/3 with a deadline blocks for an excessive amount of time
  • ADDED: csv//2: allow for r separated records.
  • DOC: link to clib package
  • DOC: Removed outdated argv handling example.
  • FIXED: PceEmacs colour support on the system modules. Requires keeping track of calls to built-in predicates.
  • FIXED: fast_term_serialized/2: possible crash in mode (-,+) due to gc while preparing room for the output term.
  • TEST: error handling in fast_write/2.
  • FIXED: External record handling crash instead of raising a permission error when saving blobs. Wouter Beek.
  • FIXED: In mode-directed tabling, an answer should be added to the worklist for further processing if the output arguments have been updated. This patch causes update/3 to fail if the output arguments have not changed.
  • INSTALL: db package was renamed (long ago) to bdb
  • FIXED: consider leap seconds when performing date&time calculations using libtai
  • FIXED: Missed trailing when qualifying a meta-argument that is passed a variable. jedixb king.
  • FIXED: prolog_frame_attribute/3: properly trail goal arguments. Shouldn't affect normal programs.
  • FIXED: printing pointers in checkData() (internal consistency checking)
  • 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: Issue#106: json_read_dict/3: option value_string_as.
  • Package jpl:
  • PORT: Point at jpl_config_dylib/0 if jpl cannot be loaded on MacOS.
  • ADDED: library(jpl_config) to perform post-installation configuration.
  • PORT: Find Oracle's Java on MacOS as Apple's Java is deprecated.
  • Package pldoc:
  • FIXED: Avoid repeating documentation if multiple modes are documented.
  • Package semweb:
  • FIXED: TriG graphs should be written as Graph { Triples } without an = between them. jedixb king.
  • Package ssl:
  • DOC: library(crypto): Document md5 and sha1 as insecure.
  • ADDED: library(crypto): Support for SHA-3 (Keccak). This requires a recent development version of OpenSSL. SHA-3 will become available with OpenSSL 1.1.1.

New in SWI-Prolog 7.7.0 Development (Sep 27, 2017)

  • ADDED: interactor(?Title), complementing attach_console(?Title)
  • ADDED: attach_console/1 accepts an arbitrary window title
  • DOC: CLP(B): Link to benchmarks at https://www.metalevel.at/clpb/
  • ADDED: goal_colours/3 hook to allow for context awareness.
  • ENHANCED: More efficient handling of ord_intersection(S1, S2, []).
  • ENHANCED: Further optimization of partial evaluation inside disjunctions by finding shared variables with the remainder of the body.
  • ENHANCED: Issue#62: library(prolog_xref): avoid exponential explosion if the branches are not involved in partial evaluation. Paul Singleton.
  • ADDED: Support colouring of {_} if it is a goal.
  • FIXED: atom reference count handling for both keys and values. Only affects multi-threaded applications.
  • PORT: More Windows SSL library name issues.
  • ENHANCED: library(prolog_code_walk): avoid implicit dependency on gtrace.
  • PORT: Deal with OpenSSL 1.1 DLL names for Win32.
  • FIXED: deal with parentheses_term_position/3 term when adding meta-arguments. Samer Abdallah.
  • PORT: Updated SSL DLL files in Windows distribution to 1.1
  • BUILD: Bump OpenSSL for Windows build to 1.1.0f
  • ADDED: Allow set_prolog_flag(browser, Command-fg) to run the browser as a foreground job. Samer Abdallah.
  • Package clpqr:
  • ADDED: sandbox rules for library(clpr).
  • CLEANUP: Reuse highlight support between clpq and clpr
  • ADDED: Sandbox declarations for clpr.
  • ADDED: Syntax highlight support.
  • ADDED: Add sandbox declarations for clp(q).
  • CLEANUP: dumping clpq constraints.
  • Package http:
  • DONE: Reasoning about SSL client certificates with the HTTP Unix daemon. To use SSL client certificates in the HTTP Unix daemon, simply use the now available predicate ssl_set_options/3 to enable them in the hooks that are called by the server upon creation or connection attempts.
  • Package odbc:
  • DOC: types(+ColumnTypes) option. John McCulloch
  • Package pldoc:
  • ADDED: Make <br> at the end of the line break a line. Nicos Angelopoulos.
  • FIXED: Wrong handler name. Samer Abdallah.
  • Package readline:
  • FIXED: Setting proper value for the readline flag. Samer Abdallah.
  • Package semweb:
  • FIXED: Make float comparison locale independent. Kari Harris.
  • Package ssl:
  • CLEANUP: "context" --> "hash_context" in internal definitions. There are different types of "contexts" in OpenSSL. We need to distinguish hash contexts from cipher contexts in preparation of incremental encryption, which will become available in SWI 7.8.
  • The public library(crypto) API is not affected by this change.
  • There are 3 public predicates for incremental hashing:
  • crypto_context_new/2
  • crypto_data_context/3
  • crypto_context_hash/2
  • There may be slightly better names, and I will reconsider the API of library(crypto) once incremental encryption is also available. It should be rather easy to smoothly transition the hash API because these predicates are rarely used. crypto_file_hash/3 is more important for hashes of large files, and that name is perfectly OK.
  • ENHANCED: Throw ssl_feature exception if HKDF is not supported.
  • PORT: throw ssl_feature/1 existence error when underlying SSL library does not support specific SSL feature
  • PORT: support versions of OpenSSL without (possibly) patent-encumbered EC routines
  • DOC: library(crypto): Improve description of keys and nonces.

New in SWI-Prolog 7.5.15 Development (Sep 13, 2017)

  • [Sep 12 2017]
  • CLEANUP: Remove unused clause_index.incomplete
  • ENHANCED: new clauses from a reconsult can be inserted into existing indexes
  • [Sep 10 2017]
  • DOC: replaced url by href
  • [Sep 8 2017]
  • PORT: Make setting the OS thread name also work on MacOS.
  • FIXED: Possible uninitialised variable in signal preparation. Mostly harmless.
  • PORT: Avoid setting thread name on MacOS and iOS. Needs reorganizing to deal with Apple different signature. Paulo Moura.
  • ADDED: Give OS thread the name of the thread alias if the OS supports it.
  • [Sep 6 2017]
  • FIXED: do not used incomplete indexes during a reconsult; do not rehash indexes during a reconsult
  • ADDED: pack_info/1 now lists the libraries that are provided by a pack.
  • ADDED: Pack meta data to allow for version requirement and add the virtual package prolog, so we can say requires(prolog >= '7.5.14').
  • [Aug 31 2017]
  • FIXED: Index condition on uninitialised hints->is_list. Detected by valgrind. Not sure it could really do harm and when, but I fear it could.
  • [Sep 4 2017]
  • BUILD: Fixed profiled build. GCC profiled enable build only works if the process does not spawn threads unless -fprofile-correction. We choose to disable threads while generating profile info using `--nosignals`.
  • MODIFIED: Do not call exception rewriting hook on resource errors. This is likely to run into recursive exceptions, adding no information.
  • FIXED: read_clause/1,2: reset LD->exception.processing when using DEC10 skipping of syntax errors. Without, we are likely to run into fatal exceptions later, crashing.
  • [Sep 2 2017]
  • FIXED: Atomic maintainance of clauses and VM codes avoids incorrect values.
  • [Sep 1 2017]
  • ADDED: safe_meta/3 hook to deal with meta-predicates that need to know about the current context.
  • Package RDF:
  • DOC: replaced url by href
  • DOC: replaced url by href
  • Package archive:
  • DOC: replaced url by href
  • Package bdb:
  • DOC: replaced url by href
  • Package http:
  • [Sep 10 2017]
  • COMPAT: library(http/jquery): support old version-only setting as well as the new file-name. Wouter Beek.
  • DOC: replaced url by href
  • [Sep 7 2017]
  • PORT: Use jquery-min.js from the OS when available. Configure searches for /usr/share/javascript/jquery/jquery.min.js and if found, configures jquery.pl to use this file.
  • ENHANCED: Try to deal with configure-free OpenID return address by inspecting the referer location, either provided by the login URL or from the HTTP header.
  • Package jpl:
  • [Sep 10 2017]
  • DOC: replaced url by href
  • [Sep 4 2017]
  • MODIFIED: Bumped javac compatibility to `-target 7`. OpenJDK 9 has dropped support for version 5 and OpenJDK 10 is rumoured to drop support for version 6.
  • FIXED: Re-applied 4d6638c190b48e8ef82ad94d9976478fd9630dd0. Was lost in cleanup 60a83dcbd5393814ec7f3373311fc4029c6af07b.
  • Package libedit:
  • [Sep 4 2017]
  • FIXED: Read lines longer than 4096 characters. Wouter Beek.
  • Package ltx2htm
  • [Sep 10 2017]
  • DOC: Fix some really outdated remarks.
  • DOC: replaced url by href
  • Package odbc:
  • [Sep 10 2017]
  • DOC: replaced url by href
  • Package pengines:
  • [Sep 10 2017]
  • FIXED: Allow for read/1 (was blocked by sandbox).
  • ADDED: class pl-level-0 to the toplevel compound of a term.
  • Package pldoc:
  • [Sep 11 2017]
  • FIXED: font switches before a closing bracket. Markus Triska.
  • [Sep 10 2017]
  • ENHANCED: Use Pengine term rendering.
  • FIXED: Use quotes when needed to render term.
  • DOC: replaced url by href
  • DOC: replaced url by href
  • Package plunit:
  • [Sep 10 2017]
  • DOC: replace url with href. Wouter Beek
  • [Sep 9 2017]
  • DOC: Fixed typo in plunit docs.
  • Package semweb:
  • [Sep 10 2017]
  • DOC: replaced url by href
  • [Sep 4 2017]
  • DOC: Removed outdate restrictions for read_ntriple/2, read_nquad/2. These predicates used to return only ASCII, but nowadays are able to return UTF-8.
  • Package space:
  • [Sep 10 2017]
  • DOC: replaced url by href
  • Package ssl:
  • [Sep 11 2017]
  • DOC: library(crypto): Explain the difference between IV and nonce.
  • DOC: Move section on binary data (hex_bytes/2) to the beginning.
  • DOC: Include a brief description of commonly used ciphers.
  • [Sep 10 2017]
  • MODIFIED: The default hash algorithms are subject to change. See below. The design principle and guarantee is this: The default algorithm used for hashing is cryptographically secure. To allow transitioning to secure default algorithms also in the future, you must not rely on the particular algorithm that is used by default. Currently, the default is sha256. In the future, a different algorithm may become the default. If you specify an explicit algorithm, then that algorithm is of course used.
  • All hash predicates, and rsa_verify/4 and rsa_sign/4 are affected.
  • To make interoperability and compatibility possible, the affected predicates all yield the actual algorithm that was used if the pertaining option is present and the algorithm is a logical variable.
  • [Sep 9 2017]
  • MODIFIED: rsa_sign/4 and rsa_verify/4 now use sha256 by default. Previously, sha1 was the default. I expect zero impact from this change, because every programmer who uses these predicates must think about the actual hash algorithm that ought to be used on signing or verification. It has for several years been known that SHA-1 cannot be considered secure, and in fact even a concrete collision was recently found. Thus, any existing application must have been migrated to a different algorithm due to security considerations, making the old default inapplicable. Also the internal uses of these predicates all specify the actual algorithm as an option to these predicates, and hence no further changes were needed anywhere within SWI-Prolog due to this modification.
  • The primary purpose of this change is to signal that security is being taken seriously here, and to do everything that is possible to prevent future users from relying on insecure algorithms (however unlikely that may be, since most will explicitly specify a secure algorithm).
  • The new default of sha256 is also in alignment with what the hash predicates such as crypto_data_hash/3 produce by default.
  • DOC: Various improvements to the documentation of symmetric encryption.
  • ENHANCED: library(crypto): An HMAC key can now also be a list of bytes. This is important for example for test vectors that are found in various RFCs, and many practical applications where a 100% portable method to specify the key is needed and would otherwise not be guaranteed due to potential encoding differences of atoms.
  • DOC: library(crypto): A list of bytes can be used as info in HKDF. This is important for example if crypto_data_hkdf/4 is used with file names, URLs etc. You can use utf8_codes//1 to obtain a list of bytes from Unicode code points.
  • [Sep 2 2017]
  • PORT: Compile with OpenSSL < 1.1.0. Authenticated encryption requires OpenSSL 1.1.0 or greater.
  • ADDED: library(crypto): Authenticated encryption. This feature allows you to use the strongest current ciphers, such as ChaCha20 with the Poly1305 authenticator. It is strongly advised that you use authenticated encryption schemes for storing your data.

New in SWI-Prolog 7.5.13 Development (Aug 21, 2017)

  • FIXED: Code walker to handle terms in parenthesis. Arthur Wang.
  • PORT: Fixed atom/clause GC thread signalling for Windows.
  • PORT: Avoid warning if C-stack handling is not supported.
  • ENHANCED: Do not process signals on the GC support thread(s).
  • DOC: absolute_file_name/3: deprecate expand(true). Issue#265
  • DOC: Describe new reload behaviour
  • ENHANCED: reconsulting files behaves like an initial consult. Clauses that are lexically defined before goal/term expansion fires are visible during a reconsult; clauses lexically defined after are not
  • FIXED: Waiting for more than 10 threads to terminate.
  • CLEANUP: Remove FR_KEEPLTOP hack. Speeds up deterministic exit a little.
  • ENHANCED: Move shift/1 and resuming a continuation to the VM. This improves performance a little, but most importantly avoids the need for dirty hacks where foreign predicates modify the stack to achieve non-local jumps. This patch also avoids the last recursive call from call_continuation/1, which avoids recursively collecting larger continuations. Found by Samer Abdallah.
  • FIXED: We cannot delete empty continuations if the continuation ends and environment.
  • FIXED: clause_info/4: deal with parentheses_term_position/3 term in position information of a conjunction.
  • ENHANCED: pack_install/1: ignore MacOS resource forkm files (._*) through new option on archive_extract/3.
  • FIXED: Do not wait for engines at halt/0,1. We do not call possible engine cleanup. Not sure whether or not calling the cleanup handlers is a good idea.
  • ENHANCED: Waiting loop while waiting for Prolog threads to terminate.
  • TEST: Make AGC auto-triggering test more relaxed.
  • FIXED: Clause garbage collection may result in a newly asserted clause not becoming part of the predicate's clause list. This was not a problem in single threaded mode, but is if the clause garbage collector runs in a thread different from the one doing assert/1. Found by Paulo Moura, who also help finding a simpler case.
  • FIXED: actually trigger GC thread.
  • DOC: Mode directed tabling is provided.
  • CLEANUP: Updated comments and removed unused '$start_reset'/0.
  • DOC: Document gc_thread flag.
  • ENHANCED: Run global garbage collection (atoms, clauses) in their own thread.
  • ADDED: $thread_sigwait/1.
  • FIXED: Names of `Prolog' signals
  • TEST: make AGC test aware that AGC may run in a thread
  • TEST: runtime checks for callable/1
  • CLEANUP: comment, layout
  • FIXED: Compilation in single threaded mode
  • CLEANUP: Make the purpose of the L_ATOM lock more clear by renaming it into L_REHASH_ATOMS.
  • CLEANUP: Removed some macros in pl-atom.c
  • CLEANUP: Remove ATOMIC_REFERENCES macro. Makes code rather unreadable, I doubt the old code still works anyway and which CPU has no atomic instructions these days?
  • ENHANCED: Get rid of L_AGC lock that locks between AGC and current_blob/2 and current_atom/1.
  • CLEANUP: generalise bumbref in atom lookup.
  • FIXED: current_blob/2 (also current_atom/1): bail out if unification fails due to (trail) stack overflow. Also clarify special role of '<garbage collected>' atom.
  • FIXED: If the trace_gc flag is active, printing the AGC completion message returned from pl_garbage_collect() before resetting the active flag, thus preventing further AGC.
  • CLEANUP: Replace LOCK() by explicit PL_LOCK(L_*) calls to make it easier to find where particular locks are being held.
  • INSTALL: check_installation/0 now checks that swipl is the first on the executable search PATH. Wouter Beek.
  • ENHANCED: shift/1: avoid adding empty continuation frames. Samer Abdallah.
  • BUILD: Make script/make-ppa a little easier to use
  • Package archive:
  • ADDED: archive_extract/3: exclude(+Patterns) option.
  • Package clib:
  • FIXED: Deal with gc thread in fork/1
  • Package http:
  • ENHANCED: Issue#101: provide default UTF-8 encoding for Turtle derived formats and allow extending the mapping. Wouter Beek.
  • Package libedit:
  • FIXED: Only do signal prepare/unprepare for the primary console as we only have one signal handling space.
  • FIXED: Avoid interrupted system call messages while reading from the terminal.
  • Package odbc:
  • ADDED: odbc_cancel_thread/1 to the ODBC interface for cancelling long-running statements.
  • FIXED: When cloning an ODBC statement where the length_ind for a parameter is 0, do not allocate a 0-length buffer, but instead just copy the parameter-index used to locate the parameter info
  • Package ssl:
  • PORT: Dump crypto_data_hkdf/7 if EVP_PKEY_HKDF is not provided.
  • FIXED: Type error that makes the condition < 0 always false.
  • COMPAT: Compile with OpenSSL < 1.1.0. HKDF (like the hmac/1 option) requires OpenSSL 1.1.0 or greater. Please note that OpenSSL 1.1.0 or greater is also required for other functionality of library(ssl) and library(crypto), and it is strongly recommended to upgrade your OpenSSL installation to the latest version if at all possible.
  • ADDED: library(crypto): HMAC-based key derivation function (HKDF). The new predicate crypto_data_hkdf/4 lets you concentrate possibly dispersed entropy of existing data and then expand it to the desired length. This allows you to derive keys and initialization vectors for cryptographic routines, notably the symmetric encryption predicates.
  • DOC: Added section labels to ensure persistent URLs for the sections.
  • Package xpce:
  • ADDED: PceEmacs: extend M-/ (dabbrev completion) to include the names of all global predicates.

New in SWI-Prolog 7.5.12 Development (Aug 8, 2017)

  • [Aug 7 2017]
  • BUILD: Added MacOS distribution build script
  • FIXED: trie handling of indirect data (float, string) could lead to lookup failure and duplicate entries in a trie. Samer Abdallah.
  • FIXED: Backtracking on lazy input lists in debug mode. Douglas Miles.
  • [Aug 6 2017]
  • DOC: Arity of trie_insert/3,4
  • PORT: Indicate how to use clang (cc) on OpenBSD
  • PORT: Document OpenBSD requirements in build.templ.
  • [Aug 4 2017]
  • FIXED: Include NaN in the standard order of terms after discussion with Joachim Schimpf: NaN come before all floats and are ordered conforming the float ordering after conversion to a float as done by write/1.
  • ADDED: Also allow for e.g. -1.5NaN (negative float), compatible with ECLiPSe.
  • [Aug 3 2017]
  • FIXED: trie_lookup/3 if the associated value is not atomic. Samer Abdallah.
  • [Aug 2 2017]
  • PORT: Test whether backtrace() actually works. Not (always) the case on OpenBSD.
  • PORT: Fix build[.templ] for gmake and bash in $PATH but not in /bin/bash
  • PORT: compensate for sed that does not support
  • PORT: Generate shared object on OpenBSD
  • FIXED: avoid AGC on finished threads
  • PORT: Set AUTOCONF_VERSION as required by OpenBSD
  • FIXED: Apply a6abba9f8986f2725ef7059dbcf737d11aff2ddc (atom table) patch for functors as well and avoid rehashing not-yet-allocated functors.
  • [Aug 1 2017]
  • ADDED: thread_create/2 and thread_join/1 as shorthands to simplify thread handling using maplist/N.
  • FIXED: Avoid deadlock involving 3 threads: one sending a message, another receiving a message that requires GC to be placed on the stacks and a third performing atom-GC. This patch moves synchronization of AGC with garbage collection, stack shifts and stack deallocation from using a global mutex to a per-thread mutex, reducing the impact of AGC on other threads.
  • [Jul 31 2017]
  • DOC: small typo.
  • ADDED: reset/3: restore reset/3 and catch/3 environments.
  • FIXED: shift/1 could create an illegal term, possibly crashing the system.
  • FIXED: pack_install/1: avoid "ERROR: ...: A package archive must be named <pack>-<version>.<ext>" message.
  • [Jul 28 2017]
  • FIXED: Issue#255: peek_string/3 could fail to terminate. Wouter Beek.
  • ADDED: base64_encoded/3 and base64_encoded//2, providing options to control padding and the character set used. Markus Triska.
  • [Jul 16 2017]
  • FIXED: sandbox handling of @/2. Vladislav Zorov and Anne Ogborn.
  • [Jul 11 2017]
  • FIXED: possible crash when handling a signal while calling an unresolved predicate if the signal handler resolves the same predicate.
  • Package archive
  • [Jul 14 2017]
  • DOC: Fixed ungrammatical sentence.
  • Package bdb
  • [Aug 3 2017]
  • PORT: Deal with BDB headers installed as db<N>/db.h
  • PORT: Accept that DB_FAILCHK is not defined on all versions.
  • Package clib
  • [Aug 3 2017]
  • TEST: make crypt/2 test pass if default DES hashing is no longer supported. We can't test anything else as the supported algorithms are OS dependent.
  • ADDED: crypt/2: More control over algorithm and salt
  • [Aug 2 2017]
  • DOC: Comment on the difference between Unix crypt and SSL package crypto_password_hash/2. Loosely based on a much stronger statement by Markus Triska.
  • [Jul 27 2017]
  • FIXED: make_directory_path/1 and delete_directory_and_contents/1: avoid an error if another thread or process created or deleted the same object between the test and action. Jacco van Ossenbruggen.
  • Package libedit
  • [Aug 3 2017]
  • PORT: Check whether we need ncurses.
  • Package pldoc
  • [Jul 14 2017]
  • FIXED: broken pldoc install due to README rename Rename README to README.md in Makefile.in and do not make installation of pldoc.pl depend on successfull install of README.md
  • [Jul 12 2017]
  • TEST: Working on new test infrastructure.
  • Package readline
  • [Aug 3 2017]
  • PORT: Check for ncurses dependency
  • Package semweb
  • [Jul 27 2017]
  • FIXED: rdf_statistics(graphs(Count)) to properly handle destroyed graphs.
  • FIXED: recreating a graph after rdf_unload_graph/1 results in a wrong hash.
  • FIXED: race conditions around last-graph notion.
  • Package ssl
  • [Aug 6 2017]
  • PORT: Find root certificates in /etc/ssl/cert.pem (OpenBSD)
  • PORT: LibreSSL: do not use built-in X509_check_host() as it seems to misbehave. This must be investigated further.
  • PORT: Enable many OpenSSL < 1.01 code when using LibreSSL. These should become configure.in feature tests, but considering many are function types such tests are rather hard to write, so we will write them one-by-one as the compatibility conditions for a particular fragment become more complicated.
  • PORT: Make sure all headers for included nonblockio.c are configured.
  • PORT: Avoid /bin/bash dependency
  • [Jul 31 2017]
  • ADDED: library(crypto): Password-based key derivation. The new predicates crypto_password_hash/[2,3] implement PBKDF2-SHA512 and will also implement additional algorithms in the future.
  • For security reasons, it is highly recommended that you use crypto_password_hash/2 instead of crypt/2. This lets you store the hashes of user passwords in a reasonably secure way.
  • [Jul 29 2017]
  • PORT: generating test certificates avoids calling seq(1) for compatibility with OpenBSD.
  • [Jul 4 2017]
  • DOC: Mention TLS and library(crypto) in the introduction. Itemizations.
  • DOC: library(crypto): Make the encryption example more secure. We now use cryptographically strong random numbers to compute an initalization vector. With AES, we must never use the same IV when using the same key! Using crypto_n_random_numbers/2 makes collisions extremely unlikely.
  • ENHANCED: Prolog exceptions on errors during symmetric _de_cryption. Example:
  • ?- crypto_n_random_bytes(16, Bs), atom_codes(IV, Bs),
  • evp_encrypt("this is some inp", 'aes-128-cbc',
  • "sixteenbyteofkey", IV, CipherText,
  • [padding(none)]), evp_decrypt(CipherText, 'aes-128-cbc',
  • "sixteenbyteofkey", IV, RecoveredText,
  • [padding(block)]). %@ ERROR: SSL(06065064) EVP_DecryptFinal_ex:
  • bad decrypt
  • ENHANCED: Prolog exceptions on errors during symmetric _en_cryption. Example:
  • ?- evp_encrypt("this is some input", 'aes-128-cbc',
  • "sixteenbyteofkey", "sixteenbytesofiv", CipherText,
  • [padding(none)]).
  • %@ ERROR: SSL(0607F08A) EVP_EncryptFinal_ex: data not multiple
  • of block length
  • %@ ERROR: In:
  • %@ ERROR: [8] crypto:evp_encrypt("this is some
  • input",'aes-128-cbc',"sixteenbyteofkey","sixteenbytesofiv",_10414,[padding(none)])
  • %@ ERROR: [7] <user>
  • [Jul 3 2017]
  • FIXED: library(crypto): Respect padding/1 option in evp_encrypt/6. It was previously ignored.
  • Package table
  • [Aug 2 2017]
  • PORT: Define unix, so we surely can undefine it.

New in SWI-Prolog 7.5.11 Development (Jul 11, 2017)

  • PORT: fallback code if C backtraces are not supported
  • DOC: char_type/2: typo.
  • FIXED: make compile with --disable-gmp

New in SWI-Prolog 7.5.10 Development (Jun 26, 2017)

  • ENHANCED: Add callable/1 to the fast type tests.
  • ENHANCED: Specialized versions for delim/3,4
  • MODIFIED: More low-level implementation of reset/3. The new implementation ONLY binds the Continuation if there is no reset, avoiding ambiguity that may result from testing on Ball.
  • FIXED: CLP(FD): Overeager goal expansion. Julien Cumin. This mistake was introduced in 038d86b08bfecc0715b4548a6ec3f2d91c20b658.
  • ENHANCED: Put a continuation in a single structure, reducing memory usage and dereferencing need.
  • ENHANCED: Represent a continuation as an array rather than a linked list.
  • ENHANCED: Use __builtin_popcountll() to compute popcount for `small' integers.
  • ENHANCED: when/2: ground trigger uses nonground/2
  • ADDED: nonground/2, compatible with hProlog and ECLiPSe
  • FIXED: VM version of atom/1 accepted blobs. Paulo Moura.
  • ENHANCED: More low-level code to revive a continuation. Almost 10% improvement on tabling.
  • CLEANUP: simplify local stack overflow handling.
  • ENHANCED: reduce thread local data access.
  • ENHANCED: Reduce thread local data access
  • ENHANCED: Add common type tests to VM (number, float, atom, atomic,string,compound)
  • ENHANCED: Inline arithmetic stack operations.
  • ENHANCED: Avoid creating a choice point for simple conditions in
  • (if-then->else). Simple conditions are those that are executed by the VM itself and are known to be semidet and their execution does not change any terms, so no trailing is needed. Currently covers var/1, nonvar/1, integer/1, ==, == and arithmetic comparison (>, <, =:=, etc.) IF optimized compilation (-O is used). Conjunctions of such simple instructions still use the optimized condition handling.
  • FIXED: Ensure TTY state buffers are fully initialised
  • FIXED: Safe must_be/2. Jacco van Ossenbruggen.
  • ENHANCED: Reduce thread-local-data access.
  • ENHANCED: Reduce thread-local-data access.
  • ADDED: term_singletons/2: find term singleton variables inside a term.
  • ADDED: library(prolog_xref): handle :- import(:PI).
  • HACK: if a first-var integer/1 tests is always false, emit a C_VAR
  • CLEANUP: Generalise compiler warnings for tests that always yield true/false.
  • ADDED: I_INTEGER instruction to speedup integer/1
  • ENHANCED: Faster zcompare/3 when used instead of compare/3. Jan Wielemaker.
  • FIXED: cleanClauseIndexes() should be locked with
  • addClauseToIndexes(). May cause incorrect results as well as crashes.
  • ENHANCED: Only print the thread id when printing the thread context in print_message/2.
  • FIXED: thread_get_message/3 (Windows only) using a deadline if the
  • deadline has already passed waited approx 7 weeks because dwMilliseconds is a DWORD, which is unsigned. New code can also deal with a deadline that is more than 7 weeks ahead. Based on patch by Matt Lilley.
  • ENHANCED: Speedup finding the debug frame for a redo. Eyal Drechter.
  • DOC: Mention crypto_n_random_bytes/2 in the documentation of random/1.
  • DOC: Issue#10: surprises caused by variable ordering.
  • DOC: Issue#5: format_time/3 %p may yield am/pm in some locales.
  • FIXED: Upgrade packs that are installed from github archive files.
  • Package archive:
  • FIXED: archive_extract/3: extracted all files as executable.
  • Package chr:
  • ENHANCED: Use built-in nonground/2 when available.
  • Package clib:
  • FIXED: Issue#29: directory_file_path(-,+,+) returns directory with trailing '/'. Paul Singleton.
  • Package http:
  • FIXED: Encapsulate predicates inside debugging/1 to avoid singleton warnings when running in optimized mode.
  • Package pengines:
  • ENHANCED: SWISH Issue#62: allow redirecting I/O using e.g. with_output_to/2. Anne Ogborn.
  • Package pldoc:
  • FIXED: Issue#27: recent change disallowed font switches inside a [...] label. Markus Triska.
  • FIXED: Really demand font-changing sequences to be preceded by white space or some reserved punctuation.
  • MODIFIED: Do not allow nesting of and .
  • MODIFIED: Depand a font-change sequence to end in whitespace or a sentence ending punctuation mark.
  • FIXED: Avoid <img> alt to be prepended for the predicate name by inserting a space and compensate the layout. Not very nice ...
  • FIXED: Formatting comments inside source code (broken after changes to the fragment classification).
  • Package semweb:
  • ADDED: sparql_query/3: support for HTTPS. Jacco van Ossenbruggen.
  • DOC: plweb issue#121: avoid duplicate rdf_register_prefix/2,3 docs. Wouter Beek.
  • DOC: Missing instantiation indicator.
  • ENHANCED: Use canonical XML writer for datatype rdf:XMLLiteral.
  • DOC: Clarify that the graph/1 term cannot be used with rdf_update/3.
  • FIXED: rdf_list(-) would not enumerate more than one RDF list.
  • ADDED: rdf_nth1/3, complementing rdf_nth0/3 This includes a test case.
  • ADDED: rdf_estimate_complexity/4 now works with rdf11 literal terms.
  • DOC: Fixed instantiation pattern in module header.
  • FIXED: application/turtle -> text/turtle
  • FIXED: iri_turtle_prefix/2 returned the suffix after recent patch rather than the prefix. Jacco van Ossenbruggen.
  • Package ssl:
  • ADDED: Make also ssl_session/2 work for derived filter streams.
  • ADDED: Issue#107: make ssl_peer_certificate/2 and ssl_peer_certificate_chain/2 work from derived filter streams. Markus Triska and Wouter Beek.
  • CLEANUP: ssl context blob handling. Code was dubious, but probably not wrong.
  • FIXED: Blob handling for crypto datastructures.
  • ADDED: library(crypto): New predicate crypto_is_prime/2. This implements a probabilistic primality check.
  • ADDED: library(crypto): New predicate crypto_generate_prime/3.
  • ADDED: library(crypto): Predicates for reasoning over elliptic curves. Currently, only named curves over prime fields are supported. Notable applications of these predicates include the ECDH key exchange used by typical HTTPS servers, and generation of Bitcoin keys and addresses.
  • ADDED: Sandbox declarations for safe library(crypto) predicates.
  • FIXED: Accessing memory after free, potentially leading to a crash. Reproducible on OSX with:
  • ?- length(_, L), garbage_collect, crypto_context_new(Context,
  • [algorithm(sha256)]), false.
  • ADDED: library(crypto): New predicate crypto_modular_inverse/3 [Jun
  • ADDED: library(crypto): New predicate crypto_modular_inverse/3. This predicate lets you compute modular multiplicative inverses, which is an operation that is often needed in cryptographic applications.
  • This can be more than an order of magnitude faster than doing it in Prolog.
  • FIXED:ssl_peer_certificate/2,ssl_peer_certificate_chain/2:avoid
  • ambiguous stream pair warning. Sam Neeves.
  • ADDED: library(crypto): New predicate crypto_n_random_bytes/2. This predicate lets you generate sequences of bytes that are deemed sufficiently unpredictable for cryptographic purposes including creation of keys. This functionality is needed in almost all cryptographic applications.
  • Package xpce:
  • FIXED: prolog_predicate<-convert (reported as always false).

New in SWI-Prolog 7.5.9 Development (Jun 15, 2017)

  • DOC: Updated acknowledgements in manual.
  • ADDED: Mode directed tabling. Initial implementation and test cases by Fabrizio Riguzzi, optimized and documented by Jan Wielemaker.
  • MODIFIED: deleted trie_insert_new/3, added trie_insert/4. trie_insert_new/3 is moved to library(backcomp), so this should not immediately affect applications.
  • ADDED: trie_update/3. The value of a trie can now be an arbitrary term. This is a rewrite of a similar patch by Fabrizio Riguzzi.
  • FIXED: YAP_MkNewApplTerm() and YAP_ArgsOfTerm() raised compiler errors.
  • FIXED: current_type/2 to qualify goals that are local to library error.
  • DOC: Fixed .txt --> .tex dependency.
  • ADDED: PL_unify_uint64() to unify a term with an unsigned 64-bit integer.
  • ADDED: script/swipl-bt: --out=file option
  • ADDED: Prolog flag toplevel_goal to inspect and modify the toplevel inside the initialization.
  • FIXED: Multiple initialization(G, main) should use the last according to the docs.
  • Package http:
  • ADDED: Set encoding to UTF-8 for application/x-prolog.
  • DOC: Improved documentation of option value_string_as/1. Copied the documentation for json_read/3 to apply to predicate json_read_dict/3 as well (which has the same behavior). It is specifically important that the allowed values of this option are now mentioned.
  • Package pldoc:
  • FIXED: Issue#21: Use /swi/ alias when generating a link to the source, so both backends produce the same link.
  • Package semweb
  • FIXED: iri_turtle_prefix/2 could return illegal IRIs. Jacco van Ossenburggen.
  • FIXED: Issue#59: Possible "ambiguous stream pair" message. Wouter Beek.
  • Package ssl:
  • ADDED: library(crypto): Make ripemd160 digest algorithm available.
  • FIXED: Standalone library(crypto) use of evp_encrypt/6 with old OpenSSL. Without this patch and OpenSSL < 1.1.0, the predicates evp_encrypt/6 and evp_decrypt/6 work only if library(ssl) is also loaded. The other predicates of this library were not affected.
  • OpenSSL 1.1.0 and later versions do not need this initialisation.
  • CLEANUP: OpenSSL >= 1.1.0 does not require initialization.
  • Package xpce:
  • PORT: fixed GCC diagnostic pragma: make it really work and recent clang version on MacOS doesn't allow these to be placed inside a function.

New in SWI-Prolog 7.5.8 Development (Jun 9, 2017)

  • PORT: Fixed windows compilation
  • DOC: new toplevel/main features.
  • MODIFIED: main/0 now calls main(Argv) without calling halt/0,1. This enhances interaction with :- initialization(main, main).
  • FIXED: Property release stacks if not all of them could be allocated.
  • FIXED: Hang when rehashing fails due to lack of memory.
  • FIXED: hang when extending the atom array runs out of memory.
  • ENHANCED: Reduce using L_MISC mutex for stack size admin.
  • CLEANUP: Move user mutexes to a new file pl-mutex.c. Share property enumeration code and use a dedicated mutex for user mutex management rather than sharing the L_THREAD mutex.
  • FIXED: Failure to activate the profiler because it is already attached to another thread leaves L_THREAD locked.
  • ENHANCED: Reduce locking for fetching thread status
  • FIXED: Mark() must preserve LD->markbar = NO_MARK_BAR. Without, unifiable/3 crashes if occurs checking is enabled.
  • DOC: -l flag
  • DOC: updated docs for indexing policies.
  • DOC: Include library(main) into main manual.
  • DOC: New program initialization handling.
  • ADDED: initialize/0.
  • CLEANUP: initialization/2 code
  • FIXED: Packs distributed as Github releases could no longer be upgraded. See issue https://github.com/SWI-Prolog/swipl-devel/issues/236 for more information.
  • This approach uses the Github API to retrieve the tags i.o. scraping the HTML.
  • ADDED: library(prolog_jiti).
  • CLEANUP: Avoid duplicate definitions of meta-specifications that need transparency
  • ENHANCED: Move meta-argument specification to arg_info structure, lifting the 16-argument limitation.
  • ADDED: arg_info structure do deal with JITI and meta arguments
  • ENHANCED: Keep indexes sorted by quality
  • FIXED: Select proper arguments for multi-argument indexes
  • ENHANCED: actually reclaim discarded supervisor code. This was not a bit issue as supervisors normally only changed if code is reloaded, causing only a small leak during code development. This prepares for exploring more dynamic supervisors.
  • TEST: Adjusted test cases for modified predicate_property/2.
  • MODIFIED: predicate_property(Head, indexed(Indexes)) now uses a list of arguments for which the hash is generated.
  • FIXED: computation of stdev of same-argument buckets.
  • CLEANUP: Split accessing clauses to a new function
  • CLEANUP: make bestHash() return 1-based arguments for consistency
  • ENHANCED: Pass LD to bestHash()
  • FIXED: Variables or meta-predicates not marked as non fresh, related to 406b689
  • INSTALL: Avoid loading ~/.swiplrc during built (done by check-installation step).
  • Package http:
  • MODIFIED: library(http/http_unix_daemonm) now registers the application entry point as http_daemon/0. Code should remove their :- initialization(http_daemon). to profit from this change. Old code should run unmodified though.
  • Package odbc:
  • ENHANCED: use SQLGetData() for wide NVARCHAR columns
  • Package xpce:
  • PORT: Update for changed indexed predicate property.

New in SWI-Prolog 7.5.7 Development (May 24, 2017)

  • FIXED: library(prolog_xref): also deal with dynamic declarations in other modules.
  • DOC: Properly documented current (Unix) signal processing.
  • ENHANCED: Chain processing of SIGUSR2
  • DOC: Document recent changes to exception handling.
  • MODIFIED: Keep the most urgent exception in case of choice.
  • FIXED: propagate exceptions from printMessage()
  • FIXED: make printMessage() propagate exceptions.
  • MODIFIED: Implement priority ordering for exceptions. Only exceptions with higher or equal priority as the already pending exception will propagate. This should avoid that high priority exceptions such as aborts get replaced by less important exceptions, for example because a cleanup handler raises another exception.
  • ENHANCED: Propagate exceptions from event callbacks
  • PORT: Failed to build on Windows.
  • ENHANCED: debug/3: only print the thread id instead of the ugly thread handle as thread context.
  • CLEANUP: Avoid relying on backward compatibility for PL_call_predicate() internally.
  • ENHANCED: Reduce overhead of -DO_DEBUG by avoiding a GET_LD on each VM in this config.
  • ADDED: command line option --sigalert=NUM to configure the signal that is used to unblock system calls.
  • ADDED: PL_sigaction(), realising a more flexible interface to control SWI-Prolog signal handling from C.
  • MODIFIED: Cleanup of signal handling and documentation. When using `--nosignals`, signal handling is still installed for SIGUSR2 (an empty handler to make blocking system calls return) and the internal Prolog signals that are not related to OS signals.
  • BUG: Document pitfalls with PL_signal().
  • FIXED: Set crash signal handler back to default to avoid crashing in a loop.
  • FIXED: Handle uncaught Prolog exceptions from C++. Reported by Nikolaj Thygesen.
  • FIXED: PL_write_term() must lock the stream
  • FIXED: possible use-after-free when redefining a static predicate as thread_local
  • FIXED: illegal memory access when computing whether the tty state was modified (Unix, mostly harmless).
  • FIXED: Issue#205: absolute_file_name/3 using expand(true) may be multi.
  • Package clib:
  • ENHANCED: Exploit new PL_sigaction() interface. This avoids a previously existing conflict over SIGUSR2 handling with the core and reduces the usage of OS signal handlers from two to one, optionally zero if blocking system calls do not need to be interrupted.
  • FIXED: Use SIGUSR1 for alarm signals rather then SIGUSR2, which is already in use by the core for breaking blocking system calls. It is not really clear what the consequences were. Effectively the core used to run the library(time) handler to break a blocking system call, but this handler does not do anything if there are no alarms ready to fire. Surely though, during shutdown the alarm library incorrectly restores the signal handler due to the impaired PL_signal() API.
  • Package http:
  • ENHANCED: Allow the mapping from exceptions to HTTP replies to be extended through a hook.
  • Package nlp:
  • FIXED: Missing PL_register_atom() call for cached snowball stemmers. May cause OOPS: PL_unregister_atom(...): invalid atom messages as well as crashes.
  • Package semweb:
  • FIXED: Avoid ambiguous access to a stream pair.
  • FIXED: Issue#57: Avoid ambiguous access to a stream pair.
  • Package xpce:
  • FIXED: (hopefully) Issue#228: Long delay filling window for ?- manpce. on some window managers. As a result, frame->geometry no longer accepts negative X coordinates.

New in SWI-Prolog 7.5.6 Development (May 12, 2017)

  • INSTALL: library(pengines_sandbox) for Windows.
  • PORT: pl-dict.c: fully portable version of dict sorting using qsort_r, (BSD or GNU style), qsort_s (Windows), GCC nested functions or as a last resort a mutex and qsort. Required implementation is detected by an extensive configure script.
  • PORT: Added qsort_r/qsort_s to configure tests to improve portability
  • FIXED: In predicate prolog_clause:ubody/5, added clause to process parentheses_term_position(_, _, _).
  • FIXED: Variables or meta-predicates where not geing marked as non fresh. Note also that is not safe to consider extra variables as fresh since we don't know how they will eventually be called.
  • FIXED: Possible crash in considerClauseGC() while clause GC is running. This patch also makes considerClauseGC() return early if clause GC kicks in while it is being considered.
  • PORT: Make sure we actually define __assert_fail().
  • PORT: Issue#224: More robust redefinition of __assert_fail().
  • FIXED: Issue#226: crash when combining tabling and constraints.
  • FIXED: git_process_output/3 (and derived predicates): properly read all input before waiting if the process handler fails or raises an exception. This avoids a deadlock.
  • MODIFIED: transpose/2 now fails for ragged matrices. Julien Cumin. Example, previously
  • User programs are unlikely to be affected (for the worse) by this change. Still, if you encounter a case where the previous behaviour is more desirable, please let me know. Note that transpose/2 also fails for such cases in SICStus Prolog, where it ships in library(lists).
  • FIXED: Memory leak for localised predicates that have no clauses as the thread dies.
  • FIXED: in_temporary_module/3: handling of possible collisions.
  • FIXED: Avoid stream-pair ambiguity for wait_for_input/3 and set_end_of_stream/1.
  • MODIFIED: Operations on stream pairs (see stream_pair/3) that are ambiguous (e.g., get the position of the stream) used to select the input stream. It now prints a message (and still selects the input), while an error is raised if the flag error_ambiguous_stream_pair is set to true. Eventually that will become default, but I fear too much code will break.
  • Package clib:
  • DOC: Pull request#9, Eyal Drechter.
  • FIXED: read_stream_to_codes/3: avoid ambiguous stream reference
  • FIXED: read_line_to_codes/3: avoid ambiguous stream reference
  • Package http:
  • FIXED: Ambiguous usage of stream pair
  • FIXED: Make JSON read/write work on stream pairs. Position information for syntax error and layout could select the wrong stream from the pair. Analysed by Abramo Bagnara.
  • Package pcre:
  • ENHANCED: Raise exception for unknown flags.
  • DOC: Fixed for changed flags
  • MODIFIED: Use de-facto standard for regex flags: /x for Perl extended and /s for dotall mode.
  • Package pengines:
  • TEST: Include sandbox
  • MODIFIED: Move pengine sandbox declarations to a new library(pengines_sandbox) to disallow using a pengine server as a proxy by default.
  • FIXED: Use more reliable beforeunload to kill all running Pengines.
  • Package semweb:
  • FIXED: Avoid ambiguous stream pair.
  • Package sgml:
  • FIXED: Issue#4: use on_error hook from main parser when parsing XML DTD statements. This makes such errors available to Prolog and suppresses them if asked by the user.
  • FIXED: Issue#19: sgml_parse/2: propagate I/O errors.
  • FIXED: Avoid ambiguous stream reference
  • Package xpce:
  • FIXED: regex->for_all: use end of match if match is not at start OR not empty instead of `AND not empty'.

New in SWI-Prolog 7.5.5 Development (Apr 28, 2017)

  • FIXED: It was possible that a new atom did not become part of the atom table. This has two consequences: (1) the guarantee that atom-identity can be tested using handle-identity is not true, leading to possible incorrect results and (2) trying to reclaim this atom in AGC traps an assertion error (assert(*ap)).
  • DEBUG: Extended checkAtoms()
  • ADDED: library(sandbox): term_variables/3 is safe. Samer Abdallah.
  • MODIFIED: This patch changes the IOSTREAM structure of SWI-Prolog. This is needed because, since stream handles are subject to atom-GC, we need atomic access to the reference count of streams, but this was stored in a bit-field. This patch fixed IOSTREAM reference issues and adds debug infrastructure for them. Foreign libraries that use SWI-Stream.h are still source code compatible, but NOT BINARY, i.e., all such foreign libraries must be RECOMPILED.
  • ENHANCED: Sunlock(): cleaner unalloc condition.
  • FIXED: Sset_filter(): clear filter downstream and added additional assert() statements.
  • MAINTAIN: Additional assert() to check stream references.
  • CLEANUP: stream locking of get_code/1,2 and get_char/1,2.
  • FIXED: qsave_program/1,2: save current prompt.
  • FIXED: consistent prompt initialization
  • Package http:
  • FIXED: Clean websocket.o
  • FIXED: locking and error recovery in websocket stream
  • FIXED: locking issues and error recovery for opening chunked streams.
  • MODIFIED: json_read/2 and friends no raise an exception if the input ends before there is any data instead of returning @(end_of_file).
  • Package semweb:
  • IMPROVED: keep .gz suffix on source property for graphs loaded from file (similar to graphs loaded from http)
  • Package sgml:
  • FIXED: Handling of #empty and #default.
  • Package ssl:
  • CLEANUP: make ssl_close() more readable
  • CLEANUP: ssl_negotiate/5: more readable and complete cleanup in error conditions.
  • FIXED: ssl_close(): return -1 on errors of underlying functions.
  • Package xpce:
  • PORT: Avoid conflict on Windows.
  • COMPAT: Copy modified SWI-Stream.h from Prolog development tree. Note that this version only works with the matching swipl-devel and later.

New in SWI-Prolog 7.5.4 Development (Apr 24, 2017)

  • DOC: absolute_file_name/2: small correction
  • PORT: Install pcre components for Windows
  • PORT: Add download and install for libpcre to README.mingw
  • DOC: LaTeX syntax error
  • ADDED: pcre submodule
  • ADDED: package pcre
  • ADDED: PL_put_term_from_chars(), adding support for different multibyte encodings and length/string combination.
  • ADDED: PL_new_atom_mbchars()
  • FIXED: Possible memory leak creating an atom from a wide character pointer
  • MODIFIED: Replaced PL_put_string_nmbchars() with more consistent and versatile PL_put_chars()
  • FIXED: memory issue in new PL_put_string_nmbchars()
  • ADDED: PL_put_string_nmbchars()
  • FIXED: format/3: handle error status from low level write operations and avoid memory leaks in some control paths.
  • FIXED: Removed writeln/1 from reduced/[1,3].
  • ADDED: reduced/1,3, complementing distinct/1,2. After discussion with Wouter Beek.
  • Note that the signature allows this usage mode!
  • FIXED: Correct error in partition/5.
  • MODIFIED: (undocumented) PL_get_term_value() to return new types PL_NIL, PL_BLOB, PL_LIST_PAIR and PL_DICT. Fixes problems handling these types using the prolog type in xpce. Birgit Elbl.
  • ENHANCED: Raise a representation_error(continuation) error if we cannot capture the continuation. This shouldn't happen, but a normal Prolog exception makes locating easier and is less drastic.
  • FIXED: restarting a continuation should copy flags from the parent, notably FR_INRESET. Samer Abdallah.
  • FIXED: prolog_load_context(stream, S) and :- encoding(Enc) when compiling from a stream.
  • MODIFIED: set_stream(S, record_position(true)) now resets the position and documents this behaviour.
  • ADDED: stream property write_errors(+How), which can be used to ask a stream (typically user_error) to ignore write errors.
  • Package http:
  • FIXED: Issue#84: ws_receive/3: fixed retry after an websocket ping message.
  • FIXED: Make sure an unlikely exception while computing websocket random is not lost.
  • FIXED: Correct setting name is StartLimitBurst. DefaultStartLimitBurst is only admissible in system.conf.
  • FIXED: Use Restart=on-failure in the systemd demo script to restart if the server is halted with status != 0 which happens e.g., if the service looses stderr.
  • DOC: Correct default timeout for threaded HTTP servers.
  • MODIFIED: If we loose an HTTP worker thread due to a write error to user_error the server is terminated with status 2. This problem may happen if Prolog is launched by service manager that reads the Prolog output from stderr and the monitoring process is restarted. Not doing anything is not an option as we will loose all server threads, eventually starving the server. Ignoring will probably become an alternative, but this needs to implemented elsewhere.
  • Package odbc:
  • FIXED: Issue#5: properly cancel a statement after an error.
  • Package pengines:
  • ADDED: Allow setting source locations using :- '#file'(File,Line).
  • Package semweb:
  • FIXED: rdf11 type conversion hook now check for no string.
  • Package xpce:
  • ENHANCED: Better formalisation of syntax hacks for Prolog. On the short term this avoids 0' to upset syntax handling when the debugger is used. Later versions will improve handling of notably 0'.
  • FIXED: PceEmacs: replace using empty regex match (^, $)
  • FIXED: regex->for_all: ensure we make progress on empty search targets.

New in SWI-Prolog 7.5.3 Development (Apr 3, 2017)

  • FIXED: library(record): module qualification of inlined type checks. Eyal Drechter.
  • FIXED: Signal handling while shutdown is in progress.
  • FIXED: Avoid rewriting of '$aborted' exceptions and thus prevent an abort from happening.
  • DOC: wrong link.
  • FIXED: Possible under-allocation of global stack when generating answers from a trie. Added test cases.
  • FIXED: Possible too low number of reserved variables for getting values from a trie. Eyal Drechter.
  • ADDED: Support case conversion while importing CSV files.
  • ADDED: API to read CSV files row-by-row in forwards mode. Allows creating a lazy list version.
  • CLEANUP: library(csv): make read_row/3 reusable
  • FIXED: reverted old long -> intptr_t replacement in message.
  • ENHANCED: Allow reproducible builds by using the SOURCE_DATE_EPOCH variable. To allow reproducible builds (same source results in same binary) replace DATE and TIME with system provided values.
  • FIXED: Added human message for duplicate_key(+Key) dict error term.
  • FIXED: atom_string/2: generate proper type errors.
  • FIXED: Codewalk library: do not propagate bindings between the branches of a disjunction (Abramo Bagnara).
  • Package http:
  • FIXED: Create HTTP session gc thread lazily, so we can fork as a daemon.
  • FIXED: json_convert: Use current_type/3 rather than direct clause to allow using protected code. Paulo Moura.
  • FIXED: Call HTTP session begin broadcast after completing the session initialisation such that handlers can call e.g., http_session_assert/1.
  • ADDED: http_set_session_options/1: option gc(When). If set to active, sessions are actively collected soon after their timeout.
  • ENHANCED: Avoid using a mutex on session last usage admin and round last use time to avoid frequent updates.
  • FIXED: http_close_session/1: avoid error if not called from the session itself.
  • Package pengines:
  • FIXED: More robust handling of Pengine timeouts. Timeouts could be blocked by the Pengine catching the abort_query exception as well as I/O errors preventing the abort from being send at all.
  • ADDED: Pengine emulation of read_line_to_{codes,string}
  • DOC: Documented pengine_self/1.
  • FIXED: Only include named bindings into the projection.
  • MODIFIED: Pass variable binding term through the pengine itself. As a result, the success event changed from success(Pengine, Answer, Time, More) to success(Pengine, Answer, Projection, Time, More) and the VarNames argument has been removed from write_result/4 and event_to_json/4 (both now accepting 3 arguments). This largely simplifies the design. In addition, it provides Pengines access to the actual variable names inside a query and the possibility to control the projection variables (in the future).
  • Code that defines additional output formats, such as writing CSV files, must be changed. Most typical usage of Pengines should not be affected.
  • ADDED: Make actual variable names of ask(query) available to the pengine using the global variable '$variable_names'. This can be used in goal_expansion/2 hooks and possible for debugging aids.
  • Package semweb:
  • FIXED: We must escape {|}"`^ using percent encoding instead of uXXXX because these characters are not valid in IRIs per RFC3987
  • FIXED: Also need to escape ^ in IRIs.
  • FIXED: Turtle parser: be precise about parsing language tags.
  • FIXED: turtle_write_uri/2: escape ^"`{|} in iris
  • FIXED: turtle_write_uri/2: avoid duplicating character when using u... and map ' ' to %20.
  • Package table:
  • ENHANCED: Allow reproducible builds by using the SOURCE_DATE_EPOCH variable. To allow reproducible builds (same source results in same binary) replace DATE with system provided value.
  • Package xpce:
  • ADDED: PceEmacs: setup_auto_indent to Prolog menu
  • FIXED: Prolog mode variable highlighting (missed handling of new parentheses_term_position/3 term).

New in SWI-Prolog 7.5.2 Development (Mar 10, 2017)

  • FIXED: Goal feedback after DWIM correcting a goal holding $Var references.
  • FIXED: silently skip already installed dependencies. This patch also causes a message that the pack is already installed and at which version if the installed version is the same or newer as the available version.
  • FIXED: Issue#207: _xos_fopen(): wrong overflow check (cannot harm Prolog code).
  • FIXED: Issue#206: additional ; after if () (mostly harmless)
  • FIXED: pack_search/1: provide message if search gives no result. By Nicos Angelopoulos.
  • FIXED: Handle thread-creation exceptions.
  • FIXED: Possible double cleanup of a detached thread through normal destruction and atom-gc of the thread reference. For detached threads we now keep the handle locked until the thread dies.
  • FIXED: Avoid deadlock when terminating Prolog if there are streams blocked by filter streams.
  • ADDED: PL_release_stream_noeror(), needed to fix ws_property/2 in the websocket library.
  • DOC: wait_for_input/3 is det.
  • DOC: is_set/1 is semidet.
  • FIXED: Possibility of dereferencing a NULL pointer
  • ADDED: db_attached/1 to query attached state of persistency.
  • CLEANUP: db_attach/2: update sync if an existing mapping is re-attached and enhanced documentation.
  • TEST: setting protect_static_code during the test suite makes many tests fail. This test adds declaration to fix most issues and moves test that cannot work with this flag to a new test directory unprotected, which is executed first.
  • DOC: attack_packs/0,1,2
  • ADDED: attach_packs/2 to add packs at runtime.
  • FIXED: Avoid warning compiling set_breakpoint/5 in optimized mode.
  • FIXED: library(record) if protect_static_code is enabled. Raised by Paulo Moura.
  • FIXED: dynamic/1: raise a permission_error on an attempt to change a defined static predicate if protect_static_code is enabled.
  • ADDED: current_type/3 to get a supported interface for querying the types for library(error).
  • ADDED: convlist/3, compatible with YAP and SICStus.
  • FIXED: Included file registration if there are multiple levels of include.
  • FIXED: format_time/3: handling of %f
  • Package http
  • DOC: hib_send/2 is semidet instead of det.
  • ADDED: atom_json_term/3: default as(As) defaults to atom and this predicate now supports chars.
  • FIXED: library(http/hub): Deal with write errors on pending websockets and reuse of their identifier.
  • FIXED: ws_property/2 and ws_set/2: do not trigger I/O errors.
  • ENHANCED: http_peer/2 to support Fastly CDN and nginx
  • Package libedit
  • ENHANCED: Detect background writes and refresh the input when reading is continued. Ultimately we could do this automatically after background write silences for a specified time by sending the main thread a SIGWINCH. The downsite is that we do not know when background output is finished. Ideally we should probably remove the current reading status from the terminal, perform the backgound write and restore it. I doubt libedit can do that easily.
  • FIXED: libedit (editline) behaviour on SIGWINCH (window resize). Just calling el_resize() doesn't do the job as it redisplays the prompt. In addition we now emit r and REFRESH. Not very elegant, but it seems to work a lot better. Bug left: duplicates input line if it is wrapped.
  • Package pldoc
  • DOC: cleanup, small fix
  • Package semweb
  • ENHANCED: print file name for stream when wrapped in stream(Stream) term.
  • Package ssl
  • FIXED: AuthnRequestsSigned is an attribute of SPSSODescriptor, not of EntityDescriptor

New in SWI-Prolog 7.5.1 Development (Mar 3, 2017)

  • FIXED: library(prolog_xref): properly handle op/3 terms in the export list of loaded modules. Notably fixes colouring for files loading clpfd which exports its operators before its predicates (which is totally fine).
  • FIXED: clause_info/4: fixed if decompilation qualifies the head.
  • FIXED: Avoid crash in findall/3 if we perform a shift/reset (e.g., tabling) inside the generator.
  • PORT: Support compilation without gmp. Matthias Gondan.
  • ENHANCED: Do not setup command line editing of the environment variable TERM is set to dumb. Fixed ediprolog interaction.
  • TEST: Remove test for deleted rb_clone/4.
  • MODIFIED: Support multiple occurrences of `-g goal` command line options and exit 1 if one fails or 2 if one throws an exception. Suggested by Markus Triska.
  • MODIFIED: library(rbtrees): deleted rb_visit/3, rb_keys/3 and rb_clone/4. The difference list versions use unconventional argument order and are probably not very useful in the context of trees. Also made variable names in documentation consistent and more inline with the rest of the documentation. Should have been two commits, but that is now too late :(
  • ADDED: rb_fold/4
  • MODIFIED: removed rb_lookupall/3 and fixed rb_in/3 These changes are aimed at clarifying the status of variables in keys and duplicate keys. After discussions on the mailing list, we established that is is ok for keys to contain variables, in which case, key matching is based on (==)/2 equivalence of terms (and not on unifiability, subsumption or structural equality).
  • It also seems to be the case that a tree with more than one entry for a given key is an invalid tree (and is rejected by is_rbtree/1).
  • Taking these together, we can conclude that the old rb_lookupall/3 was redundant, since there should only ever be one value for a given key whether or not that key contains variables. Instead, rb_lookup/3 should be used. I've taken the possibly drastic step of removing rb_lookupall/3 completely, but another option would be to leave it in but deprecated and with dire warnings.
  • Also, the old rb_in/3 was diverting to lookup/3 for nonvariable keys. This was giving incorrect behaviour for partially instantiated keys, since the tree may contain several keys that unify with the given term. My initial fix was to replace the nonvar(Key) with a +ground(Test). However, further consideration has lead me to remove that clause of rb_in/3 entirely. The reasoning behind this is:
  • if you want fast lookup, use rb_lookup/3;
  • making rb_in/3 check the key argument with ground/1 forces it to examine the whole term and removing that clause makes rb_in/3 cleaner;
  • the rest of the rbtrees interface is relies on (==)/2 equality between keys, where as the nondeterministic mode of rb_in/3 relies on unification of keys. This is fine, but mixing both meanings in one predicate depending on the instantiation state of the key muddies the semantics, relies on extra-logical which lead (as we have seen) to a bug, and generally feels not quite right.
  • In further support of this change, this is exactly what assoc:gen_assoc/3 does, leaving get_assoc/3 the job of doing O(log N) lookups. Also, assoc:ord_list_to_assoc also prevents the creation of duplicate keys.
  • INSTALL: Avoid failing if the documentation is missing.
  • PORT: MinGW issue wrt. ETIMEDOUT. Matthias Gondan.
  • FIXED: pi_to_head/2: protect against an infinite loop.
  • FIXED: Make '$find_predicate'/2 fail if the unknown flag is warning. Douglas Miles.
  • ENHANCED: (#=)/2 now automatically uses powm/3 in many relevant cases. It is the job of the Prolog environment, not of application programmers, to use fast low-level predicates in cases of practical relevance. Ideally, programmers only need to use (#=)/2 to express equality over integers, without having to care about ordering, instantiation, special cases etc.
  • For example, consider commit b380cad24cbe5102a549bfb8f7406e34a2b99e1a in the SSL package, where Pow #= Signature^Exponent mod Modulus is used to verify a certificate's signature with the CLP(FD) constraint (#=)/2.
  • If the arguments are sufficiently instantiated, this constraint is now automatically compiled to Pow is powm(Signature,Exponent,Modulus), making the query run ca. 30 000 times faster. This also works if we write the constraint as Signature^Exponent mod Modulus #= Pow, which may be more natural to Prolog programmers with a strong mathematical background.
  • Integer constraints of the form A^B mod M also occur in DH key exchange, which is used to ensure forward secrecy in (HTTPS) web applications.
  • DOC: powm/3: Instead of (**)/2, use (^)/2 for integer exponentiation.
  • PORT: Avoid trying to compile dlopen or emulations thereof if EMULATE_DLOPEN is active. Matthias Gondan.
  • FIXED: Issue#197: too long options in a saved state were ignored.
  • FIXED: Do not overwrite stream error if a user handler already set it.
  • FIXED: Issue#195: format_time/3 handling of %f. Eyal Drechter.
  • DOC: License text
  • DOC: Fixed two BibTeX errors
  • DOC: Fixed non-terminated ifnum
  • PPA: Avoid duplicating version tag
  • DOC: LaTeX formatting
  • BUILD: Fix windows clean version check
  • FIXED: meta-calling call/N. Samer Abdallah.
  • Package archive:
  • DOC: Document formats that are supported by archive_create/3.
  • Package clib:
  • FIXED: directory_file_path/3: mode (+,-,+) if the directory = '.'
  • Package http:
  • FIXED: Make http:sni_options/2 work again, by importing library(ssl). It is unclear to me how this worked at all previously (it did!), and why it broke. It is necessary to import library(ssl) due to the use of ssl_context/3 when using http:sni_options/2.
  • Package pengines:
  • FIXED: Avoid illegal multibyte warning for Torbjörn
  • Package semweb:
  • ENHANCED: rdf_save_turtle/3: write file name when writing to a stream
  • ENHANCED: turtle_write_pn_local/2 to minimise use of
  • FIXED: Rewrite of local name handling broke prefix suggestion
  • FIXED: > and inside an IRI must be escaped using uXXXX.
  • MODIFIED: Exploit Turtle extended local name conventions to write better Turtle.
  • MODIFIED: turtle_pn_local/1 to deal with the current Turtle syntax restrictions for local names. This patch also adds turtle_write_pn_local/2 and iri_turtle_prefix/2
  • ADDED: rdf_graph_prefixes/3: option get_prefix(:Pred) to better support Turtle.
  • ADDED: rdf_global_id/2 to safe predicates.
  • FIXED: Typo in declaration (harmless)
  • FIXED: Possible assertion error on a negative amount of garbage triples. Wouter Beek.
  • Package ssl:
  • ADDED: hmac/1 option for all hash predicates of library(crypto). A hash-based message authentication code (HMAC) can be used to simultaneously verify the integrity and authenticity of data.
  • The new hmac(+Key) option is now available for all hash predicates of library(crypto), enabling HMAC computation with a given key.
  • This option is a significant generalization of hmac_sha/4 from library(sha): Starting with OpenSSL 1.1.0, hash-based MACs are now available for all provided digest algorithms with library(crypto).
  • library(xmldsig) is a use case that needs this functionality.
  • Package xpce:
  • FIXED: Put XPCE locking around `as file' API that allows Prolog to read/write XPCE editors, etc. This fixes at least one reason why the system often crashes if a spy-point set using tspy/1 is trapped on a thread.
  • FIXED: Detection of indentation and tab/spaces for the current file.
  • Package zlib:
  • ENHANCED: gzopen/4: set file_name property of stream
  • ENHANCED: Properly propagate zlib read errors to the stream.

New in SWI-Prolog 7.5.00 Development (Jan 22, 2017)

  • CLEANUP: allow gcc to prove variables are bound at -O3
  • BUILD: Reorganise C and LD flags a little.
  • REMOVED: library(mime) from Windows installer
  • FIXED: Make persistent history work if :- prolog_history(enable)is called from ~/.swiplrc.
  • ADDED: Support version tag in `swipl --version` and through `swipl --dump-runtime-variables`
  • RELEASE: Updated MacOS readme files.
  • FIXED: No not complain if there is no history to write.
  • VERSION: deal with version tags for Windows installer
  • ADDED: Support tagged versions (e.g7.4.0-rc1)
  • VERSION: Introduce a version tag
  • DOC: improve description of some Prolog flags
  • ADDED: PL_current_query() to get the id of the currently open query.
  • ADDED: .clang-format and scripts/indent.sh, providing SWI-Prolog style compliant reformatting.
  • ENHANCED: library(prolog_stack): combine stacks.
  • FIXED: Enabling of !-based historyBoris Vassilev.

New in SWI-Prolog 7.3.35 Development (Jan 10, 2017)

  • FIXED: License text and installation.
  • FIXED: detecting of reference underflow and illegal atoms in PL_unregister_atom()
  • DOC: Remove traces of readline from core documentation.
  • PACKAGE CLIB:
  • DOC: Replaced url with href. Link to SSL package for secure hashes.
  • PACKAGE LIBEDIT:
  • FIXED: EL_BIND call not terminated
  • PORT: Force using Macports/homebrew version of libedit when available
  • PORT: Deal with platforms on which libedit is not compiled with wide character support. One of them is Ubuntu trusty (14.04).
  • PACKAGE SGML:
  • FIXED: Possible size overflow in SGML I/O buffers
  • PACKAGE SSL:
  • CLEANUP: Make all local functions static.
  • PORT: Properly split shared objects
  • FIXED: PL_unify_term() use PL_INT for type int.
  • ADDED: library(crypto): BLAKE digest algorithms, blake2s256 and blake2b512. These algorithms are available when using OpenSSL 1.1.0 or greater.
  • Any digest algorithms that OpenSSL implements in future versions can be made available easily through the interface of library(crypto).
  • TEST: Failure to remove tests
  • DOC: Explain the relation of library(crypto) to other hash libraries. Note that libcrypto.so is loaded also if only library(ssl) is used!
  • Therefore, if you are writing a web application with HTTPS or even only access a single HTTPS URL, using library(crypto) does not load any additional resources, in contrast to using the other hash libraries.
  • Package swipl-win
  • FIXED: Avoid trying to load a commandline editor into the console window.

New in SWI-Prolog 7.3.34 Development (Jan 6, 2017)

  • PORT: Windows compilation
  • ENHANCED: git_describe/2 now uses `git diff --stat`, reducing output and avoiding issues with character sets. Suggested by Johan Romme.
  • FIXED: tty_size/2 for interactor/0 windows.
  • MODIFIED: xterm_open/4 is changed to xterm_open/5. Last argument provides additional commandline options to start the xterm process. Now used by interactor/0 in Unix.
  • FIXED: peek_string/3: missing releaseStream() call if file is short.
  • ADDED: packages/libedit to the default config
  • ADDED: packages/libedit
  • ENHANCED: interactor/0: enable line editing for xterm consoles if library(editline) is used.
  • FIXED: Make PL_prompt_string() work for other threads.
  • ENHANCED: Avoid retrying the setup after toplevel errors.
  • MODIFIED: Generalised commandline history interface. Prefer new editline interface.
  • MODIFIED: '$atom_completions'/2: only consider atoms with references.
  • FIXED: '$atom_completions'/2: possible stack smashing.
  • FIXED: flag passing in C-based Prolog flag manipulation. Added FF_FORCE to set read-only flags from C.

New in SWI-Prolog 7.3.33 Development (Dec 21, 2016)

  • DOC: Clarify file_search_path/2
  • FIXED: Pass timeout options through a set of filtered streams. This make timeout handling with HTTPS work
  • FIXED: library(prolog_colour): neck classification for directives.
  • ADDED: library(prolog_colour): head_term and goal_term classifications for the entire head and goal.
  • ADDED: Call colouring for terms in parentheses.
  • ENHANCED: As PL_unify_text() can now handle text referencing the stacks we no longer have to copy the text. Note that we must first unify the text as preceeding integer unification may cause a stack shift/GC.
  • ENHANCED: Allow unification from `on stack' text fragments. Now at least avoids copying the large string in sub_string/5. Could be further improved to also avoid a needless copy of the small string.
  • FIXED: term_size/2 counted indirects wrong (more or less random).
  • FIXED: Colour location of full stop (still guessing though)
  • UPDATED: accommodate new parentheses_term_position/3 term.
  • MODIFIED: read_term/2 using subterm_positions(-Pos) option now wraps terms in parentheses into a position term parentheses_term_position(Open, Close, TermPos). This needs modification to almost all code dealing with term positions. We assume most of this code is part of SWI-Prolog's development environment anyway. On the long term this should make indicated positions and improve refactoring support.
  • DOC: fixed subterm_positions description of dict layout.
  • MODIFIED: pack_install/1: now needs a file:// url to denote the directory to avoid ambiguity. Paulo Moura.
  • ADDED: known_licenses/0
  • TEST: Make all tests pass when libgmp is disabled.
  • MODIFIED: must_be/2 raises different errors on some cases in the new implementation. This patch adjusts the test suite.
  • CONFIG: added --without-gpl and --without-lgpl
  • ADDED: '$term_size'/3 declared safe, so it can be used in SWISH.
  • DOC: Ungrammatical sentence "Default [can] refer to..."
  • ENHANCED: Move must_be(chars|codes, Term) to use C based backup. Speeds up these type test and deals with limitations of the underlying implementation (e.g., the max Unicode code on Windows is 2^16-1). Also added types char and code for convenience and making the error generation more uniform.
  • LICENSE: Move part of the library to BSD-2
  • LICENSE: Re-licensed most of the Prolog boot files.
  • LICENSE: Re-licensed the C core of the system and most of the test suite to BSD-2.
  • ENHANCED: Issue#171: try another directory if the first fails.
  • DOC: Clarified some of the repercusions of using --traditional The programmer is most likely to look for these incompatibility issues in:
  • The section on command line options, where the `--traditional` flag is described.
  • The section on current_prolog_flag/2, where flag traditional indicates that taditional mode is turned on.
  • DOC: Added paragraph on best practice for modules. About importing modules without using any of their predicates.
  • DOC: Typo in manual `IF/Proloog'.
  • DOC: Editor Prolog flag documentation pointed to the wrong section in the manual (#124).
  • FIXED: compilers may optimize away code that relies on signed integer overflows leading to incorrect arithmetic
  • ADDED: Allow the value of a setting to be unbound. Wouter Beek.
  • FIXED: The recorded database (also findall) restores really large GMP numbers wrong, causing a crash in a subsequent GC.
  • FIXED: Ensure foreign frame is always cleaned up in vwarning()
  • FIXED: possible crash when failing to print an error message via print_message/2
  • FIXED: possible crash during GC when marking stacks
  • Package clpqr:
  • LICENSE: Declare clp(QR) to use the old licenses
  • Package http:
  • FIXED: Properly handle completely broken requests (avoid failing in sending reply).
  • MODIFIED: open_client_hook/5 has an extra argument, passing the option list. This is needed to get timeout to the client hook.
  • Package semweb:
  • FIXED: Avoid double free of literal. After test prog by Jacco van Ossenbruggen.
  • FIXED: Do not consider an ontology redefined if it has multiple types.
  • FIXED: Allow for xsd:string typed titles.
  • FIXED: make rdf_persistency/2 succeed if database is not yet opened.
  • Package sgml:
  • SECURITY: library(sgml): buffer overrun on too many attributes to an element. Patch removes the old limit (256). Eyal Drechter.
  • Package ssl:
  • PORT: Do not share FUNCTOR_* constants.
  • FIXED: Compilation with OpenSSL 1.1.0. Broken in e66033237e253dcf104fb7f31d127cebc5cf1b1a.
  • CLEANUP: Move all threading code to crypto4pl.c.
  • MODIFIED: md5_hash/3 is removed from the (yet unreleased) library(crypto). This will become available with a more general interface in the future.
  • FIXED: initialise libcrypto threading exactly once.
  • CLEANUP: Use MKATOM precompiler macro to shorten the definitions.
  • ENHANCED: Share thread safety code in cryptolib.c. In earlier OpenSSL versions, library(crypto) needs these callbacks to be thread safe.
  • ENHANCED: Completely disentangle library(crypto) from libssl.so This allows you to use the cryptographic predicates without loading the full SSL library.
  • ADDED: Pass and apply timeout option to set a timeout before SSL negotiation
  • ADDED: library(crypto): OpenSSL-based md5_hash/3. Predicates that are related to cryptography and authentication can be systematically moved and added to this new library.
  • DOC: Integrate library(crypto) in the manual.
  • MODIFIED: All encryption, decryption, and RSA predicates have been moved from library(ssl) to library(crypto). If you are using any of these predicates in your application, add the following directive to source files that use these predicates
  • ADDED: library(crypto): Predicates for cryptography and authentication. These predicates are self-contained in that they do not need an SSL context. This uses OpenSSL functionality that was previously provided by library(ssl).
  • Separating these components makes it easier to switch implementations and supporting for example LibreSSL for either of these parts.
  • ADDED: New options min_protocol_version/1 and max_protocol_version/1. In OpenSSL 1.1.0 and later, these options should be used instead of disable_ssl_methods/1, which is deprecated in recent OpenSSL versions.
  • PORT: Use new EVP_CIPHER_CTX_reset(), and compatibility alias where unavailable. EVP_CIPHER_CTX_init() is deprecated as of OpenSSL 1.1.0. This allows compilation when building OpenSSL 1.1.0 with "no-deprecated".
  • PORT: Use OpenSSL_version() where available. This allows compilation when building OpenSSL >= 1.1.0 with "no-deprecated".
  • PORT: Use X509_get0_notBefore() and X509_get0_notAfter() in OpenSSL >= 1.1.0. Compatibility aliases are defined for earlier versions.
  • This allows compilation when building OpenSSL 1.1.0 with the "no-deprecated" option.
  • PORT: Include headers to compile with "no-deprecated" in OpenSSL
  • >= 1.1.0.
  • PORT: SSL_load_error_strings() is deprecated in OpenSSL >= 1.1.0.
  • PORT: ERR_free_string() is deprecated in OpenSSL >= 1.1.0.
  • CLEANUP: ssl_write(): Remove a branch that cannot arise. Importantly, encountering EOF when writing must raise an exception. This was wrong since 2011 (3083b0e4ba1bc0cff87255b7f0994219b25b85c1), and partially corrected in 83e55ac5c017e928d667316c334e70df6b310726. It is fully correct since 354dd3cdb7442c992fd2aa02ed743ae82f71e6a7.
  • Exceptions when writing to a closed stream should look like this:
  • ERROR: format/3: I/O error in write on stream (0x1d57ad0)
  • (SSL: unexpected end-of-file)
  • Due to buffering, it may take several writes to reach this error.
  • FIXED: Make client close the underlying plain streams in unit tests. This omission was detected by the preceding improvement for handling fatal alerts. In this situation, the server waits for EOF or TLS shutdown, and because the client has previously received a timeout, it does not send a shutdown. Therefore, all depends on properly closing the underlying socket in this case.
  • ENHANCED: If a fatal error has occurred, no more I/O is performed. This avoids situations that could, in extreme cases, lead to a crash of OpenSSL. Many thanks to Matt Caswell for his guidance!
  • ENHANCED: Use OpenSSL default curves (ecdh_curve/1) in OpenSSL >= 1.1.0. Earlier OpenSSL versions do not set a curve by default. We use prime256v1 in such cases, as before, but no longer override the new library defaults with this curve.
  • This commit makes stronger curves automatically available when using newer OpenSSL versions, unless users have explicitly asked for a specific curve. A major attraction of OpenSSL 1.1.0 is X25519, which is the new default curve in that version for ECDH.
  • To disable ECDH entirely, use the cipher_list/1 option (also as before).
  • In the future, ecdh_curve/1 will be superseded by a new option that binds SSL_CTX_set1_groups. However, this currently affects both ECDH and ECDSA, and we will adopt the eventual solution of OpenSSL.
  • CLEANUP: Simplify ssl_read() and ssl_write().
  • PORT: Compatibility macro X509_STORE_CTX_get0_cert for OpenSSL < 1.1.0.
  • FIXED: Add sni_hook/1 to options declaration of ssl_context/3.
  • FIXED: Race condition during BIO method creation. Many thanks to Matt Caswell! Test case that shows the race condition:
  • FIXED: Timeouts in OpenSSL versions different from 1.1.0c.
  • FIXED: EOF detection for SSL_read(). Wouter Beek. Critically, BIO_eof() can return TRUE even if there are still bytes to be read! The new approach should work correctly with all versions of OpenSSL.
  • PORT: Use Macport/Homebrew OpenSSL libraries and headers.
  • ADDED: New option close_notify(+Boolean), making the server send close_notify when closing the connection. In addition, enabling this option raises an exception when EOF is encountered without either side having initiated a TLS shutdown. This mitigates truncation attacks, in which an adversary may cut the connection or inject TCP FIN packets to simulate EOF.
  • This attack only applies to protocols that are not self-terminating and is therefore extremely rare in practice (well-designed protocols are self-terminating). However, the client/server examples are of this type, and therefore this option is now enabled in the examples.
  • FIXED: Load library(socket) in client and server examples. This makes the examples work also if only a subset of packages is installed.
  • Package xpce:
  • UPDATED: Compensate for parentheses_term_position/3 terms.

New in SWI-Prolog 7.3.32 Development (Dec 6, 2016)

  • PORT: Fixed compilation on Windows
  • ADDED: Enable printing a backtrace by default on uncaught exceptions.
  • ENHANCED: library(prolog_stack). Prepare to include by default.
  • ADDED: term_size/2 as discussed on the mailinglist.
  • SECURITY: possible buffer overflow in '$def_modules'/2
  • FIXED: Possible exception in colouring.
  • ENHANCED: error handling for cross-referencer
  • ADDED: sandbox declarations for library(lazy_lists).
  • FIXED: lazy_list_materialize/1 and lazy_list_length/2.
  • ADDED: close list if iterator fails.
  • ADDED: library(lazy_lists).
  • FIXED: library(prolog_xref): handle xpce new arguments.
  • ADDED: library(prolog_source): hook prolog:xref_close_source/2. Also documented the open/close hooks.
  • FIXED: tmp_file_stream/3: if encoding is octet, switch to binary.
  • FIXED: character code errors and tests. Paulo Moura.
  • FIXED: Issue#178: be more consistent on Unicode character overflow. Jan Burse.
  • ADDED: library(sandbox): declare term_string/3 safe. Issue#179
  • ENHANCED: library(pce_colour): avoid loading xpce, but do support it if it is loaded anyway.
  • FIXED: xref_source/2: only continue reading on syntax errors; stop on e.g., I/O and other errors.
  • FIXED: Remove effective depth-limit while executing a signal callback. This causes thread_signal/2, call_with_time_limit/2 and other signal based thread interaction to fail.
  • Package clib:
  • SECURITY: possible overflow of in_addr struct
  • Package http:
  • ADDED: library(html_write): html_root_attribute//2. Wouter Beek.
  • CLEANUP: Remove non-functional JavaScript parser, only leaving the tokenizer.
  • Package pengines:
  • ENHANCED: /pengine/abort interrupts ongoing output for a concurrently running request.
  • ENHANCED: /pengine/abort empties the waiting queue before sending the abort message.
  • ENHANCED: Pengine.abort() cancels a possibly running request using .abort() on the jqXHR object.
  • Package ssl:
  • PORT: EOF when writing is now correctly handled also in OpenSSL 1.1.0c. This has become necessary because in OpenSSL 1.1.0c, SSL_write() returns -1 on EOF whereas it previously returned 0.
  • In later OpenSSL versions, the previous behaviour is restored, see:
  • https://github.com/openssl/openssl/issues/1903
  • This commit makes the code work in 1.1.0c as well as earlier and later versions.
  • Example (client.pl, server.pl closed connection) with 1.1.0c, previously:
  • Client accepts the server certificate
  • ERROR: Prolog initialisation failed:
  • ERROR: read_util:read_line_to_codes/2: I/O error in read on stream
  • Now:
  • Client accepts the server certificate
  • Foreign predicate system:close/1 did not clear exception:
  • error(io_error(write,(0x828b08)),context(close/1,Broken pipe))
  • PORT: Handle EOF portably, making copy_stream_data/2 etc. work in OpenSSL 1.1.0c. This is necessary due to a change in behaviour of OpenSSL 1.1.0c: When encountering EOF, SSL_read() now returns -1 instead of 0 (as it did previously).
  • Note that this behaviour may change again in future versions, since it is currently subject to debate:
  • However, 1.1.0c is already published and must be accommodated, and further, this change will remain valid even if the return value of SSL_read() changes again, since we now explicitly check for EOF.
  • FIXED: Correct call of server_loop/2 in test cases.
  • PORT: Use compatibility functions to simplify BIO creation.
  • FIXED: Configuration of const qualifier with OpenSSL versions that do not provide X509_CRL_get0_signature (< 1.0.2).
  • FIXED: Detect 'const' qualifier of X509_get0_signature in OpenSSL >= 1.1.0.
  • PORT: Issue#51: reenable host checking on OpenSSL 1.1.0. Hacky.
  • We should dealy libressl issues until the openssl 1.0/1.1 issues are resolved.
  • PORT: Autoconf for changed 509_get0_signature() signature.
  • PORT: Test presence of X509_CRL_get0_signature and X509_get0_signature. Necessary for compilation with OpenSSL 1.0.2.
  • PORT: Use compatibility macros to reduce the difference between OpenSSL versions.
  • ENHANCED: Register SSL context before configuring various settings. This makes the context amenable to garbage collection also if errors arise during initialization (such as certificate/key mismatch etc.), fixing several memory leaks.
  • FIXED: Memory leak when private key does not match certificate.
  • PORT: OPENSSL_zalloc is a macro
  • PORT: Configure script now also recognizes OpenSSL >= 1.1.0.
  • FIXED: CRYPTO_THREADID type relies on openssl/ssl.h header file
  • PORT: LibreSSL X509_VERIFY_PARAM does not have an ID member
  • PORT: const is also ok for the old version
  • PORT: test using autoconf
  • CLEANUP: Simplify conditional compilation with old OpenSSL versions.
  • PORT: library(ssl) now also compiles with OpenSSL version 1.1.0, which is needed for ChaCha20-Poly1305 and other recent ciphers. Status:
  • *) library(ssl) compiles and works for most use cases with OpenSSL 1.1.0. *) 47 tests pass. *) 2 tests fail. In both cases, certificate verification fails as expected, but for a different reason than expected.
  • Conditional compilation is used to retain backwards compatibility. Therefore, this is ready for merging any time, to give users a chance to compile with OpenSSL 1.1.0, run most applications, and help with testing.
  • ENHANCED: Consistent error term on private key decryption failure. Example, previously:
  • ENHANCED: Consistent error when a certificate, but no key is specified. Previously:
  • CLEANUP: Use BIO_new_mem_buf() to simplify the code. Also, free the private key BIO sooner.
  • TEST: Add tests for missing certificate and key options, with and without SNI. Here is a test case that currently leads to different error messages on repeated invocations:
  • Ideally, the error would consistently state 'no private key assigned'!
  • Note also that the ssllib.c leaks memory in such cases!
  • FIXED: Reject (again) cases where a private key file and SNI hook are specified, but the certificate is omitted. db2131e49d7ee28c1bcaaf0eb3b22d3fd87aadb6 inadvertently relaxed the check to cases where the private key was specified via key/1. However, we want to raise this error also when key_file/1 is used instead.

New in SWI-Prolog 7.3.29 Development (Nov 1, 2016)

  • DOC: library(ctype) --> library(ctypes). Gniourf.
  • FIXED: Consistent write for wide atoms using only symbol characters. Jan Burse.
  • ADDED: binary (de-)serialization for terms. See fast_read/2, fast_write/2.
  • DOC: Clarify *->. Nicos Angelopoulos.
  • DOC: Avoid -> to appear as send in the output
  • DOC: wrong type and removed duplicate
  • ENHANCED: modify internal representation of dicts so that right-recursive VM instructions are not used for field values. This enables dicts loaded from .qlf files or a saved state to be resorted safely.
  • FIXED: possible crash during clause GC due to referencing uninitialized memory while traversing the local stack
  • FIXED: renaming predicates with source info (breaks Logtalk). Paulo Moura.
  • FIXED: library(prolog_xref): avoid registering illegal operarators and flags.
  • ADDED: Prolog flag protect_static_code to disable listing static code.
  • ADDED: check_installation/1 to return a list of issues that allows for checking the installation programmatically.
  • Package archive:
  • ADDED: Restore executable bit when extracting archives.
  • ADDED: extract permission bits for archives
  • Package clib:
  • DOC: Correct PlDoc syntax for tcp_accept/3. [Oct 21 2016]
  • DOC: Correct PlDoc syntax for tcp_accept/3.
  • Package http:
  • DOC: Correct documentation for serving CSS and additional resource files.
  • ENHANCED: Close stream if http_protocol_hook/5 throws an exception.
  • DOC: Correct documentation of default workers with library(http/thread_httpd).
  • Package ssl:
  • CLEANUP: Exceptions are now handled centrally in http_open/3.
  • FIXED: HTTPS: Avoid leaking file descriptor after failed TLS negotation. Two issues must be distinguished here:
  • 1) ssl_exit/1 was a no-op here, because ssl_context/3 is used instead of the (now deprecated) ssl_init/3 to initialize the connection
  • 2) if the TLS negotiation failed, then the exception was thrown but the plain stream was not closed.
  • Without this patch, running the query leaks file descriptors.
  • CLEANUP: Remove obsolete ssl_exit/1 calls in test cases.
  • ENHANCED: Use new SSL API in client test case.
  • ENHANCED: Use new SSL API in server test case.

New in SWI-Prolog 7.3.28 Development (Oct 18, 2016)

  • FIXED: We need to restore LD->mark_bar at some more places to avoid inconsistent choice points.
  • FIXED: We must properly initialise for the alternative clause before calling the debugger as a wrong PC value will cause a GC call from the debugger to crash.
  • FIXED: We need to clear the local variables after an exception as the data may be pointing at reclaimed global space.
  • ADDED: classification support for `vararg' predicates call/N and maplist/N when library(apply_macros) is loaded.
  • ADDED: library(prolog_xref): support call/N and maplist/N
  • FIXED: library(prolog_colour): qualified and lists of operators.
  • FIXED: library(prolog_colour): support a[x] syntax.
  • ADDED: library(persistency): Allow module qualification of persistent predicates.
  • ADDED: sandbox: declare name/2 as safe.
  • ENHANCED: Reuse of toplevel variables displays the reused binding.
  • ADDED: Prolog flag toplevel_mode, one of backtracking or recursive. After suggestion by Falco Nogatz.
  • FIXED: Never consider _ a singleton.
  • Package HTTP:
  • FIXED: library(http/http_unix_daemon): broadcast maintenance event scheduling.
  • Package nlp:
  • FIXED: snowball/3: possible crash for unicode atoms
  • FIXED: snowball/3: assertion error of too many languages are tried. Jacco van Ossenbruggen.
  • Package odbc:
  • FIXED: odbc_data_sources(): gcc style warning that is right ... odbc.c:2875:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  • Package pengines:
  • FIXED: to_atomic for error handling.
  • FIXED: Make writeln/1 hook compatible with write/1, nl/0.
  • Package semweb:
  • ADDED: rdf_prefix/2, defining a module local prefix. This provides modularity as well as support for prefixes in SWISH programs without disturbing other users.
  • Package sgml:
  • ADDED: library(c14n2): writing canonical XML documents.
  • MODIFIED: xsd_time_string/3: raise exceptions in modes +,+,- and -,+,+ if the given type does not match the string or Prolog term.
  • Package ssl:
  • DOC: ssl_negotiate/5 stream closing policy.
  • ADDED: rsa_verify and add padding options to the EVP predicates
  • ENHANCED: SSL: Enable DH key exchange. Many thanks to Charlie Hothersall-Thomas for implementation advice.

New in SWI-Prolog 7.3.27 Development (Sep 17, 2016)

  • FIXED: sort/2 on a cyclic list with one element. Boris Vassilev.
  • ADDED: flag file_name_case_handling
  • FIXED: Variable reference in is_of_type/2.
  • ISO: Use current DCG terminology.
  • ENHANCED: library(prolog_colour): colour plain variables in a source file.
  • FIXED: clear P_DIRTYREG flag on freshly created thread-local definition to force dirty registration
  • FIXED: do not save dynamic predicate attributes in a saved state if a predicate is marked as thread_local.
  • FIXED: missing cuts after has_type/2 Since has_type/2 is semidet but also multifile, the code is not safe at the moment in a couple of places, i.e. where has_type is called without a cut following. (A cut is present in the other two places where has_type is called.) I have fixed this by adding the cuts.
  • DOC: Move "Global variables" from "Attributed Variables and Coroutining" to "Built-in Predicates".
  • DOC: Mention important additional application of attributed variables.
  • FIXED: URL to "validation suite for conformance with part 1 of the standard" in the Bibliography
  • DOC: Add "To be done" to attr_unify_hook/2 with explanation and reference.
  • DOC: More information about (=)/2, aligning the description with that of dif/2.
  • FIXED: Possible instantiation error in DWIM. Nicos Angelopoulos.
  • DOC: call_residue_vars/2: Extend explanation.
  • DOC: Introduction to coroutining. More sensible examples.
  • FIXED: DOC: Correct number of arguments for project_attributes/2.
  • DOC: More information about attribute_goals//1 and copy_term/3. After questions by Eyal Dechter.
  • FIXED: Make read_clause/2 respect the module settings for the first clause.
  • FIXED: import modules by pattern
  • INSTALL: Add library(hash_stream) to the installer.
  • FIXED: Apply syntax flags to the right module.
  • ADDED: library(sandbox): define syntax changing Prolog flags as safe. As they are per-module, this should not affect loaded libraries.
  • ADDED: xref_prolog_flag/4: keep track of flags in xref. Generalise processing of syntax-affecting Prolog flags.
  • ADDED: var_prefix flag that demands variables to start with an underscore.
  • FIXED: Include engines in boot distribution.
  • MODIFIED: Variables are now printed as _ rather than _L or _G. This avoids interference with singleton/multiton detection. Global stack variables are even, while local stack vars are odd. Using numbers is the convention used by most Prolog systems.
  • PACKAGE CLIB:
  • ADDED: library(hash_stream), computing the hash of a stream as the data flows through.
  • PACKAGE HTTP:
  • MODIFIED: http_log/2: use operators from module system to ensure logfiles are readable.
  • ADDED: autoload HTTPS plugin when opening secure WebSocket (wss scheme)
  • FIXED: Determinism of http_open_websocket/3 with given subprotocols. Test case
  • ADDED: http_switch_protocol/2 use option headers(Headers) instead of header(Headers). Old option is processed for backward compatibility. Added documentation.
  • DOC: http_read_data/3 after comment from Eyal Drechter.
  • PACKAGE PENGIES:
  • MODIFIED: copy var_prefix flag from application to the temporary module and make sure the text is read using this flag. This allows for e.g., set_prolog_flag(swish:var_prefix, true) to run a swish instance using this mode.
  • MODIFIED: Run pengines:prepare_module/3 using forall(prepare_module(+Module, +Application, +Options), true) rather then ignore(prepare_module(+Module, +Application, +Options)), allowing for multiple hooks.
  • PACKAGE SGML:
  • BUILD: Syntax error. Paulo Moura.
  • MODIFIED: option keep_prefix(true) creates a term ns('',URL) if the default namespace (xmlns=url).
  • PACKAGE SSL:
  • ADDED: Support opening secure WebSocket (wss).
  • PACKAGE XPCE:
  • ADDED: PceEmacs: deal with Prolog flags

New in SWI-Prolog 7.3.26 Development (Sep 17, 2016)

  • FIXED: A mistake in the documentation of string_lower/2
  • MODIFIED: Respect logical update semantics for retract/1. This was broken due to 5abb27c624862d3381664c1f53daf4f081df04b2.
  • FIXUP: erase/1 should fail if the object is already erased. Documented concurrent retract/1 and erase/1.
  • MODIFIED: Concurrent retract on the same predicate can no longer succeed in multiple threads. Also concurrent erase/1 on the same clause reference will succeed in one thread and raise an existence_error exception in the other(s). Jan Burse.
  • FIXED: thread_create_in_pool/4: share Id to options. Eyal Dechter.
  • ADDED: threads/0: display memory allocated for the stacks
  • ENHANCED: xref_source/1: avoid getting trapped in too many partial evaluation paths.
  • DOC: CLP(B): Link to declarative debugging explanation.
  • DOC: CLP(FD): Link to declarative debugging explanation.
  • FIXED: library(dialect/sicstus/system): get shell/0 from library(shell) since this is no longer a built-in.
  • DOC: CLP(FD): Document floored integer division. Boris Vassilev.
  • DOC: Use href{URL}{Text} instead of url[Text]{URL}.
  • DOC: Removed local copy of url.sty as it is in texlive
  • FIXED: base/2 should also consider the //2 operator that can be prese…
  • FIXED: base/2 should also consider the //2 operator that can be present in alias paths
  • COMPAT: Extended src/compat/YapInterface.h: YAP_MkNewApplTerm(functor_t f, int arity) and YAP_ArgsOfTerm(term_t t)
  • ENHANCED: Pack building: use a thread to relay the output from running shell commands, so output is printed as it is generated instead of printing all output at the end. Only works on Unix-like systems.
  • ENHANCED: Cleanup message context for threads. Provide a flag to suppress printing the thread.
  • FIXED: wait_for_input/3: when using poll(), it sets POLLHUP rather than POLLIN on end-of-input.
  • PACKAGE CLIB:
  • FIXED: Attempting to acccess a freed memory file left a lock (second attempt deadlocks).
  • ADDED: setgroups/1 and getgroups/1. Also synced semantics of set_user_and_groups/1,2 and updated documentation. After comments from Johan Romme and Edison Mera.
  • PACKAGE CPP:
  • ENHANCED: Allow for PlInstantiationError(Var) exception.
  • PACKAGE HTTP:
  • FIXED: CGI streams: deal with possible exceptions from PL_release_stream().
  • FIXED: library(http/http_unix_daemon): --ip=IP option. Markus Triska.
  • ENHANCED: Trim the stacks of the HTTP workers. This can safe a significant amount of memory, while the costs in terms of time is very modest.
  • ADDED: library(http/http_log): http_logrotate/1 and http_schedule_logrotate/2
  • ADDED: library(http/http_unix_daemon): broadcast maintenance events every 5 minutes.
  • FIXED: Setup signal handling even when not forking. This makes SIGHUP based reloads work in modern daemon infrastructures such as upstart and systemd.
  • FIXED: library(http/http_log): Add POST data to logged requests.
  • ENHANCED: Verify port and user options and report in human language on misuse.
  • ENHANCED: Do not exit the process if http_daemon fails in interactive mode.
  • ENHANCED: Report HTTP application/x-prolog syntax against HTTP:DATA pseudo file.
  • DOC: Typo
  • PACKAGE LTX2HTM:
  • FIXED: correctly process backslash+space as in A vs. B.
  • FIXED: correctly process backslash+space as in A vs. B.
  • MODIFIED: Sync url, email and href macro expansion with LaTeX infrastructure for the manuals.
  • PACKAGE PLDOC:
  • ENHANCED: Map [Text](URL) to href{URL}{Text} and do not try to escape URL. In part by Markus Triska.
  • PACKAGE SEMWEB:
  • DOC: Typo
  • FIXED: Issue#44: crash in rdf_warm_indexes/0. Wouter Beek.
  • PACKAGE SGML:
  • ADDED: option keep_prefix/1 to preserve the prefixes in an xmlns document
  • DOC: Explain advantages and disadvantages of using strings for cdata.
  • PACKAGE SSL:
  • ADDED: evp_decrypt/6 and evp_encrypt/6 to perform symmetric cryptography. This patch also fixes and generalises encoding/padding for the rsa_private/public_encrypt/decrypt routines.
  • ADDED: padding/1 and encoding/1 options to rsa_private_decrypt
  • PACKAGE ZLIB:
  • ADDED: zopen/3: format raw_deflate. Patch by Matt Lilley.

New in SWI-Prolog 7.3.25 Development (Sep 5, 2016)

  • FIXED: when/2: evaluation disjunctions when nested in conjunctions. Frank Schwidom.
  • FIXED: Remove choice point in *-> again. Now use the sign of the term-reference to know whether or not we already deleted the choice point.
  • FIXED: call_cleanup(): possibly late cleanup with CHP_DEBUG choice points.
  • FIXED: Mode of dict_options/2. Wouter Beek.
  • FIXED: rc_close_archive handling of memory archive.
  • ENHANCED: aggregate/3 and friends: raise exceptions on errornous nested templates instead of failing.
  • FIXED: Complete implementation of '$meta_call'/1 which realises meta-calling of complex control structures for reset/3. The implementation now handles the ! and.
  • PORT: On Windows, fd_set can hold FD_SETSIZE (64) sockets rather than limiting the highest file handle.
  • MODIFIED: Moved shell/0 from the core to library(shell). As it is an autoload library this should have no impact.
  • FIXED: Meta-calling from reset/3. Partial fix: ! is not handled properly yet. Samer Abdallah.
  • DOC: Move documentation of library(assoc) to Markdown, using PlDoc reference.
  • DOC: library(assoc): Prepare for using PlDoc directly in the manual. This change aligns the PlDoc comments with the existing reference documentation in man/assoc.doc. It incorporates everything that was missing, fixes a few mistakes, and names the arguments consistently: Arg0 --> Arg is now consistently used whereas previously both ArgOut and NewArg were used to denote output arguments.
  • This sets the stage for using the PlDoc reference documentation directly in the manual, allowing us to get rid of the .doc version.
  • ENHANCED: CLP(B): Domain error in labeling/1 if applicable.
  • ADDED: Pigeons example for CLP(B)
  • ADDED: Boolean circuit example for CLP(B)
  • DOC: Move CLP(B) documentation to Markdown
  • DOC: move more of the CLP(FD) documentation to Markdown
  • DOC: Shorten CLP(B) summary entries to accommodate the PDF manual index.
  • DOC: FIXED: library(ugraph): transpose --> transpose_ugraph
  • DOC: Document nb_current/2 as alternative to nb_getval/2.
  • DOC: More information about library(simplex)
  • DOC: CLP(FD): Fetch predicate documentation from PlDoc
  • FIXED: DOC: add missing predicate summary for CLP(FD) constraints
  • FIXED: xref_source/1: process comments after last predicate.
  • BUILD: ltx2html --> ltx2htm
  • DOC: CLP(FD): Reorder predicate overview for greater accessibility.
  • DOC: CLP(FD): Move documentation to LaTeX for more flexibility
  • BUILD: Updated documentation to build the documentation.
  • DOC: Do not depend on user's TEXINPUTS
  • FIXED: Cut in condition of *-> when not executed on the first success. Reported by Frank Schwidom.
  • DOC: Fixed LaTeX issue. Nicos Angelopoulos.
  • DOC: Include library(simplex) from PlDoc.
  • ENHANCED: Type for PL_set_resource_db_mem() changed to unsigned char and documentated alternative ways to include the state. With help from Roberto Bagnara & Jose Morales.
  • DOC: Move documentation of library(simplex) to PlDoc. More to follow.
  • FIXED: atom//1: test for non-var. Markus Triska.
  • FIXED: Allow for ?- ["~/..."].
  • PORT: Cleaner implementation of engine_fetch/3, which also avoids a GCC bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56689).
  • Package clib:
  • ADDED: uid.pl: initgroups/2 if supported by the OS.
  • PORT: Win32 handling of FD_SETSIZE
  • Package cpp:
  • FIXED: Exception handling from PlCall(...)
  • ADDED: PlQuery(predicate_t pred, PlTermv av)
  • ADDED: PlPermissionError()
  • ADDED: Comparison of PlAtom with atom_t
  • ADDED: PlExistenceError() exception class.
  • Package http:
  • COMPAT: Make http_server_property/2 accept Host:Port
  • Package odbc:
  • ADDED: odbc_version/1 arg to odbc_connect/3 to allow ODBC 2.0 or 3.0 connectivity to be specified. Calls to odbc_connect/3 without an odbc_version/1 arg will default to ODBC 3.0 behavior
  • Package pengines:
  • ADDED: library(pengines_io) binding of pengine_output/1 to pass json{...} as unparsed JSON to the client.
  • Package sgml:
  • DOC: library(xpath): Formatting, quoting and clarifications.
  • DOC: library(xpath): Formatting, quoting and clarifications.
  • DOC: fix @Attribute(float) entry in library(xpath)
  • DOC: fix @Attribute(float) entry in library(xpath)
  • Package xpce:
  • PORT: Windows: handle FD_SETSIZE properly

New in SWI-Prolog 7.3.24 Development (Aug 9, 2016)

  • COMPAT: thread_statistics/1 to use the human readable thread id.
  • ADDED: Support engines (interactors) as first class citizens. See engine_create/3 and friends.
  • FIXED: I_YIELD in debug mode.
  • FIXED: statistics/1 (duplicate key exception)
  • ENHANCED: CLP(FD): Faster propagation for exponentiation. Julien Cumin.
  • PORT: Updated MinGW dependency versions and locations
  • MODIFIED: Identify anonymous threads using blobs. This causes access to thread handles to be safe against reuse and allows for GC of forgotten thread handles.
  • ADDED: PL_set_resource_db_mem() to support booting from a resource db available as a char*/size_t array.
  • LICENSE: Re-licensed low-level code to Simplified BSD
  • LICENSE: Relicensed Windows console code and installer script to Simplified BSD
  • LICENSE: Relicensed resource management library
  • FIXED: db_sync/1: Sync if database is empty and dirty .
  • FIXED: CLP(FD): Goal expansion for undefined ground expressions. Jan Burse. For example, the following would lead to an exception at compilation time:
  • undef(Z) :- Z #= 1//0.
  • It now works as expected. I have taken the opportunity to improve also other cases where the arguments are fully instantiated.
  • Note that 4 is now propagated into the clause head.
  • FIXED: git_show/4: deal with empty body.
  • ENHANCED: library(git): avoid empty print_message/2 calls.
  • BUILD: Adjust doc2tex script for new versions of Perl.
  • ADDED: CLP(FD): Support the bitwise operations msb/1, lsb/1 and popcount/1. This is to help logic programmers who use (#=)/2 for all integer arithmetic.
  • ADDED: CLP(FD): More reasoning about bitwise operations.
  • ADDED: CLP(FD): Rudimentary support for bitwise operations. Jan Burse. The goal is to support as many integer expressions as needed so that low-level arithmetic can be fully replaced by CLP(FD) constraints.
  • FIXED: PL_record_external(): deal with MPZ integers. Abramo Bagnara.
  • FIXED: PL_recorded_external(): consistently `put' the value instead of using `put' sometimes and `unify' otherwise. Abramo Bagnara.
  • Package http:
  • FIXED: test cases after using just the port for addressing a server. Generalises http_stop_server/1 to accept both host:port and plain port.
  • DOC: Typos and clarification.
  • FIXED: Avoid possible resource leak in http_stop_server/2.
  • ENHANCED: drop interface from address for admin of running servers.
  • DOC: Clarify json_read_dict/3 options. Honnix Liang.
  • Package semweb:
  • MODIFIED: Move library(sandbox) declaration to a new library(semweb/rdf_sandbox). After discussion with Anne Ogborn and Wouter Beek.
  • ADDED: library(semweb/rdf11): rdf_update/[4,5] After substantial rewrite to clarify and implement behaviour on partial instantiation by Jan Wielemaker.
  • FIXED: Inconsistent behavior for rdf_list/1. For instance, graph {(a,rdf:rest,b),(b,rdf:first,bb),(b,rdf:rest,rdf:nil)} succeeded for ?- rdf_list(a). but failed for ?- rdf_list(X). Both instantiations fail now. Adding triple (a,rdf:first,aa) makes both instantiations succeed.
  • DOC: Deprecate library(semweb/rdf_db)
  • Package sgml:
  • ADDED: xml_write/3: option cleanns(+Boolean) to remove already implied xmlns attributes.
  • FIXED: Use XSD 1.1 interpretation of gYear, where "0000" maps to -1. Wouter Beek.
  • FIXED: Do not escape > inside attribute values
  • FIXED: xml_write/2,3: Escape layout characters in attributes (rnt) and content (r). Required by canonical XML. Improves readability in general.
  • MODIFIED: xml_write/2,3: character entities are now written as &#x; rather than &#. This is the canonical representation and thus seems a better default.
  • FIXED: xml_write/2,3: default entity map. This map is now also computed at compile time.
  • Package ssl:
  • ADDED: rsa_sign/4.
  • Package xpce:
  • PORT: Fixed graphical debugger for blob-type thread and engine handles.
  • PORT: Make the thread monitor work with symbols as thread handles.

New in SWI-Prolog 7.3.23 Development (Jun 16, 2016)

  • PORT: Compilation on Windows.
  • ADDED: PL_Q_EXT_STATUS and better support engine yielding.
  • ADDED: PL_open_query(): flag PL_Q_ALLOW_YIELD to indicate the caller is aware of the engine can execute I_YIELD.
  • ENHANCED: Better validation of the type in library(error).
  • DOC: Updated wait_for_input/3
  • MODIFIED: wait_for_input/3 using a timeout 0 does not wait rather than waiting for an unlimited time. Using infinite to wait forever. Also changed the error terms to be more consistent.
  • PORT: Replace remaining select() calls from the core.
  • PORT: wait_for_input/3: use poll() when available to avoid limiting the number of open files.
  • CLEANUP: code for wait_for_input/3, preparing for poll()
  • FIXED: Thread safety issue in new thread allocation routine.
  • ADDED: Experimental $yield VMI to realise Paul Tarau's return(Term) for interactors based on engines.
  • FIXED: Deal with renamed README file.
  • CLEANUP: Small style issues in swipl-win.exe source.
  • ENHANCED: Make finding a slot for a new thread O(1) and reduce locking.
  • CLEANUP: Remove documentation and other traces of the no longer used SIGUSR1 signal
  • ENHANCED: Mark active references to choice-points to only save relevant choice points.
  • ADDED: library(prolog_xref): declaration for built-in reset.
  • FIXED: Possible race condition when multiple threads try to autoload the same predicate. Eyal Drechter.
  • ENHANCED: debug/1: avoid sending multiple copies to the same output. Eyal Drechter.
  • FIXED: Active marking on behalf of shift/1. Added more debug statements.
  • FIXED: shift/1: protect against stack shifts. More consistency checks and debugging.
  • FIXED: Handle memory overflows in tabling code.
  • FIXED: write/1: writing .(a,;) as a.(;) rather than a. (;)
  • ENHANCED: read/1: use a hash table for resolving variables if there are many.
  • DOC: Dynamic code and clause garbage collection.
  • PORT: Proper detection of IEEE754 layout for NaN writing. Was wrong on little endian machines that do not have , e.g., MacOSX.
  • CLEANUP: Move msb64() from pl-arith.c to pl-inline.h. Use compiler supported builtins if applicable and use this in pl-rec.c to compute the number of bytes to store for an integer (speedup, reduces code duplication)
  • FIXED: compound_name_arguments/3 error handling (unsigned type hided error condition).
  • FIXED: Trapping global overflows from PL_recorded() (failed due to unsigned type)
  • FIXED: predicate attribute handling on reload
  • PORT: Use PRId64 macro instead of homebrew INT64_FORMAT
  • Package clib:
  • PORT: only use our own version of tcp_select/3 on Windows. Other OSes use the enhanced system version.
  • PORT: Use poll() when waiting for a socket while dispatching events.
  • FIXED: environ/1 for MacOSX
  • Package http:
  • ADDED: Support logfile rotation using SIGHUP or SIGUSR1.
  • ADDED: library(http/http_log): the ability to include the POST data into the log file. By default disabled. This option is notably intended to debug servers.
  • ADDED: http_unix_daemon.pl: provide --redirect option to redirect an
  • HTTP server to the HTTPS server. E.g. server --http --redirect --https
  • ADDED: library(http/http_unix_daemon): allow starting multiple servers.
  • ADDED: http_unix_daemon:http_certificate_hook/3 that allows for
  • creating or updating certificates as the server starts in HTTPS modus.
  • Package odbc:
  • DOC: ODBC quoting. With help from Matt Lilley and Fernando Sáenz Pérez
  • Package pengines
  • TEST: Add version test for phantomjs to avoid running the JavaScript test on broken versions.
  • FIXED: Extracting objects from the manual pages.
  • Package semweb:
  • FIXED: Query typed literal using V^^xsd:string (exception).
  • FIXED: Issue#38: V^^T for plain literals failed.
  • FIXED: Issue#35: ntriples parser: blank node syntax. Wouter Beek.
  • FIXED: Allow for optional PNLOCAL when writing a turtle file.
  • ADDED: Allow RDF literal parsing to be extended by external modules that implement RDF datatypes.
  • Package sgml:
  • FIXED: Issue#39: rdf_equal(xsd:dateTime, D), xsd_time_string(DT, D, "01"). Wouter Beek.
  • Package ssl:
  • FIXED: Last patch didn't compile. Wouter Beek.
  • ADDED: ssl_negotiate/5: add support for client-side SNI negotiation. Tested on https://sni.velox.ch/
  • Package xpce:
  • PORT: Use poll for timeout in stream objects.
  • PORT: Use poll() for xevent timouts.
  • FIXED: regex->file_pattern must escape "+". Maurizio Ferreira.
  • PORT: Avoid shifting a negative integer

New in SWI-Prolog 7.3.22 Development (May 30, 2016)

  • DOC: Fixed unclear documentation of nextto/2.
  • MODIFIED: Do not call goal_expansion/2 on module:Var.
  • MAINTENANCE: Make configure --disable-mt work again.
  • ENHANCED: Clause GC invocation timing. Parameters that control this now better reflect the time and space tradeoff and the parameters are somewhat tuned. After regression found by and discussion with Abramo Bagnara.
  • CLEANUP: Group lock-free access pointers
  • ENHANCED: Use visibleClauseCNT() in all searching operations.
  • DOC: wrong references
  • DOC: include library(error) in the main docs
  • ADDED: predicate_property/2 implementation_module(-Module) to simplify finding targets for inlining, properties about targets, etc.
  • ADDED: Allow for :- multifile declarations in sandboxed code.
  • ENHANCED: Make adding or deleting a :- table directive take immediate effect after a reload of the source. This was problematic due to the logical update semantics preserving the old definition while reloading predicates.
  • ADDED: '$flush_predicate'/1 to materialize the current set of predicates early during reload.
  • DOC: Various small inconsistencies
  • DOC: typos
  • DOC: Do no skip a level in section headers

New in SWI-Prolog 7.3.21 Development (May 22, 2016)

  • DOC: Wip documenting the tabling library
  • DOC: reorganise database section and add a description of the trie built-ins.
  • ADDED: Version 1 of tabling primitives
  • ADDED: fastheap terms that can be copied from program space to the stacks really quickly.
  • FIXED: Use pushVolatileAtom() to avoid early atom-GC
  • ADDED: prolog:rename_predicate/2 hook to provide last-step renaming of a predicate for wrapping purposes. Experimental.
  • DOC: CLP(FD): New example to illustrate important concepts.
  • DOC: CLP(B): Explain monotonic mode.
  • DOC: CLP(FD): New section about residual goals.
  • DOC: CLP(FD): New section about monotonic execution mode.
  • DOC: Mention that goals with module prefix need to wrapped inside parenthesis in Yall.
  • DOC: Fix code markup for module Yall.
  • DOC: Fixed ungrammatical sentences in module Yall.
  • FIXED: load_files/2: No permission to load source (non-module file) when the same file is loaded concurrently by multiple threads. Wouter Pasman.
  • DOC: Fixed typo 'The the'.
  • FIXED: erase/1 calling event hook with wrong argument.
  • CLEANUP: Use recorded DB key hash table for enumeration if first argument of recorded is unbound.
  • ENHANCED: Use a double linked list for the recorded database to get O(1) performance for erase/1.
  • FIXED: failed to update no_hole_before. Benign. Boris Vassilev.
  • DOC: Prelimenary documentation for delimited continuations
  • MODIFIED: reset/3 argument order after discussion with Benoit, Tom and Bart.
  • FIXED: db_sync/1 for option gc(Perc) if the database is empty. Stephen Coda.
  • FIXED: shift/1 in the condition of if-then-else, \+, etc. Wouter Beek.
  • PORT: Another avoidance of a local array. Paulo Moura.
  • PORT: Avoid local dynamic array, which is not (no longer?) supported by clang on MacOS. Paulo Moura.
  • CLEANUP: current_functor/2: removed redundant test. Paulo Moura.
  • FIXED: new frame must have FR_MAGIC set.
  • ENHANCED: Pushing the whole continuation in call_continuation leads to quadratic behaviour. This patch introduces $call_one_tail_body', and calls the continuation incrementally using a tail-recursive procedure. Suggested by Bart Demoen.
  • ENHANCED: Reclaim unneeded stack after shift/1 and maintain the dynamic predicate reference count.
  • WORKAROUND: We cannot deal with compiled meta-calling inside reset/3 because the `local clause' will be lost. We could try to save this clause in the environment, but I fear there are still problems with the `argvar' compiled arguments in this clause. We fix this by redirecting call/1 to '$meta_call'/1 if we are inside reset/3
  • FIXED: Trail variables in the environment
  • FIXED: Local stack expansion in call_continuation/1.
  • FIXED: Stack shifter assertion failure because clause-references for call_continuation are on the local stack.
  • ADDED: Delimited continuation: reset/3 and shift/1. Together with Tom Schrijvers, Bart Demoen and Benoit Desouter.
  • FIXED: atom_codes(hello,"hello") in string mode. Daniël de Kok
  • ENHANCED: refactor compareStandard() into smaller functions. By avoiding initializing cycle detection for primitive values we get a 20% speedup for sort/2 on lists with primitive values. Also compounds are a little faster due to the usage of more low-level functions.
  • ENHANCED: CLP(B): Make residual goals work for recorded constraints. Not doing this leads to the following problem in SWISH, which uses the database to record results:
  • This is because when the constraints are fetched and the constraints are projected to residual goals, CLP(B) would again use IDs 0,1,... for variables (because the counter is reset), but these IDs are already used in the recorded attributes. Thus, existing IDs are inadvertently reused for new variables.
  • Ideally, SWISH should simply obtain the residual goals with copy_term/3, and then work on the residual consraints alone.
  • ENHANCED: Revert to put_attr/3 if the attribute_goals//1 fails.
  • FIXED: race-condition when resizing a hash-table. If a late-arriving deletion adds a tombstone to an old kvs it must be copied into the new kvs
  • FIXED: thread-safety of Sfileno()
  • FIXED: doc typo. Wouter Beek.
  • FIXED: typo
  • Package archive:
  • FIXED: Filter `iso9660' was not recognized due to consistent typo.
  • FIXED: archive_open_stream/4: raise error on low-level read error.
  • Package http:
  • ADDED: HTTP Unix daemon: New option --cipherlist.
  • FIXED: Empty HTTP replies are no longer simulated as 500 HTTP errors. An existence error is thrown instead.
  • ADDED: Allow the client to not be automatically authenticated when receiving a 401 (Unauthorized) status code in http_open/3 by adding the Boolean option 'authenticate'.
  • DOC: Fix 'Schema' -> 'Scheme'.
  • DEBUG: Display HTTP requests send by http_open/3 as debug messages under the 'send_request' flag.
  • DOC: Document http_open/3's query_string option.
  • DOC: Fix 'xpath' -> 'XPath'.
  • DOC: Fix the ambiguity of the phrase 'this library'.
  • DOC: typo SSL'.
  • CHANGED: Use standard capitalization for setting the Content-Type header (this does not change header semantics).
  • FIXED: Make the cgi_stream control function safe against concurrent deletion of the stream.
  • Package pengines:
  • ADDED: Allow passing a disposition option through the pengine creation pipeline to support downloading to a given file.
  • FIXED: Issue#23: update_remote_destroy/1 may destroy the wrong pengine.
  • FIXED: Something is a destroy event if the create/2 term contains a destroy.
  • Package pldoc:
  • FIXED: Resolve qualified predicates from the manual.
  • Package plunit:
  • FIXED: show_coverage/1 did not enumerate qualified predicates.
  • Package semweb:
  • ENHANCED: Avoid ! in term_expansion/2 and only succeed if there is something to be expanded. Reduces interaction with other expansion hooks.
  • DOC: Fixed missing word.
  • FIXED: Do not reexport rdf_db predicates that are deprecated in rdf11: rdf_current_literal/1, rdf_current_predicate/1, rdf_is_resource/1.
  • FIXED: Added meta_predicate/1 declaration for parse_partial_xml/3.
  • CLEANUP: Removed rdf_meta/1 declaration of rdf_literal_value/2.
  • FIXED: Turtle writer: Safer handling I/O and representation errors. Wouter Beek.
  • Package sgml:
  • FIXED: Issue#20: xsd_time_string(+,?,-) for negative years
  • DOC: Fix capitalisation of 'XPath'.
  • FIXED: Callback from decl callback on comment. Patch by Wolfram Diestel.
  • Package ssl:
  • ADDED: ecdh_curve(+Curve), enabling Diffie-Hellman ciphers. Many thanks to Charlie Hothersall-Thomas for his analysis and implementation advice!
  • ADDED: Option cipher_list(Atom) when creating an SSL context.

New in SWI-Prolog 7.3.20 Development (Apr 16, 2016)

  • FIXED: numbervars/4: Honour Start if singletons(true) is given. Alan Baljeu.
  • FIXED: CSV output for []
  • FIXED: swipl-ld: enlarge buffer for processing the Prolog options. Ollivier Sallou.
  • DELETED: clause prolog:message_location(file(..., in prolog_codewalk.…
  • DELETED: clause prolog:message_location(file(..., in prolog_codewalk.pl, it is already defined in messages.pl, clause swi_location(file(... which is a better implementation.
  • BSD: Integrated clean-room re-implementation of is_acyclic()
  • BSD: Integrated clean-room re-implementation of skip_list()
  • ADDED: CLP(B): Tentative syntax for monotonic reasoning: v/1 terms denote variables and ground Boolean values. After discussion with Ulrich Neumerkel. The following queries and answers illustrate the concept:
  • ADDED: CLP(B): New flag clpb_monotonic makes CLP(B) monotonic. Without this flag, we run into the following declarative problem:
  • SWISH: Create clpfd_monotonic flag so that it works correctly for different clients.
  • ADDED: varnumbers_names/3
  • ADDED: Ability to emit a dot/1 term for rendering the BDD in SWISH. Currently, the flag clpb_residuals needs to be set to graphviz to emit the dot/1 term. It is still open how to best integrate this in SWISH. Maybe draw the BDD every time graphviz is used as renderer?
  • ENHANCED: Make memberchk/2 behaviour consistent for cyclic lists.
  • ENHANCED: Faster version of list_to_set/2 based on the ECLiPSe compatible sort/4.
  • ENHANCED: Do not generate debug info for library(statistics).
  • FIXED: Issue#681 memberchk/2: process interrupts and detect cyclic lists to avoid DoS attacks. Ulrich Neumerkel.
  • CLEANUP: Removed no longer needed call.
  • MODIFIED: Replaced read_pending_input/3 by two new predicates: read_pending_codes/3 and read_pending_chars/3. read_pending_input/3 is available from library(backcomp) as an alias for read_pending_codes/3.
  • CLEANUP: Prepare to introduce read_pending_chars/3.
  • FIXED: Rewrite of statistics/0.
  • COMPAT: Make library(statistics) work with --traditional
  • ADDED: xref_source/2: option process_include(+Boolean) to select whether or not included files are processed.
  • MODIFIED: library(prolog_xref): call prolog:xref_source_file/3 hook before trying a relative file.
  • FIXED: library(prolog_colour): complete colouring on unknown option name.
  • FIXED: discontiguous warnings were no longer working on first load.
  • FIXED: library(prolog_xref): avoid a dead loop if files mutually include each other.
  • FIXED: clause indexing on 32-bit hardware for integers > tagged ints that fit in 32-bits.
  • Package RDF:
  • MODIFIED: process_rdf/3: do not copy the OnObject closure.
  • Package http:
  • FIXED: library(http/http_unix_daemon): actually terminate again on SIGTERM.
  • Package pengines:
  • FIXED: Operator priority in rendering results. Santiago Castro.
  • ADDED: /pengines/ping and Pengine.ping() to periodically test the status of a remote pengine.
  • ADDED: JavaScript class Pengine: options.ondata to handle a single answer.
  • Package pldoc:
  • FIXED: Wiki processing: [[File;param=value]] links were broken. Anne Ogborn.
  • Package semweb:
  • FIXED: rdf_list/1 was broken: the rest of the list must be checked to be `rdf:nil'.
  • Package sgml:
  • FIXED: Allow for Prolog encoding names in encoding option.
  • FIXED: Process encoding in load_dtd/2,3. Wolfram Diestel.
  • FIXED: xsd_time_string/3 must allow for negative years, but not for the year 0.
  • Package table:
  • FIXED: Bug in binary table search may result in very slow searches
  • Package xpce:
  • ENHANCED: Allow GUI tracer to work in `system mode'.
  • Package zlib:
  • FIXED: gzopen/4: apply alias(+Alias) to the compressed stream. Wouter Beek.

New in SWI-Prolog 7.3.19 Development (Apr 16, 2016)

  • FIXED: check visibility attribute support of compiler
  • FIXED: check visibility attribute support of compiler Mac OS X does not support protected visibility, plus it doesn't generate hidden in the assembly file, but private_extern.
  • FIXED: Issue#135: lazy_list_location//1 for the very first character. Anne Ogborn.
  • FIXED: list_undefined/0 removed old debug print statement.
  • FIXED: findnsols/4: incorrect report of global overflow when applied to a generator with inifinite solutions.
  • MODIFIED: library(prolog_colour): Signal ^ in setof/3, etc. as ext_quant token, so we can provide hover info (SWISH).
  • BUILD: make `configure --without-*` work Commit 8257acd doesn't work any more with current build structure because packages are configured during make and hence DISABLE_PKGS is not visible to packages/configure script.
  • The fix is simply passing `--without-* to packages/configure` without touching at the top level.
  • TEST: indexing indirect types.
  • ENHANCED: Use murmurhash for all indirect types. Simplifies code, provides better distribution and indexes on strings.
  • FIXED: library(prolog_colour): string literals.
  • DOC: must_be(between(L,U), T).
  • ENHANCED: Stop tracing internals of phrase_from_file/3
  • FIXED: xref: take care of the possibility that built-in predicates are not defined in system.
  • ENHANCED: xref: do not verify sandbox rules while cross-referencing.
  • Package http:
  • FIXED: json_write using Name(Value)
  • ADDED: http_open/3: support method OPTIONS
  • FIXED: http_open/3: Make digest authentication work for methods other than GET.
  • ADDED: Unix daemon script: reload on SIGHUP (= make)
  • Package pengines:
  • ADDED: Support to stream all results as a single HTTP document.
  • ENHANCED: (slightly) better information about network/server errors.
  • ENHANCED: First send an OPTIONS request for creating a pengine to perform the authentication.
  • Package semweb:
  • FIXED: library(semweb/rdf11): Compatibility issue wrt XMLLiteral handling.
  • FIXED: check visibility attribute support of compiler
  • FIXED: check visibility attribute support of compiler Mac OS X does not support protected visibility, plus it doesn't generate hidden in the assembly file, but private_extern.
  • FIXED: atom indexing segfault with signal 11 on Mac OS X
  • FIXED: atom indexing segfault with signal 11 on Mac OS X As discussed per thread: https://github.com/SWI-Prolog/packages-semweb/issues/22
  • Naming conflict and unsuitable detection of Apple LLVM and clang's support for visibility attribute results wrong function call at runtime when certain optimisation flags are used.
  • This fix changes the name of the function to avoid naming conflict on platform that doesn't support proper isolation.
  • FIXED: Valgrind reporting uninitialized memory access. Most likely harmless. With help from Keri Harris.
  • ENHANCED: Allow RDF content types with a q-value to be defined by a hook.
  • FIXED: rdf_compare/3: added missing rdf_meta/1 declaration.
  • MODIFIED: library(semweb/rdf11), rdf_lexical_form/2 now returns a compound term of the form String^^Type or String@Lang.
  • DOC: typo and avoid duplicate conversion table.
  • Package ssl:
  • FIXED: determine if SSLv2 is supported based on OPENSSL_NO_SSL2 in OpenSSL header files rather than checking for SSLv2_method() function. It's possible that the SSLv2_method() function may exist in libssl.so but is not defined in ssl.h due to settings in opensslconf.h
  • Package table:
  • ADDED: new_table/4: option encoding(+Encoding), allowing to process UTF-8 and native multi-byte encoded files.
  • Package xpce:
  • ENHANCED: Exception menu for timeout exceptions.
  • FIXED: check visibility attribute support of compiler
  • FIXED: check visibility attribute support of compiler Mac OS X does not support protected visibility, plus it doesn't generate hidden in the assembly file, but private_extern.

New in SWI-Prolog 7.3.18 Development (Mar 5, 2016)

  • FIXED: stream_property(+,-) can fail if last enumerated property is not present.
  • FIXED: apply(plus(), [1,2,X]). Michael Frank.
  • MODIFIED: profile/2: fixed spelling of option (cummulative --> cumulative). As this is normally used interactively, no backward compatibility is provided. Abramo Bagnara.
  • FIXED: Possible crash when consulting files by expanding end_of_file. Matt Lilley.
  • ADDED: db_detach/0. After discussion with Stephen Coda.
  • FIXED: Issue#37: detect redefinition of predicates from another file. Broken after incremental recompilation.
  • SCIENCE: Cite CLP(B) system description.
  • ENHANCED: dif/2: Omit more entailed residuals with occurs_check set to true. Jan Burse. Sample case, previously:
  • REMOVED: get_dictionary/3 predicate, using b_getval('$variable_names',Dict) instead, which already contain the required information
  • FIXED: compile_auxiliary_clause/2 should use predicate_property(.., defined) instead of current_predicate/1, which is aware of recompilation
  • LICENSE: Release library(simplex) under BSD license.
  • LICENSE: Release CLP(B) under BSD license.
  • LICENSE: Release CLP(FD) under BSD license.
  • Package RDF:
  • MODIFIED: Use _: as bnode prefix.
  • FIXED: write triple with bnode object that has no properties
  • Package clib:
  • DOC: Documented missing tcp_accept/3. Markus Triska.
  • Package cpp:
  • MODIFIED: PlTypeError(expected, actual) throws an instantiation error if actual is unbound.
  • Package http:
  • DOC: Non-compound terms are not formatted as code.
  • DOC: Fixed typo and added markup.
  • Package jpl:
  • FIXED: Invalid HTML makes some versions of JavaDoc fail.
  • PORT: Also on I?86 assume the JNI libraries are in "server". Patch by Lev Lamberov.
  • Package pengines:
  • ADDED: term//2: option float_format.
  • ENHANCED: pengines_io.pl: Wrap format output in a span with class format
  • Package pldoc:
  • ADDED: doc_latex/3: allow searching predicate documentation is specified modules.
  • FIXED: wiki face recognition inside [Label](Ref) and [[Label][Ref]] for the label.
  • FIXED: PlDoc link to manual bibliography.
  • Package semweb:
  • FIXED: rdf_save/2 referring to invalid entities.
  • MODIFIED: By default, blank nodes are now represented as atoms that start with `_:` rather than atoms that start with __. Discussed with Wouter Beek.
  • ADDED: library(semweb/rdf11) and library(semweb/rdf11_containers)
  • DOC: rdf_match_label/3
  • TEST: Order of numerical results is undefined.
  • FIXED: >= testing should start with the smallest type (xsd:double).
  • FIXED: 0ab87b85ef4094883c4ca232650116310f7c4a52 was intended to sort doubles before integers, not numbers after strings.
  • ENHANCED: Use literal index for eq matching.
  • Package sgml:
  • FIXED: xsd_number_string/2: throw error on e.g., "42a".
  • Package xpce:
  • FIXED: some regex issues with out-of-range characters and large char ranges. Backport for http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=3bb3f42f3749d40b8d4de65871e8d828b18d4a45 Did not backport cancellation part for long character ranges.

New in SWI-Prolog 7.3.17 Development (Mar 5, 2016)

  • INSTALL: Windows: use nsExec::ExecToLog() to get rid of the popup windows for the compiler.
  • ENHANCED: Raise permission error when dereferencing too deeply nested symbolic links.
  • FIXED: Loading a .qlf file using [file] executed the initialization directives twice.
  • FIXED: list_undefined/1: when checking system modules silence reports on $call_cleanup'/0, etc.
  • FIXED: tprofile/1: called undefined show_profile/2.
  • MODIFIED: exception_hook/4 can now be called with CatcherFrame equal to 'C' if the exception is called by C calling Prolog. This patch also makes exception_hook/4 being called correctly on exceptions raised during recursive CProlog calls.
  • FIXED: '$sig_atomic'/1 is now implemented such that an exception raised in it is considered caught if there is a catch/3 in the calling code.
  • FIXED: Run initialization/1 goals when loading a .qlf file. Paulo Moura.
  • PORT: Avoid undefined shift of negative integer.
  • PORT: Partial poll() support for Windows.
  • ENHANCED: use poll() rather than select() for timeout handling on streams. Step 1 of issue#43.
  • DOC: Forgotten argument, typo. Eyal Drechter.
  • ENHANCED: Exception for absolute_file_name/2
  • FIXED: numeric comparision of NaN and NaN
  • Package RDF:
  • LICENSE: Re-licensed from GPL+exception to simplified BSD
  • Package archive:
  • LICENSE: Re-licensed from GPL+exception to simplified BSD
  • Package clib;
  • FIXED: library(prolog_stream): pass exceptions from low-level hooks to the caller.
  • PORT: correct configure file in maildrop subfolders: now the local one is surely called
  • Package cpp:
  • FIXED: Types in NAMED_PREDICATE_NONDET macro.
  • Package cql:
  • LICENSE: Re-licensed from GPL+exception to simplified BSD
  • Package http:
  • ENHANCED: Try to kill X11 when starting a daemon in non-interactive mode
  • ADDED: http_set_authorization/2: accept digest(User,Password). Also allows the password to be a string rather than an atom.
  • Package jasmine:
  • LICENSE: Re-licensed from GPL+exception to simplified BSD
  • Package ltx2htm:
  • LICENSE: Re-licensed from GPL+exception to simplified BSD
  • Package odbc:
  • LICENSE: Re-licensed from GPL+exception to simplified BSD
  • Package pengines:
  • FIXED: remote pengine cleanup on exception if the server has died.
  • Package pldoc:
  • FIXED: doc_save/2: avoid confusion about dir/ (exception). Nicos Angelopoulos.
  • Package semweb:
  • DOC: Fixed LaTeX syntax
  • ENHANCED: Implement runtime expansion for prefix:local in RDF API.
  • FIXED: Documentation was refering to a different persistency module.
  • DOC: Added header row to predefined RDF prefix table.
  • DOC: Removed single quote at the end of IRI prefixes for which an alias is predefined.
  • DOC: Added two missing predefined RDF prefixes.
  • DOC: Put the predefined prefixes in alphabetic order to make it easier to keep track whether documentation reflects the code.
  • DOC: RDF namespace typo: rdf:label -> rdfs:label.
  • DOC: Typo in RDF namespace: rdf:Container -> rdfs:Container.
  • FIXED: RDF prefixes were not be expanded for subject terms in rdfs_label/3.
  • FIXED: Use xsd_number_string/2 for float serialization and avoid inlined blank nodes in ntriple writer.
  • FIXED: rdf_save_ntriples/2: never inline object bnodes.
  • DOC: Refer to the non-deprecated alternative to the deprecated rdf_register_ns/2.
  • LICENSE: Re-licensed from GPL+exception to simplified BSD
  • FIXED: New gt and lt literal comparision could accept equal.
  • FIXED: rdf_current_predicate(Var) did not report last predicate if this was hashed on the last bucket.
  • ADDED: Allow for numeric literal search.
  • ADDED: rdf_compare/3 to that defines a total ordering for RDF terms.
  • FIXED: Literal comparison between numeric data types.
  • Package sgml:
  • TEST: Fix replacement of local pretty printer.
  • LICENSE: Re-licensed from GPL+exception to simplified BSD
  • FIXED: xsd_time_string/3: allow for 24:00:00, time zones upto +/-14:00 and require at least one digit for HH:MM:SS.D.
  • ADDED: xsd_time_string/3 to convert XSD compatible date and time formats and Prolog terms. This patch also contains fixes for xsd_number_string/2 and a test suite for these two predicates.
  • Package ssl:
  • LICENSE: Re-licensed from GPL+exception to simplified BSD
  • Package zlib:
  • LICENSE: Re-licensed from GPL+exception to simplified BSD

New in SWI-Prolog 7.3.16 Development (Jan 27, 2016)

  • CLPB: Documentation enhancements.
  • REVERT: Reverted introduction of verify_attributes/3 as attributed variable hook. The system suffers too much regression and performance degradation to have this on the development master. The new hook will be re-integrated if all problems with it are fixed, including at most mild performance degradation. A new branch verify-attributes was created that points at the place from where I reverted. The only affected package is chr, which has the same verify-attributes branch.
  • FIXED: Exceptions using foo().
  • ENHANCED: library(sandbox): get better stack info if meta-call analysis is insufficient.
  • FIXED: Possible crash in tracer on FAIL port due to overwritten choice point.
  • FIXED: incorrect discontiguous warning when reloading dynamic predicates. Matt Lilley.
  • FiXED: '$attvar_assign'/2: pre-allocate space for the assignment.
  • FIXED: possible use-after-free when rehashing functor tables
  • FIXED: module/1 to allow new modules
  • FIXED: save for flag/3 structures. Kuniaki MUkai and others
  • Package clib:
  • ADDED: Declare md5_hash/3 as sandbox-safe.
  • Package http:
  • FIXED: Option `final_url' broken due to changing option `visited' to hold lists of visited URIs.
  • ADDED: Extended and documented the http:status_page/3 hook to generate custom pages for the 4XX error pages.
  • FIXED: HTTP digest: never return the same nonce to the same client.
  • ENHANCED: Allow the digest authentication hook to be called multiple times in the same request without trapping a `nonce replay' error.
  • DOC: cgi_property/2: document existence of the id property.
  • FIXED: HTTP digest client nonce GC.
  • ENHANCED: Shorted http_write_short log message.
  • FIXED: HTTP digest authentication: pick default method from request.
  • ADDED: example code illustrating HTTP digest authentication.
  • FIXED: json_write_string/2: get the output stream if we pass a stream pair. Matt Lilley.
  • ENHANCED: json_write[_dict]/2,3: Raise a type error on json(Pairs) if Pairs is not a list or the members are not N-V or N=V.
  • FIXED: content-encoding is no longer interpreted as a synonym for transfer-encoding if the content-type indicates that such an encoding is expected. Kuniaki Mukai.
  • Package pengines:
  • FIXED: error handling for pengine_create/1. Torbjörn Lager
  • FIXED: Properly handle cyclic results when using the Prolog client.
  • Package sgml:
  • ADDED: xsd_number_string/2: declare as sandbox-safe

New in SWI-Prolog 7.3.15 Development (Jan 12, 2016)

  • FIXED: Do not delete dynamically added clauses during reload.
  • MODIFIED: PL_unify_* functions point to the newly created Prolog data rather than the term unified with if the unification is against an attributed variable. Document some of the issues.
  • FIXED: constraint handling for prompt/2, profiler/2 and thread_set_concurrency/2. Note that this patch restores the pre-verify-atributes case for these predicates, e.g. ?- prompt(_, a). true. ?- dif(P,a), prompt(P,b). false. ?- prompt(P,P). P = b.
  • A proper fix must split these predicates into a get and set half and unity them in Prolog to allow constraints to wake up.
  • FIXED: Make working_directory/2 safely cooperate with constraints.
  • CLPB: Documentation enhancements.
  • ENHANCED: speedup gensym/2.
  • FIXED: Make flag/3 aware of attributed variables. Unfortunately, this makes the predicate significantly slower. It is probably still fast enough not to be a significant overhead in real applications though.
  • CLEANUP: Replace '$module'/2 with '$current_typein_module'/1 and '$set_typein_module'/1. Avoids attvar issues and is cleaner.
  • CLEANUP: Split '$set_source_module'/2 into '$current_source_module'/1 and '$set_source_module'/1. More consistent and avoids attributed variable issues. Edison Mera.
  • ENHANCED: speedup =..(-,+) and make sure wakeup happens in this mode. Reported by Edison Mera.
  • COMPAT: Make NaN handling compatible with ECLiPSe, after comments from Joachim Schimpf.
  • ADDED: Syntactical support for float infinity and NaN according to http://eclipseclp.org/Specs/core_update_float.html#syntax
  • FIXED: actually remove clauses of the last clause(s) of a static predicate are removed before reloading. Reported by rausm.
  • FIXED: listing/1 for predicates that were made transparent by means other than meta_predicate/1
  • DOC: Fixed typo and ephrased ungrammatical sentence.
  • FIXED: Cycle-safe detection whether a term contains functions. This is only half of the fix for expand_goal/2 if the first argument is cyclic. The other half must expand functions in the context of cyclic terms.
  • ADDED: library(sandbox): support new verify_attributes/3 hook
  • PORT: Use new verify_attributes/3 hook.
  • PORT: Use new verify_attributes/3 hook. Also lifts limitations.
  • PORT: Use new verify attributes hook.
  • PORT: Use new verify_attributes/3 hook.
  • DOC: Document new verify_attributes/3 hook.
  • MODIFIED: Reimplemented attributed variable hook infra structure. The new primary hook is verify_attributes/3, which is called before the unification happens rather than after it. This makes the interface more compatible with the SICStus interface. The system generates a compatibility wrapper for code that defines attr_unify_hook/2. Issue raised by Markus Triska. Implemented mostly by Douglas Miles after long discussions with Markus and Jan Wielemaker.
  • ADDED: git_shortlog/3: Unix time stamp to output record
  • LICENSE: Updated header skeleton for new files
  • FIXED: Possible unrecoverable local stack overflow for clauses with many variables.
  • TEST: Fixed reload test to reflect currently intended behaviour.
  • DOC: Updated Unix man page.
  • MANPAGE: Document "swipl file1 ..." invocation, as in swipl --help.
  • FIXED: Throw exception from signal handler. Gniourf.
  • PORT: PL_register_foreign(): define function pointer as void* seems to offer best portability. Alan Baljeu.
  • FIXED: Limit recursive nesting of calls to portray/1. Unbounded recursion causes a C-stack overflow, loosing the process. Gniourf.
  • FIXED: calling potray/1 when printing an atom did not pass on exception correctly.
  • FIXED: Avoid repetitive printing of uncaught exceptions in recursive calls from C to Prolog.
  • PORT: Compile on Windows
  • Package PDT:
  • LICENSE: Modified the license from GPL+exception or perl to simplified BSD
  • Package chr:
  • PORT: Exploit new verify_attributes/3 hook. Douglas Miles.
  • Package cpp:
  • LICENSE: Modified the license from GPL+exception or perl to simplified BSD
  • FIXED: C++ type errors. Carlo Capelli.
  • Package cppproxy:
  • LICENSE: Modified the license from GPL+exception or perl to simplified BSD
  • TEST: Update to use library(zlib).
  • MODIFIED: http_open/3: process Content-encoding as Transfer-encoding. In particular, if library(zlib) is loaded, decode gzip content. Many CDN networks seem to send text/html content using Content-encoding: gzip. See https://github.com/SWI-Prolog/packages-http/issues/37.
  • ENHANCED: HTTP: Enable Keep-alive connections when replying with bytes/2.
  • ENHANCED: HTTP: Flush output after replying with bytes/2.
  • DOC: Added upstart and systemd control files to the examples directory.
  • DOC: use the recommended syntax for invoking swipl with Prolog files The other options do not work reliably with multiple files. Reference:
  • FIXED: json_write/2 and variations: raise instantiation error if a value is unbound. Torbjörn Lager.
  • FIXED: Issue#96: failing to detect redirection loops because merge_options/3 removes the duplicate visited(Location) option. We now keep all visited locations in a single visited(LocationS) option.
  • Package jpl:
  • LICENSE: Modified the license from GPL+exception or perl to simplified BSD
  • Package pengines:
  • LICENSE: Modified the license from GPL+exception or perl to simplified BSD
  • Package pldoc:
  • LICENSE: Re-licensed from GPL+exception to simplified BSD
  • FIXED: Deal with _/_ as predicate head rather than predicate indicator.
  • Package plunit:
  • LICENSE: Modified the license from GPL+exception or perl to simplified BSD
  • LICENSE: Added missing license header
  • LICENSE: Modified the license from GPL+exception or perl to simplified BSD
  • Package semweb:
  • FIXED: Compare negative integers.
  • ADDED: literal(gt(Compare), Value) and literal(lt(Compare), Value).
  • CHANGED: Perform RDF prefix expansion for the graph argument of `rdf_graph_property/2' and `rdf_set_graph/2'.
  • FIXED: Broken literal(exact(Pattern), Target).
  • MODIFIED: Order literals with an XSD numerical type numerically.
  • ENHANCED: rdf_match_label/3: accept a string for search and label.
  • Package sgml:
  • ADDED: xpath/3: access attributes using @Name(Transformations), allowing for e.g. @width(number) to get width="3" as the integer 3 rather than the atom '3'. This patch also uses the new predicate xsd_number_string/2 to translate XML text into numbers according to the XSD specification for numbers. The attribute transformations were suggested by Markus Triska.
  • ADDED: Allow index-based selection with wildcard. After pull request https://github.com/SWI-Prolog/packages-sgml/pull/9.
  • ADDED: xpath/3: support index(?Index) in addition to implicit nth due to integer, last or last-Expr. This form also accepts a variable Index.
  • FIXED: xsd_number_string(-,+) for integers.
  • ADDED: xsd_number_string/2 to convert between lexical form and number according to the XML-Schema rules for parsing and writing floats.
  • Package table:
  • LICENSE: Modified the license from GPL+exception or perl to simplified BSD
  • Package tipc:
  • LICENSE: Modified the license from GPL+exception or perl to simplified BSD
  • Package utf8proc:
  • LICENSE: Modified the license from GPL+exception or perl to simplified BSD
  • Package windows:
  • LICENSE: Modified the license from GPL+exception or perl to simplified BSD
  • Package xpce:
  • LICENSE: Re-licensed from GPL+exception to simplified BSD
  • Package zlib:
  • ADDED: library(zlib): act as transfer-encoding plugin for library(http/http_open).

New in SWI-Prolog 7.3.14 Development (Dec 22, 2015)

  • MODIFIED: no longer try to make dynamic predicates static if the file is reloaded without a :- dynamoc declaration.
  • FIXED: prolog_cut_to/1 (ancestral cut) did not call the cleanup handlers for all discarded frames. Edison Mera.
  • FIXED: clause/2,3: pair open/close frame and push/pop predicate access.
  • ADDED: library(sandbox): allow set_prolog_stack/2 to reduce the stack limits.
  • FIXED: stream_property/2 in mode (-,+) and mode (-,-)
  • MODIFIED: setup_call_cleanup/3 now also runs the cleanup handler while disabling signals. This avoids the cleanup handler not really being executed due to a pending signal.
  • CLEANUP: in_temporary_module/3 code style and use setup_call_cleanup/3 rather than call_cleanup/2.
  • CLEANUP: Remove predicates for memory allocation details from core system
  • ENHANCED: Small speedup and avoid duplication for sort([X],L).
  • FIXED: Emergency stack overflow situations can work harder to find free space.
  • FIXED: PL_rewind_foreign_frame() now destroys possibly stale foreign environments.
  • FIXED: copy_term_refs() must close frame, also if stack is short.
  • ADDED: library(sandbox): nb_linkarg/3. Needed by distinct/1.
  • FIXED: Handle exceptions from prolog_exception_hook/4. Work in progress.
  • FIXED: Avoid possible assertion error in CHK_SECURE mode. Otherwise mostly harmless.
  • FIXED: Avoid creating a stream context when unifying a stream without aliases. This should avoid recreating the stream context for erased streams.
  • MODIFIED: Run specific stream close hooks before the global hooks that unregister the streams. We want unregistration to be last to avoid the stream popping up in the stream context table again.
  • SANDBOX: Obtaining BDDs by setting clpb_residuals to bdd is safe.
  • SANDBOX: Allow monotonic CLP(FD) via the flag clpfd_monotonic.
  • MODIFIED: Changed translate_bindings/4 to translate_bindings/5 to allow preserving residual variable identity.
  • FIXED: Preserve variable identity for residual goals produced by :- residual_goals(:NonTerminal).
  • FIXED: Typo in 081ab0a3bcf13ccd2d4ed76e91458da14e8eb88f
  • FIXED: thread_send_message/3: failed to reset wait_for_drain when timelimit is exceeded. Causes an assertion error if the queue is garbage collected.
  • MODIFIED: replaced residual_goal/1 hook with a :- residual_goals(+NonTerminal) declaration. This is consistent with the DCG based residual goal collection for attributed variables. Markus Triska.
  • ENHANCED: cache absolute_file_name/3 search results for a configurable amount of time (default 10 seconds). This avoids that the cache becomes really large while providing almost all the speedup.
  • PORT: MacOSX: Use /usr/lib/java_home to find Java
  • FIXED: Possible crash in '$thread_local_clause_count'/3
  • FIXED: Predicate count statistics was not incremented for local definitions.
  • ADDED: library(hprolog): make_get_store_goal_no_error/3 to support CHR safe enumeration of constraints.
  • ADDED: hook residual_goal/1 to allow applications to make their state available as residual goals. Used by CHR.
  • FIXED: Allow actually using the expand_query/4 and expand_answer/2 hooks.
  • ADDED: library(sandbox): allow for :- initialization directives.
  • FIXED: load_files/2: execute initialization/1 directives when loading from a stream.
  • ENHANCED: Lock-free and thread-local-data free lookup of existing modules.
  • INSTALL: Try multiple servers for downloading the documentation
  • Package chr:
  • ENHANCED: Avoid dummy choice points from the CHR debug mode compilation.
  • FIXED: Implement residual_goals//0 for CHR while preserving variable identity.
  • CLEANUP: Replace 'chr sbag_member'/2 with member/2
  • FIXED: Stopped working if no preprocessor was defined.
  • FIXED: Define unify_attr_hook/2 as public to tell library(sandbox) that a cross-module call is expected.
  • ADDED: preprocess/2 hook.
  • ADDED: Include CHR syntax highlighting rules with library(chr).
  • MODIFIED: exploit the new residual_goal/1 hook to get pending CHR constraints reported by the toplevel. This provides a simpler interface that is easier to maintain.
  • FIXED: Avoid constraint enumeration to produce errors for constraints that are not activated in a specific thread for a specific module.
  • ADDED: current_chr_constraint/1 as a module-aware replacement for find_chr_constraint/1.
  • ADDED: Sandbox rules to allow CHR to set global variables.
  • CLEANUP: Avoid dependency on backward compatibility predicates.
  • Package clib:
  • ADDED: library(mallocinfo) to get details about GNU malloc (if this is the used allocation library).
  • Package http:
  • FIXED: websocket interface: size_t arity issue
  • Package pengines:
  • FIXED: Preserve variable identity when dealing with residuals.
  • FIXED: If a pengine cannot send output because the client has gone, do not try to send the termination confirmation. Causes pengines to live too long while the resources are not reclaimed.
  • FIXED: pengine_ask/3: pass breakpoints option.
  • ADDED: Allows passing additional residual goals through variable bindings to support CHR.
  • Package semweb:
  • FIXED: rdf_retractall/3,4: generate exception if predicate is not an atom. Used to succeed silently while leaving the exception in the environment.
  • MODIFIED: make rdf(S,P,literal(xsd:string,V)) succeed on RDF 1.0 plain literals. Smoothing the path to RDF 1.1.
  • ADDED: icase as (preferred) synonym for exact for string matching.
  • ENHANCED: rdf_reset_db/0: also reset bnode identifier generation to create reproducible test results.
  • ADDED: Prepare expansion to deal with RDF-1.1
  • ENHANCED: rdf_equal/2 defined as (o,o).
  • Package xpce:
  • MODIFIED: PceEmacs: Deleted CHR syntax rules (have been moved to CHR package)

New in SWI-Prolog 7.3.13 Development (Dec 8, 2015)

  • ADDED: source_file_property(F, number_of_clauses(Count)). Also used for load/reload statistics to provide more sensible numbers.
  • ENHANCED: safe_goal/1: only keep the last error. Also use a global variable rather than a thread-local predicate to reduce fragmentation and eventually limit the computation to the stack size.
  • DOC: statistics/2: order keys alphabetically and add predicates to the docs.
  • PORT: Make MinGW installer generation work with libgcc_s_seh-1.dll as found in Ubuntu 15.10.
  • FIXED: Leave destruction of predicates to clause-GC to avoid pending clause GC to access the reclaimed predicate.
  • CLEANUP: Bind clauses directly to predicate definitions instead of using the Procedure proxy.
  • ADDED: source_file_property/2: properties reloading and load_count
  • ADDED: prolog_load_context(reload, true) to test whether a file is being reloaded.
  • FIXED: Safer destruction of predicates (avoid callbacks to access the predicate being destroyed)
  • PORT: Just using 'inline' results in undefined predicates using gcc 5.2.1
  • FIXED: Making small changes to dynamic predicates loaded from files could cause the index to miss clauses. Paulo Moura.
  • TEST: make small changes to dynamic predicate with clauses from files.
  • ADDED: Sandbox declarations to library(lambda).
  • Package archive:
  • ADDED: directory(+Directory) option for archive_create/3 This option can be used to simulate -C of tar in order to create archive in which all paths of files/dirs are relative to Directory.
  • Package pengines:
  • ADDED: Limit the time to proof goal safety.
  • Package pldoc:
  • FIXED: Avoid duplicate documentation reaching the end user.
  • FIXED: Avoid duplicate search results for sections from the manual.

New in SWI-Prolog 7.3.12 Development (Dec 8, 2015)

  • PORT: Fixed detection of profiler support for Windows.
  • FIXED: setting/4: detection that a setting is already defined does not work any more given the new recompilation strategy.
  • DOC: Add library(yall) to the standard documentation
  • DOC: library(yall): Move module documentation inside the module.
  • FIXED: Do not remove dynamic from thread-local predicates on reload.
  • TEST: Added reload tests to git.
  • ADDED: library(prolog_colour): support Lambda expressions.
  • FIXED: Autoloader: avoid ambiguity by calling import/1 as Name/Arity instead of passing the head.
  • ADDED: library(yall), providing Logtalk compatible lambda expressions. Sponsored by Kyndi, Inc, implemented by Paulo Moura.
  • COMPAT: Allow again for '$set_predicate_attribute'(P,A,1). This is an internal predicate, but is outside the core system. Would be better to have a documented set_predicate_property/2. Paulo Moura.
  • PORT: Compilation on 32-bit hardware
  • MODIFIED: *re*loading files now works incrementally rather than by wiping the old file and loading the new one. This allows for safely reloading files while their code is being executed by another thread. The changes may affect goal and term expansion that try to detect whether a predicate is already defined in the current context. This can now be achieved using predicate_property(Head, defined).
  • ENHANCED: library(apply_macros): use '$expand_closure'/3 for maplist/N, such that inlining maplist with a goal-expanded closure becomes possible. After discussion with Paulo Moura.
  • ADDED: $expand_closure'/3 to expand closure for e.g., maplist/N
  • TEST: Added test for interaction between clause GC and local stack shifts.
  • FIXED: lock predicate marking from stack shifts. Wouter Beek. This can be enhanced further by merely locking the reallocation of the stack as the pointer update related with the stack shift does not affect the data that is interesting to the predicate marker.
  • FIXED: Avoid crash on discontiguous clauses produced by compile_aux_clauses/2.
  • ADDED: library(persistency): db_sync(update) can now handle incremental updating in the case where file was extended with new journal facts. This allows one process to follow database changes performed by another process.
  • FIXED: reported stream position at end-of-file included the EOF char, getting one char and one byte too far.
  • DOC: CLP(B): Document clpb_residuals to obtain BDDs on the toplevel.
  • CLEANUP: pack_install/1: use application/x-prolog instead of text/x-prolog
  • FIXED: Possible race in markAccessedPredicates(). Wouter Beek.
  • ADDED: CLP(B): random_labeling/2, choosing a single random solution. If your code used the internal predicate random_solution/2, please replace the call by random_labeling/2.
  • FIXED: create_locale/3: raise existence error rather than assertion failure if a locale does not exist.
  • ENHANCED: Reimplemented reclaiming of dead clauses, sponsored by
  • SecuritEase. Consequences: - Clause GC now deals with both static and dynamic code. Used to deal only with static code, where dynamic code was handled using reference counting. This means:
  • Dynamic code is now (like static) executed without locking.
  • Reclaims dead clauses from running predicates.
  • Is now scheduled by retract/1 as well as *re-*loading sources.
  • Scheduled if too much memory is wasted or too often references to dead clauses need to be skipped.
  • Avoids possible crash in garbage_collect_clauses/0 in Windows.
  • Besides safety, this provides the necessary infrastructure for realising smooth *re-*loading of source files whose code is being executed in other threads and transactional updates of the Prolog database.
  • ENHANCED: Load toplevel enhancements (history, color) if-not-loaded.
  • FIXED: Over jealous compilation of functions on dicts.
  • FIXED: powm/3 function to check for values that cause GMP to raise an error. Wouter Beek.
  • FIXED: stream_property(-,-): avoid deadlock. Wouter Beek.
  • FIXED: existence_error(variable,'$variable_names') In var_property/…
  • FIXED: existence_error(variable,'$variable_names') In var_property/2 for newly created threads % [Thread 21] Got exception existence_error(variable,'$variable_names') (Ctx0=b_getval/2, Catcher=system:''/1)
  • FIXED: zero-argument term handling in compiler (broken with arity changes)
  • ENHANCED: efficient stream_property(-S, alias(+Alias)).
  • DOC: Updated stream_property/2.
  • FIXED: stream_property/2: safe enumeration of streams.
  • FIXED: Pre-validate very large arities when constructing a term.
  • ADDED: PL_unify_arg_sz() accepts size_t as first argument.
  • FIXED: PL_get_size_ex() to cover complete range and raise appropriate representation error.
  • FIXED: library(prolog_colour): prolog_colourise_query/3 may pick up wrong related source module.
  • DOC: How to handle size_t for arities
  • DOC: Document modified C APIs due to arity change from int to size_t
  • CLEANUP: Make libtai subdir compile cleanly using -Wconversion
  • FIXED: use size_t for arity of terms to avoid overflow.
  • FIXED: write_term/2,3: do not call the portray hook on [] if only blobs are to be portrayed. jedixb king.
  • CLEANUP: removed no longer used resetReferences()
  • FIXED: Retry import if another thread did the same.
  • INTERNAL: Updated hash-table API: - addHTable() does not overwrite the value associated with an existing key. - addNewHTable() is addHTable(), but prints a diagnostic message if the key is already in the table. - updateHTable() adds or changes the associated value.
  • STABILITY: clearing double inlined unification breakpoint from clearBreakPointsClause() can fail due to the random order in which the two breakpoints are deleted while traversing the hash table. This patch is related to
  • 5bbf0ad78b31715b6ff03c3bcf0b85930136b8b0
  • 42b7c2c0f3e6cfe1389a2b6ec499518ce71dac48
  • 81776453efe4157639e0eacce65dcb95111b3c77
  • STABILITY: atom_length/2: possible memory leak on long text. Also speeds up atom_length/2 on such objects.
  • ENHANCED: string_length/2 on long strings by avoiding copying the string from the stack.
  • STABILITY: Avoid integer overflow in recording terms with very long strings.
  • DOC: Removed duplicate documentation for PL_backtrace()
  • Package archive:
  • ADDED: library(archive): support writing archives.
  • Package bdb:
  • FIXED: Cleanup during Prolog shutdown could crash
  • ADDED: library(md5)
  • FIXED: Safer handling of abandoned memory files.
  • ADDED: library(http/http_digest) to provide dogest authentication, both for HTTP servers and clients.
  • ADDED: http_open/3 hook http:authenticate_client/2 to allow for challenge-response type of authentication using hooks.
  • FIXED: Properly close the Digest authenticate header.
  • ADDED: HTTPS support for the HTTP Unix daemon, using the new options --https, --certfile, --keyfile and --password
  • FIXED: link to HTTP package documentation
  • DOC: PlDoc typo.
  • FIXED: library(http/http_header) reply for authenticate with type digest. Now accepts a single atomic value for the entire Digest content. Used to be the Realm only, but that way you cannot formulate a valid digest challenge.
  • MODIFIED: library(http_authenticate): http_current_user/3 to return consistent data and document the return. First element of 3rd argument now is a string containing the password hash rather than a term hash(Hash).
  • FIXED: http_handler/3 using authentication(basic(File,Realm)) now adds user(User) to the request rather than plain User.
  • FIXED: Documentation of http_status_reply/[4,5]: moved_temporary/1.
  • FIXED: Documentation of http_status_reply/[4,5]: moved_temporary/1.
  • ADDED: http_open/3: option redirect(+Boolean) to control whether or not requests are redirected if a 3XX reply is received.
  • FIXED: http_open/3: max_redirect option was triggered one too early.
  • ADDED: library(http/http_error): log error message to user_error (stderr).
  • Package pengines:
  • FIXED: Make a pengine timeout if it cannot send its output for the applications idle_limit setting. Without, pengines may live forever if they are requested to output many messages that are never asked for.
  • Package pldoc:
  • ADDED: Allows title and class attributes to images.
  • PORT: Given the new reloading mechanism, we can no longer detect the the clause was already asserted.
  • FIXED: Map **...** via strong(...) to \textbf{...} for the LaTeX backend.
  • Package plunit:
  • PORT: Adjust for set_predicate_attribute changes
  • Package sgml:
  • FIXED: xsdp_subtype_of/2 would loop. [Nov 30 2015]
  • FIXED: xsdp_subtype_of/2 would loop.
  • Package space:
  • UPDATED: Arity types
  • Package ssl:
  • FIXED: avoid returning pointer to volatile password data (can crash)
  • DOC: ssl_context/3: documentation of pem_password_hook option.
  • Package xpce:
  • PORT: Fixed detection of XftNameUnparse.
  • PORT: Adjust for '$set_predicate_attribute'/3 changes.

New in SWI-Prolog 7.3.11 Development (Nov 10, 2015)

  • FIXED: '$break_pc'/3 to return the start and end of inline unification.
  • FIXED: '$break_at'/3 to deny setting a breakpoint on B_UNIFY_EXIT.
  • FIXED: Possibly deadlock when setting/clearing breakpoints on unification instructions. Matt Lilley.
  • ENHANCED: listing/1: more consistent handling of modules, especially wrt. autoloading. Douglas Miles.
  • CLEANUP: Now that (A;B) is expanded safely, we no longer need to take special measures for once(G) --> (G->true).
  • FIXED: Avoid expansion of (A;B) to introduce in or delete -> from the left-hand side. Abramo Bagnara.
  • FIXED: Avoid simplifying (X->Y),true to (X,Y). Abramo Bagnara and Paulo Moura.
  • ENHANCED: macro expansion for once/1. The new expansion avoids a choice-point and a warning if style_check(+var_branches) is used. Abramo Bagnara.
  • DOC: Document scoping issues with term-references that are written to.
  • MAINTENANCE: Fixed too strict consistency check that can result in a warning about a broken attvar which is normal during part of GC.
  • DOC: Explained pitfalls concerning (if->then). After discussion with Abramo Bagnara.
  • FIXED: library(persistency): define term_expansion/2 in system to make sure it works for Prolog packs and libraries.
  • ENHANCED: CLP(B): Emit warning if library(clpb) is used with bounded arithmetic.
  • FIXED: library(statistics): avoid thread dependencies.
  • FIXED: Define PL_get_thread_alias() for single-threaded version.
  • FIXED: single-threaded (--disable-mt) use of lockless atom/functor/htable structures
  • FIXED: use wrapped control functions when dealing with wrapped streams.
  • FIXED: Issue#85: configure --disable-mt
  • ADDED: library(sandbox): allow variant_hash/2.
  • DOC: Added section on debugging foreign code.
  • ADDED: PL_check_stacks()
  • FIXED: Declare '$filled_array'/4 safe, so library(nb_set) passes the sandbox tests again.
  • Package clib:
  • PORT: portable check for valid socket handle
  • FIXED: handle leak on Windows when shutdown sockets are not closed
  • FIXED: do not invalidate virgin sockets that can still be used
  • FIXED: Prolog threads may block after the wnd_proc socket thread processes a SOCKET error
  • DOC: uri_components/2.
  • Package cql:
  • ADDED: Support timestamp/7 term as concrete value.
  • FIXED: library(http/http_log): avoid that blobs reach the log file. Markus Triska.
  • DOC: as library(http/http_header) is now loaded by default, http_open/3 supports post and put methods by default. Markus Triska.
  • FIXED: Logging http_reply(Reply, ExtraHrds). Markus Triska.
  • ADDED: Actually check the methods option if provided.
  • ADDED: Document and collect method(+Methods) and methods(+Methods) option to http_handler/3.
  • ADDED: Generate 405 (Method not Allowed) page
  • DOC: Many documentation updates, mostly for the HTTP client libraries.
  • ADDED: http_get/3: almost compatible emulation of reply_header(-Fields) option. Markus Triska.
  • ADDED: Support bytes(Type, Bytes) for http_reply/2-5 and http_post_data/3.
  • CLEANUP: library(http/http_client) is now based on library(http/http_open), avoiding a lot of complicated code duplication and subtle inconsistencies. Unfortunately, I have little insight in the precise incompatibilities this introduces. I think the emulation is fairly complete after moving options http_open/3.
  • MODIFIED: Move post-data hook from post_data_hook/3 to http:post_data_hook/3.
  • ADDED: http_open/3 now accepts method(+Method) with Method both in upper and lower case. Reduces compatibility issues with http_get/3.
  • ADDED: http_open/3: option range(+RangeSpec) to complete the emulation of http_get/3.
  • MODIFIED: http_open/3 headers(-Headers) option now returns the headers as Name(Value) rather than Name-Value for compatibility with http_read_request/3.
  • DOC: library(http/http_open): updated intro
  • ADDED: http_open/3 option connection('Keep-alive') and a new predicate http_close_keep_alive/1.
  • ADDED: range_stream_open/3 option onclose(+Closure) to trap closing a range stream.
  • DOC: Issue#22: clarify http client libraries. Markus Triska.
  • MODIFIED: issue#21: http requests of the form .../path?hello used to be rejected with a 400 reply. Such requests are valid and now accepted with an empty search list. Raivo Laanemets.
  • Package odbc:
  • FIXED: SQL_TIMESTAMP_STRUCT fraction is in nanoseconds.
  • ADDED: Convert time-stamp to string if requested by the database.
  • Package swipl-win
  • ENHANCED: control swipl-win (Qt version) logging using the environment variable QDEBUG. If not set, be silent. If set to "stderr", log to the error stream, else log to the indicated file.
  • PORT: Keep using native menubar on MacOS.
  • FIXED: Use default colors if color (de)serialization fails. This seems to be the case on MacOSX. With help from Carlo Capelli.
  • FIXED: call setNativeMenuBar(false) to make the menu bar appear on Linux.
  • ENHANCED: swipl-win (Qt version, typically MacOS): use Qt color dialog rather than native (does not show pallette).

New in SWI-Prolog 7.3.10 Development (Nov 10, 2015)

  • FIXED: library(optparse): handling of type term.
  • ADDED: library(sandbox): char_code/2 is safe.
  • FIXED: Possibly non-termination of variant_hash/2. Wouter Beek.
  • FIXED: If . is used as infix operator, write it without quotes.
  • FIXED: variant_sha1/2 failed to distinguish sharing from non-sharing variables. Bug introduced with adding variant_hash/2. Added test cases. Edison Mera.
  • FIXED: dicts_slice/3.
  • DOC: Arity typo in library(iostream).
  • ADDED: thread_property/2: system_thread_id property to get access to the OS thread id of other Prolog threads.
  • ENHANCED: CLP(B): sat_count/2 now also works with universally quantified variables
  • ADDED: CLP(B): weighted_maximum/3, solving Boolean linear programs. This is a powerful predicate. I will soon post more about it on the list.
  • ENHANCED: library(prolog_source): avoid foreign dependencies. This makes really simple saved states independent from additional foreign libraries.
  • FIXED: possible crash while referencing partially-instantiated thread
  • FIXED: qsave_program/1,2: proper quoting of goal and toplevel options.
  • FIXED: Avoid saving system:'$loading_file'/3. Meaningless and contains a reference to a message queue.
  • FIXED: possible crash during program tear-down
  • FIXED: Tracer `retry' on previously skipped frame to retry the proper frame and avoid a crash. Use offset in local stack to communicate the retry frame to compensate for stack shifts.
  • FIXED: (gui) tracer callback from a redo in an if-then-else could reset variables, changing the execution of the program being traced.
  • MODIFIED: distinct/2 now runs on the new implementation of library(nb_set) and therefore on variant-testing (=@=/2). Performance is slightly degraded in some cases, but much improved if solutions are not randomly ordered.
  • MODIFIED: base library(nb_set) on hash tables rather than (unbalanced) trees. Tests indicate that using non-backtrackable primitives to implement balancing trees comes at a quite high linear overhead. Hash tables are simpler. Adding new terms to the set is now based on =@=/2 rather than ==/2. ==/2 is rather meaningless as the term is compared with a copy and therefore variables never compare equal.
  • ADDED: '$filled_array'/4 to quickly generate compound terms where all arguments have the same value. Used for hash tables. Such compounds are notably interesting when used together with destructive assignment (setarg/3 and nb_setarg/3).
  • ENHANCED: concurrent/3: use abort/0 to get rid of stale threads rather then the exception abort. This avoids that the exception is caught.
  • ADDED: variant_hash/2, a non-cryptographic version of variant_sha1/2.
  • ENHANCED: make [](...) a callable term again. Samer Abdallah.
  • DOC: break/0.
  • ENHANCED: Add lockless functor tables
  • Package clib:
  • FIXED: possible double-free when closing process pipes
  • FIXED: stream_property/2 can block on Windows when dealing with process pipes
  • ADDED: library(unix): access to sysconf()
  • Package http:
  • CLEANUP: Merged http_reply(Reply) and http_reply(Reply, ExtraHrds).
  • FIXED: consistent handling of connection in HTTP headers.
  • ADDED: http_reply_file/3 option headers, returning additional headers A new option "headers" is added to http_reply_file/3. This option is used to return additional HTTP headers. A typical use case is to give a hint to the client how to deal with the file using Content-Disposition (rfc2616 sec19.5.1).
  • FIXED: json_read_dict/2,3: raise exception instead of failing if the json is invalid.
  • FIXED: http_reply evaluates wrong predicate
  • FIXED: http_reply evaluates wrong predicate Fix #8. Instead of evaluating http_status_reply/5, it should evaluate http_reply/5 where backtracking will happen later.
  • Package pengines:
  • FIXED: Add chunk(integer) to predicate options of pengine_next/2.
  • FIXED: Avoid re-creating the pengine module if a pengine has already died, for example due to a timeout.
  • ENHENCED: Handle HTTP errors from Pengine.send(), .abort() and .pull_response().
  • TEST: Pass if uuid.so does not exist.
  • Package pldoc:
  • ENHANCED: Various changes to limit (backtracking) resolution of PlDoc annotation. Without, completely invalid text is processed really slowly.
  • Package semweb
  • FIXED: Avoid datetime="string" from getting both a type and a language classification. Wouter Beek.
  • CHANGED: Improved HTTP Accept header ordering for RDF + parse N3 as Turtle. In an HTTP Accept header order the RDF content types according to the following criteria: 1. RDF specific (e.g., `application/trig' over `application/xhtml+xml'). 2. RDF parser available (e.g., `text/rdf+xml' over `text/rdf+n3'). 3. Official/standardized (e.g., `application/turtle' over `text/turtle'). Further notice that:
  • JSON/JSON-LD is not included in the HTTP Accept header at all.
  • N3 is identified as `turtle'.
  • DOC: Declare more predicate options for read_rdfa/3.
  • FIXED: Issue#13: Warning: [Thread __rdf_tokenizer] Thread running "make_literal_index((0x7feb98024600))" died on exception: double_metaphone:double_metaphone/2: Type error: text' expected, found0' (an integer)
  • ADDED: rdf_persistency_property/1 to query the status of the persistent store.
  • Package xpce:
  • ENHANCED: Load gui tracer in pce thread.

New in SWI-Prolog 7.3.9 Development (Oct 13, 2015)

  • FIXED: X is Y+1 with Y unbound could crash when traced using a Prolog-defined debugger (graphical debugger or SWISH IDE) due to a wrongly created reference pointer for the explicit is/2 call.
  • FIXED: Colouring refused op(P,T,[]), which is not allowed in ISO, but is allowed in SWI-Prolog.
  • FIXED: write_term/2,3: Only call portray_goal option value on non-text blobs if blobs(portray) is used.
  • DOC: win_file_access_check flag.
  • MODIFIED: renamed win_file_security_check flag into win_file_access_check with the values access, filesecurity and openclose.
  • ADDED: library(dicts): dicts_join/3,4, dicts_slice/3. Deleted dicts_join/6, which can be replaced with dicts_join/4 and dicts_slice/3.
  • FIXED: Comparison operators wrt -0.0.
  • DEBUG: include the thread-alias and time stamp in an assertion-failure and fatal signal messages to simplify debugging.
  • DOC: Typo.
  • ADDED: library(dicts), providing (mostly) operations on lists of dicts.
  • MODIFIED: library(ugraphs): renamed transpose/2 to transpose_ugraph/2 to avoid confusion with transpose/2 as it is currently available from library(clpfd), which will probably be moved elsewhere. As library(ugraphs) is not used very much, we expect few compatibility issues. If you use transpose from library(ugraphs) and wish to remain compatible with older versions, use
  • :- if(\+current_predicate(transpose_ugraphs/2)). transpose_ugraphs(In, Out) :- transpose(In,Out). :- endif.
  • FIXED: crash when resizing hash-tables if another thread has partially inserted a record

New in SWI-Prolog 7.3.8 Development (Oct 3, 2015)

  • ENHANCED: Make file-load from menu verbose.
  • MAINTENANCE: Added MSG_READ_TOKEN debug topic to tract the Prolog tokenizer.
  • FIXED: PL_chars_to_term(): consistently `put' the output term rather then unifying for numbers and putting for general terms.
  • MAINTENANCE: Fixed compilation with O_DEBUG on Windows.
  • MODIFIED: access_file/2 on Windows: by default do not try to interpret the file security descriptor. This may now be enabled by setting the Prolog flag win_file_security_check
  • FIXED: Initialize threads to get LD in PL_set_prolog_flag() to allow calling this before PL_initialize().
  • CLEANUP: make O_PLMT available to packages through config.h.
  • FIXED: Uninitialised ht->cleanup
  • FIXED: #predicate statistics when using temporary modules
  • DOC: Document the behaviour of group_pairs_by_key/4 Originally, the documentation demanded that the first argument is a list of pairs sorted to the standard order of terms on the keys, an unnecessary limitation. Added an example of using the predicate together with the new sorting predicate sort/4.
  • PORT: Proper definition of MSB() for gcc on Win64 platforms. Can cause crashes when using dynamic arrays with over 2G entries.
  • FIXED: Avoid tracer to loop on 'w' on attributes that refer to the term itself. Eyal Dechter.
  • ADDED: Colour a query based on multiple (non-modular) programs.
  • ADDED: the Apache License 2.0 to the list of recognized licenses
  • ENHANCED: dif/2: Omit entailed residual goals. Ulrich Neumerkel, issue #15.
  • FIXED: Allocation issue in previous commit
  • FIXED: overflow handling in PL_recorded_external(). The reason for this patch was to allow reading old records, which was broken as reported by Samer Abdallah.
  • WORKAROUND: collation_key/2: buffer overrun in MacOSX Mavericks and Yosemite wcsxfrm(). Samer Abdallah.
  • ADDED: library(sandbox): atomic_concat/3, atomic_list_concat/2. reported by Jacco van Ossenbruggen.
  • PORT: Fixed issue in build.templ for MacOS HomeBrew. Samer Abdallah.
  • Package bdb
  • FIXED: compile error with libdb-4.x
  • FIXED: No longer include deleted "error.h". Paulo Moura.
  • PORT: Resolve uuid_t and UUID conflicts with Windows headers.
  • FIXED: Include to get O_PLMT and make library(memfile) thread-safe again.
  • PORT: Enabled compilation of memory files library for single-threaded. Patch by Roberto Bagnara.
  • MODIFIED: library(uri): encode ":" in query values. Samer Abdallah.
  • FIXED: tokenize_atom/2: detect only 0..9 as digits they are passed to the Prolog PL_chars_to_term() for conversion to number anyway and this only accepts ASCII digits. Avoids possible syntax errors from the subsequent read.
  • FIXED: PL_chars_to_term() performs a _put operation on the output. Actually, it was inconsistent, doing a _unify() for numbers and a _put for terms. Since 7.3.8, it always does _put.
  • FIXED: race condition trying to free pengine message queues and GC to reclaim abandoned queues because the client did not complete the protocol.
  • PORT: Set SDK on the Mac

New in SWI-Prolog 7.3.7 Development (Oct 3, 2015)

  • FIXED: Export PL_license() from libswipl
  • FIXED: Make PL_record_external() support dicts.
  • FIXED: Avoid printing "Re-ordering dict" (old debug print statement)
  • MODIFIED: PL_record_external() format changed to accommodate functors with Unicode names and [](arg ...).
  • MODIFIED: make del_min_assoc/4 and del_max_assoc/4 fail on the empty assoc. This patch also fixes the broken change for del_assoc/4, commit c5128fbffca644c6c3c2883d41c998dcc3e68e2f.
  • FIXED: Maintenance of attvar chain in recorded database if an attributed variable appears in multiple locations of the term. Reported by Eyal Dechter.
  • DEBUG: Enhance infrastructure for checking data consistency. Check for attributed variables not in the attvar chain in checkData().
  • DOC: typo. Julio Di Egidio
  • MODIFIED: del_assoc/4 is now semidet as the documentation already stated, i.e., it fails if the key does not appear in the input assoc. Consistent with SICStus avl_delete/4 and YAP del_assoc/4. Reported by Roberto Bagnara.
  • PORT: HomeBrew was also used when not selected.
  • PORT: Added db60 subdirs to include and lib to build with BerkeleyDB interface
  • PORT: Added build option for Homebrew users
  • ADDED: Package bdb to default distro setup
  • MODIFIED: open_string/2 now avoids changing ISO-Latin-1 strings to UTF-8. This means the stream has iso_latin_1 or utf8 encoding, depending on the content of the original string. This patch also fixes a memory leak when called in (invalid) mode (+,+).
  • DOC: CLP(B): Add text and example for universally quantified variables.
  • ENHANCED: CLP(B): Fuse residual goals that share the same variables.
  • ENHANCED: CLP(B): Variable separation in residual goals, if possible.
  • ENHANCED: CLP(B): In residual goals, atoms denote input parameters.
  • ADDED: CLP(B): Universally quantified variables, written as atoms.
  • DOC: Fixed function arity copysign/1 --> copysign/2.
  • FIXED: PC admin during exception unwinding. Initially fixed in 33c661dca59ba3c007348533bd3e4687585c9e7a, but this fix proved wrong. The actual fix properly setting PC during unwinding and reset ARGP to avoid `new' arguments in GC. Copied from the already correct debugging version of this loop.
  • MODIFIED: Do not call goal expansion on M:G, where M and G are both unbound. Edison Mera.
  • FIXED: Avoid problems if CiaoGoal is module qualified with a variable
  • FIXED: Avoid problems if CiaoGoal is module qualified with a variable
  • MODIFIED: display/1,2 is now mapped to write_term/2,3 using the options quoted(true) and ignore_ops(true). Before, quoted was not set to true.
  • FIXED: Do not emit a space before a '(' if the character before is a punctuation character. Used to be non-space.
  • FIXED: subsumes_term/2 failed if constraints remained on the second argument after the (temporary) unification. Andreas Pierrou.
  • FIXED: library(sandbox) to accept call_with_inference_limit/3 and call_with_depth_limit/3. Markus Triska.
  • DOC: typo in string_predicate/1 usage example
  • DOC: typo in string_predicate/1 usage example
  • FIXED: possible htable corruption when destroying mutexes
  • FIXED: possible crash when dealing with an invalid socket on Windows in wait_for_input/3
  • ADDED: prolog_load_context(term, Term), providing the term being expanded for the goal_expansion/2 hook.
  • FIXED: possible memory leak if thread-exit goals are deep cyclic terms
  • FIXED: format/3: emit multiple adjacent tabs. Eyal Dechter.
  • ENHANCED: Rewriting min-max-witness templates to use constant space.
  • ENHANCED: warning when TMP and/or TEMP environment variables point to an illegal directory location
  • FIXED: make_directory_path/1 fails when you try to create a directory that ends with a '/'.
  • ADDED: library(sandbox): safe declaration for call_with_time_limit/2.
  • FIXED: http_get/3 and http_post/4 when using a proxy. Reported by Samer Abdallah.
  • ADDED: http_open/3: post(prolog(Term)) to post a Prolog term using Content-type: application/x-prolog.
  • ADDED: http_read_data/3 now supports "Content-type: application/x-prolog"
  • ADDED: Support POST for /pengine/send
  • DOC: max_errors/1 default value was reported as being both 50 and 100. DOC: Documented that options of load_structure/3 are passed to sgml_parse/2.
  • FIXED: Typo in value for option declaration.
  • FIXED: Documentation typo.

New in SWI-Prolog 7.3.6 Development (Aug 26, 2015)

  • FIXED: numbervars/3,4: crash when given a negative start. New code implements this properly and raises a representation_error(tagged_integer) if the generated integers are out of range.
  • CLEANUP: Types for numbervars
  • DOC: CLP(FD): Introduce and use the term "core relation". Translation of "Kernrelation" (German), used in Ulrich Neumerkel's excellent GUPU system.
  • DOC: Some PlDoc comments in library(quintus).
  • FIXED: Flag stream in error state if an exception was raised while operating on it.
  • ENHANCED: CLP(FD): Fewer attributed variables in call_residue_vars/2.
  • DOC: CLP(FD): New section about optimisation.
  • ENHANCED: CLP(FD): Avoid residual variable for all_different([]).
  • FIXED: possible crash when accessing unallocated memory after PL_canonicalise_text()
  • ENHANCED: aggregate_all/3: implement min(X) and max(X) using constant space.
  • DOC: Clarified confusing \quote. Jochem Liem.
  • DOC: Fixed mode of parse_url/2.
  • ENHANCED: Rewriting sum(X) template to use nb_setarg/3 in constant space.
  • FIXED: clp(fd) goal expansion for explicitly qualified goals, as in clpfd:in(A,B).
  • ADDED: library(sandbox): file name manipulation primitives.
  • ADDED: library(sandbox): string_lower/2 and string_upper/2
  • FIXED: CLP(FD): Apply goal expansion only if the CLP(FD) predicates are visible in the load context
  • ADDED: Sandbox listing/1 if argument is not qualified.
  • ADDED: --disable-mt configure option.
  • DOC: Deal with \log{N}.
  • ENHANCED: library(www_browser) has been cleaned and updated.
  • ENHANCED: debugger: while skipping, possibly created threads are started in nodebug mode.
  • FIXED: www_open_url/1 tried `firefox -remote openURL(...)`, which is no longer supported.

New in SWI-Prolog 7.3.4 Development (Jul 13, 2015)

  • ADDED: library(prolog_breakpoints): set_breakpoint/5 to manage breakpoints in included files.
  • ADDED: Maintain included-file info for data included using the :- include(stream(...)). syntax.
  • FIXED: Dict keys could not be quoted (e.g., _{'file':"x.pl"}).
  • FIXED: Issue#19: wrong space requirement calculation for GC under call_residue_vars/2 causes an assertion failure.
  • MODIFIED: set libswipl SONAME to major.minor instead of major.minor.micro. This allows SWI-Prolog to be upgraded in a major.minor series without having to relink external binaries
  • FIXED: Possible crash when using :- include() into a temporary module because the notion of the file's current procedure is not reset after loading a file.
  • PORT: Test for mp_bitcnt_t and typedef to `unsigned long` if it is not defined.
  • ADDED: safe_goal/1: support built-in functions on dicts
  • Package archive:
  • FIXED: make sure closing the parent still works if the archive is closed and later the (open) entry.
  • FIXED: if an archive is left open, it will be closed by dieIO(), but the order in which the entry stream and archive stream are closes is undefined. We avoid closing the archive stream if it is already closed.
  • Package http:
  • CLEANUP: http_read_json/2,3: detection of JSON content type now uses http_parse_header_value/3.
  • MODIFIED: http_read_data/3 using the option to(string) now actually produces a string (used to return an atom).
  • DOC: http_read_request/2: broken example.
  • Package jpl:
  • FIXED: Running test suite with Prolog embedded in Java
  • Package pengines:
  • FIXED: pengines.js: set the pengines id on onoutput, so we can handle output (error messages) from the create.
  • DOC: Fixed first Pengine example. Unavailable server and singleton warnings may scare new users off.
  • DOC: Corrected spelling mistake.
  • Package pldoc:
  • ADDED: multifile hook doc_autolink_extension/2
  • Package semweb:
  • FIXED: Possible deadlock while deleting literal values. Broadcasting the died triple may cause a query, which in turn may cause a scan_exit() which can delete literals. Broadcasting is now done outside the locked area and destruction is delayed until the broadcast completes.
  • FIXED: Possible data corruption in RDF store while destroying literals.

New in SWI-Prolog 7.3.3 Development (Jun 18, 2015)

  • FIXED: library(sandbox): avoid errors when used in a saved state.
  • FIXED: qsave_program/2: save the ISO property
  • FIXED: resort nested dicts when loading from a .qlf file or saved state
  • ENHANCED: Stop directory components from %PATH% holding 0-bytes to provide a more graceful degradation. 0-bytes appear frequently in Windows %PATH% variable if it is long.
  • FIXED: Garbarge collection error if GC is called from the frame cleanup handler of I_DEPART. This happens for `watched' frames created by e.g. catch/3, call_cleanup/2 and the debugger. The old code causes get_vmi_state to fail finding the pushed new arguments. Thanks to Keri Harris for creating a reproducable case for this.
  • PORT: MacOS: Pick up Brew version of libreadline if Macports version is not available.
  • DOC: Update to `Positioning SWI-Prolog'
  • FIXED: Possibly crash in just-in-time indexer in the presence of a breakpoint.
  • FIXED: Issue#15 (dif/2).
  • FIXED: thread-safe management of break-points. Resizing of the break table might be responsible for "No saved instruction for break" system errors in SWISH.
  • TEST: code_type/2: systematic test for consistency of mode +,- and -,+
  • FIXED: char_type(X, digit(V)) must return X = '0', V = 0.
  • TEST: Added second (still failing) test for dif/2.
  • FIXED: Avoid DOS CRLF translation for e.g., format(atom(X), 'a\n', []).
  • ADDED: PL_foreign_context_predicate() to find the predicate that is executing a foreign function.
  • ENHANCED: CLP(B): More readable residuals for variable equality and disequality.
  • FIXED: safe declaration for call_residue_vars/2
  • ADDED: CLP(B): random_solution/2, uniformly picking a single solution. This is not yet part of the public API, as we first collect experience and feedback with the new interface. The first argument is the seed, the second is a list of CLP(B) variables. Please let us know if you have any input. Usage example: ?- sat(X+Y), clpb:random_solution(13, [X,Y]). %@ X = 1, %@ Y = 0.
  • Package http:
  • DOC: http_open/3: document the use of the status_code(-Code) option for talking to REST APIs.
  • Package jpl:
  • PORTABILITY: Add -target 5 -source 5
  • BUILD: Ensure "make clean" and "make" actually rebuilds the .class files.
  • Package odbc:
  • TEST: Automated test suite invocation based on SQLite.
  • Package pldoc:
  • DOC: Styling of argument tables in main manual.
  • Package semweb:
  • PORT: inline fetch() was miscompiled by Apple's gcc/llvm
  • DOC: rdf_set_predicate/2: documentation clarified.
  • FIXED: delay the destruction of graphs until all triples have gone.
  • ADDED: Garbage collect destroyed graphs.
  • FIXED: Possible access to a freed literal can cause registering a new literal to crash. This fix also cases the broadcast request that a literal is freed to be called outside the locked region.
  • Package ssl:
  • ADDED: Prolog flag system_cacert_filename to define the location of the system's trusted SSL certificates.
  • PORT: Configure location is system wide root certificate file. Based on https://mercurial.selenic.com/wiki/CACertificates
  • PORT: Test whether kSecClass of the MacOS security framework is provided.
  • Package zlib;
  • DOC: typos

New in SWI-Prolog 7.3.2 Development (Jun 4, 2015)

  • PORT: find XQuartz pkgconfig in /opt/X11/lib/pkgconfig
  • FIXED: call_residue_vars/2: forget attvars on backtracking, even if they are trapped by a global stack freeze.
  • ENHANCED: dif/2: Early failure in obvious cases.
  • Previously:
  • ?- time((between(1,1000000,_),dif(X,X))). %@ % 9,000,001 inferences, 0.328 CPU in 0.329 seconds (100% CPU, 27452419 Lips) %@ false.
  • Now:
  • ?- time((between(1,1000000,_),dif(X,X))). %@ % 2,000,003 inferences, 0.082 CPU in 0.082 seconds (100% CPU, 24351378 Lips) %@ false.
  • DOC: call_residue_vars/2: updated for new implementation.
  • TEST: test attribute change in call_residue_vars/2
  • TEST: Unblock attvar GC tests
  • ENHANCED: call_residue_vars/2: avoid full scan of global stack.
  • FIXED: Crash on exit if an event hook is used and the system is setup to reclaim all memory.
  • FIXED: `A is ` can cause a crash due to trail or global
  • (attribute wakeup) overflow that is not checked.
  • FIXED: string_code(I, "", C) succeeded with IC0.
  • FIXED: cross-referencer handling of comment links. Caused PlDoc to consider predicates undocumented if multiple predicates were documented in the same comment.
  • FIXED: notrace/1: pass on exception to make sure timeouts and similar exception keep working.
  • DOC: getbit/2 function.
  • ADDED: function getbit/2 to get a bit from a (large) integer
  • DOC: Documented round/1 function behaviour and the fact that this is not ISO compliant.
  • FIXED: swipl-ld no longer accepted .qlf files. Sandro Martin.
  • MODIFIED: assertion/1 simply re-throws time_limit_exceeded and '$arborted' exceptions. Eyal Drechter.
  • ADDED: nth_integer_root_and_remainder/4.
  • ADDED: divmod/4, computing quotient and remainder of integer division.
  • TEST: call_residue_vars/2: also block GC test without explicit GC as this may fail as well.
  • TEST: call_residue_vars/2: Block GC test.
  • BUG: call_residue_vars/2: document problems with avoiding GC of attvars.
  • CLEANUP: Add sanity checks for choice point passed to '$attvars_after_choicepoint'/2
  • CLEANUP: Delete '$get_choice_point'/1 as this is the same as prolog_current_choice/1.
  • FIXED: absolute_file_name/3: possible race condition that causes files to be reported as non-existent while they do exist. Wouter Beek.
  • MODIFIED: file_directory_name('/hello/', D) now yields D == '/hello' (was D == '/'). Clarified documentation as well. Wouter Beek.
  • ENHANCED: Add hook that allows additional Prolog types to be parsed when given as command-line values.
  • ENHANCED: Allow all types defined by error:has_type/2 to be used in defining command-line options.
  • DOC: Generate page index for PDF manual.
  • PORT: README.mingw: make SSL point to 1.0.2-latest. Nicos Angelopoulos.
  • PORT: README.mingw: make libXpm accessible again. Nicos Angelopoulos
  • DOC: CLP(B): labeling/1 always succeeds at least once and is therefore of mode multi. In fact, an additional property holds: As long as labeling/1 leaves choice-points, there are also additional solutions. This property is theoretically pleasing; the practical importance is less clear though.
  • CLEANUP: No longer print "Resetting list constructor to ./2" when using --traditional
  • ADDED: -- and ++ modes
  • Package clib:
  • ENHANCED: Support instantiation (-,+,+) for relative_file_name/3.
  • Package http:
  • FIXED: http_post/4 without a proxy left a choice point and raised an error on backtracking.
  • ADDED: library(http/jquery), providing centralized access to jquery.
  • FIXED: Make library(http/http_client) work again with new http option and proxy infrastructure.
  • Package pengines:
  • INSTALL: There are no more .js files in examples/web
  • CLEANUP: Avoid redistributing jquery.js for running the tests.
  • CLEANUP: Use jquery from CDN rather than local filesystem to avoid lots of jquery copies
  • FIXED: pengines.js: Pengine.send() did not scope variable, causing a possible mixup of identity if multiple pengines are used.
  • FIXED: term_to_json/2,3: translate json([Name=Value, ...]) to a JSON object again.
  • Package pldoc:
  • ADDED: Manual view: link to sources.
  • ENHANCED: PlDoc now includes a link to the source if it is not possible to show an edit link.
  • FIXED: Make install fails due to the missing jquery dependency
  • FIXED: Make install fails due to the missing jquery dependency (Introduced in commit 6660b872998abb68c629c5e768da60b7eb738af3.)
  • CLEANUP: Avoid relying on our own copy of jquery
  • DOC: clarify doc about PlDoc predicate templates.
  • ADDED: PlDoc: support ++ and -- instantiation types. After extensive discussion on the list.
  • Package semweb:
  • FIXED: Possible failure in building the stem index if literals do not use the lexical form.
  • DOC: Improved documentation of rdf_extra_headers/2.
  • Package sgml:
  • FIXED: load_structure/3: handling of the encoding(Enc) option.
  • Package xpce:
  • PORT: Try to find XQuartz if AC_PATH_X has failed.
  • FIXED: reply_image/2 for Windows. Broken because pce_open/3 now opens editors as text rather than binary.
  • TEST: Make test robust for file_directory_name/2 change.

New in SWI-Prolog 7.3.1 Development (May 26, 2015)

  • BUILD: Updated build.templ
  • BUILD: Possibly work around a MacOS issue wrt. concurrent building.
  • DOC: Document semidet of aggregate_all/3,4. Compatible with SICStus. Kilian Evang.
  • INSTALL: Use new swipl.nsi
  • FIXED: set_stream_position/2: exception on invalid position term. Paulo Moura (by means of the Logtalk test suite).
  • TEST: Added quasi quotation tests
  • FIXED: Make sure exception returned from quasi quotation parser remains valid.
  • FIXED: callProlog(): make sure exception term handle remains valid.
  • MODIFIED: open/4 raises a permission error if the provided alias is already in use. Raised by the Logtalk test suite.
  • ISO: current_op/3: raise domain_error(operator_priority, Pri) if the first argument is not in the range [1..1200]. Logtalk test suite.
  • FIXED: syntax error in toplevel is repeated hitting RETURN.
  • FIXED: ERROR: Syntax error: Unexpected `,' before `[|]' must be "before .".
  • Package clib:
  • DOC: Missing instantiation in mode.
  • Package http:
  • DOC: http_open/3: typos and outdated stuff.
  • FIXED: Actually make the proxy option work again. Samer Abdallah.
  • FIXED: http_open/3: return results through options if a proxy is used. Samer Abdallah.
  • FIXED: http_open/3: make explicit proxy option overrule the socket:proxy_for_url/3 hook. Needed for backward compatibility, but seems to be a good idea anyway.
  • FIXED: We must report HTML errors as exceptions to make quasi quotations work.
  • Package jpl:
  • DOC: Add PlDoc to package docuemntation
  • Package semweb:
  • FIXED: RDF HTTP plugin: perform detection of of "not modified" using the status_code(-Code) option rather than checking the exception. Fixes loading RDF through a proxy.
  • Package ssl:
  • PORT: It is not be possible to fetch the Apple root certificates if the system is not compiled with an Apple compiler because vanilla GCC cannot compile because this is using Apple's ^block extension.
  • FIXED: HTTPS server: avoid leaking a socket if the SSL negotiation fails.

New in SWI-Prolog 7.1.37 Development (Apr 23, 2015)

  • ADDED: library(sandbox): import_module/2.
  • ADDED: library(settings): declare setting/2 is safe.
  • FIXED: pack_install/1 with dependencies tried to install dependencies as the main pack.
  • ADDED: library(iostream) to act as broker between libraries that create streams and those that use them.
  • FIXED: CLP(B): Avoid unintended failure with Boolean second argument
  • of sat_count/2 in some cases. A query like: ?- sat(A*B + C*D), clpb:sat_count(~A * ~D, C). failed unexpectedly, because unifying C prematurely triggered propagation in a state of BDDs that is not prepared for this. With this commit, the query is made equivalent to: ?- sat(A*B + C*D), clpb:sat_count(~A * ~D, Count), Count = C. thus succeeding with: A = B, B = 1, C = 0, sat(D=:=D).
  • DOC: open/4 create option (LaTeX error)
  • ADDED: library(error): uninstantiation_error/1.
  • [Apr 18 2015]
  • INSTALL: support ./prepare --server=http://us.swi-prolog.org
  • [Apr 17 2015]
  • DOC: function atan2/2: document ISO C99/POSIX discrepancies.
  • [Apr 16 2015]
  • FIXED: on text-streams with with less than 4 bytes at_end_of_stream/1
  • may succeed immediately due to BOM detection. Logtalk test suite.
  • FIXED: Var =.. [f(a)] must raise a type error. Logtalk test suite.
  • CLEANUP: Simplify cleanup after an exception.
  • FIXED: If no GC is wanted after an out-of-stack, we must re-enable the spare stacks.
  • FIXED: Overflow handling in put_dict/3.
  • FIXED: Handle exception term-handle properly in can_unify().
  • [Apr 15 2015]
  • FIXED: Various issues wrt exception term-references
  • FIXED: pthreads from winpthreads library may not retain win32 thread handle; instead use OpenThread() to obtain handle
  • TODO: Construct an actual case where this matters.
  • ENHANCED: CLP(B): Stronger propagation. This is a generalisation of the previous reasoning which was only applied for the topmost branching variable.
  • As a result, branching variables that are deeper in the BDD are now also instantiated when they can only assume a single value.
  • FIXED: Must close the frame after raising the exception. Otherwise the term handle holding the exception is invalidated.
  • ENHANCED: Try various emergency measures instead of terminating the process if an exception cannot be raised due to space limitations:
  • If it is an error(Formal, ImplDefined), try raising without ImplDefined. 2. Try raising error(resource_error(stack), global))
  • abort.
  • Package archive:
  • PORT: Support libarchive version 2 again. Cannot read 7zip files.
  • Package clib:
  • DOC: example in uri_is_global/1
  • FIXED: raise error before invalidating the term.
  • Package http:
  • ADDED: library(http/http_open): hook into open_any/5.
  • MODIFIED: html//1: do not include a newline before the and tags. is included in the layout rule set. Boris Vassilev
  • Package jpl:
  • TEST: Pass boot file and home to run test suite in Linux build environment
  • CLEANUP: Use %p for printing pointers in debug messages.
  • PORT: Use %I64d format for Win64
  • PORT: Drop -source 1.4 and -target 1.4
  • Package pldoc:
  • CLEANUP: Handle /pldoc/package/ consistently.
  • Package semweb:
  • FIXED: rdf_register_prefix/2 now guarantees that prefixes that are prefix of each other are properly ordered.
  • PORT: Use strchr() rather than index()
  • FIXED: TriG parser: the last statement in a wrapped graph does not need to be followed by a '.'. Wouter Beek.
  • Package sgml:
  • MODIFIED: load_html/3 now by default passes the max_errors(-1) and syntax_errors(quiet) options.
  • ADDED: library(sandbox) integration to allow parsing XML and HTML documents.
  • DOC: library(sgml) module documentation updated
  • ENHANCED: use library(iostream) to load ?ML files for a larger variety of inputs.
  • Package xpce:
  • ENHANCED: Show choice-points nested inside hidden predicates. Wouter Beek.

New in SWI-Prolog 7.1.36 Development (Apr 14, 2015)

  • DOC: CLP(FD): Extended information on search and enumeration predicates.
  • FIXED: Do not generate clause-references for temporary clauses for meta-calls: these would point to the stack that may shift or be discarded. Affects prolog_frame_attribute(Frame, clause, Clause).
  • ENHANCED: Avoid discontiguous message when an async event interrupts the compilation.
  • MODIFIED: message term for discontiguous predicates from discontiguous(Pred) to discontiguous(Pred, Current). Implemented a more informative error message.
  • FIXED: PL_unify_term() handling of _PL_PREDICATE_INDICATOR
  • DOC: CLP(FD): New section about domains.
  • FIXED: emitting exceptions from the debugger hook
  • FIXED: '$break_pc'/3: return after B_UNIFY_EXIT for inlined unification. Fixes setting breakpoints on inlined unification.
  • FIXED: Reading from deleted breakpoint structure.
  • FIXED: destroy_module/1: reading from freed structure.
  • FIXED: Off-by-one error in bitvector allocation. Can mess up sourcefile admin.
  • FIXED: destroy_module/1 must call freeClause() to reclaim breakpoints and unregister atoms.
  • DOC: Updated Unix man page
  • FIXED: VMI support for cyclic module qualifications and tests.
  • FIXED: Raise a type error on cyclic module-qualifications. Used to loop.
  • DOC: CLP(FD): Enhance introductory section.
  • FIXED: Source information for inline unification.
  • ADDED: prolog_clause:open_source/2 hook to get source info from clauses that are not loaded from a normal file.
  • ADDED: In Ciao dialect, the following features where implemented:
  • Support for initialization in sentence translations, passing 0 as first argument at the beginning. - Support for finalization in goal translations, passing end_of_file as goal at the end.
  • FIXED: arg/3: accept attributed variable as first argument. Michael Hendricks.
  • ADDED: Deal with exceptions raised in the tracer hook.
  • FIXED: thread pools: possible race condition in the hook create_pool/1. The infrastructure now guarantees that the hook will be called only once per pool.
  • ENHANCED: CLP(FD): More elegant residual goal of scalar_product/4. Ulrich Neumerkel, i3a#291.
  • FIXED: pack_install/1 with a directory argument.
  • ENHANCED: CLP(FD): Stronger propagation in cumulative/[1,2]. All examples from Ulf Nilsson's excellent "Logic, Programming and Prolog (Supplement)" now work with SWI-Prolog. The supplement is available from: https://www.ida.liu.se/~TDDD08/misc/clpfd.pdf and requires only minimal changes (domain/3 etc.) for SWI.
  • ADDED: CLP(FD): disjoint2/1, describing non-overlapping rectangles.
  • FIXED: git/2 and git_process_output/3, git_describe/3: guarantee the git process is reclaimed on errors.
  • FIXED: library(git): closing streams on errors.
  • Package clib:
  • FIXED: deal with cyclic module qualification
  • FIXED: Possible non-termination in memory_file_line_position/4.
  • FIXED: memory_file_line_position/4 in mode +,+,+,-
  • ENHANCED: stream_info/1: send all output to current_output rather than part to current_output and part to user_error.
  • Package http:
  • FIXED: deal with cyclic module qualification
  • FIXED: When using en encoding filter, the original output was no longer closed.
  • Package pengines:
  • ADDED: hook pengines.prepare_goal/3 that allows for additional application and option dependent pre-processing of a goal.
  • ADDED: Pass arbitrary additional options through Pengine.ask()
  • CLEANUP: Option processing for Pengine.ask(query, options)
  • CLEANUP: pengines.js, send()
  • ADDED: Setting debug_info at the application level to make a pengine keep the source code to facilitate source-level debugging.
  • FIXED: Accept a destroy event while waiting for input
  • FIXED: pengine_destroy(P, [force(true)]) raised exception. Since pengines abort cleanly, we no longer need to (can) join.
  • Package semweb:
  • FIXED: deal with cyclic module qualification
  • Package sgml:
  • FIXED: deal with cyclic module qualification
  • Package ssl:
  • FIXED: deal with cyclic module qualification
  • Package xpce:
  • FIXED: Do not open PceEmacs error hits on empty error message.
  • FIXED: deal with cyclic module qualification

New in SWI-Prolog 7.1.35 Development (Apr 3, 2015)

  • FIXED: xref_source/1: processing include/1 did not close the file.
  • REVERT: Clearing skip-level in trace interception kills the GUI tracer 'finish' action
  • ENHANCED: prolog_xref/1: more careful processing of included files.
  • ENHANCED: xref_source/1: normalize paths of included files
  • ENHANCED: library(prolog_source): be more careful to cleanup, even in case of bad source files.
  • ADDED: prolog_trace_interception/4: action up
  • FIXED: sync behaviour of intercepted trace actions with commandline debugger (management of skip-level)
  • FIXED: Debugger: turn 's' on ports except call and redo into a proper creep.
  • ADDED: library(sandbox): abort/0
  • ADDED: library(sandbox): declare abort/0 as safe.
  • FIXED: pack_install/1: human message for mismatches between package from file name and pack.pl.
  • FIXED: Issue#42: pack_install/1 from versioned directory name.
  • FIXED: --traditional if atom table was initialized before calling PL_initialise(). This is the case for the Windows version.
  • ADDED: library(sandbox): sort/4 is safe.
  • Package http:
  • TEST: http_open/3: fetching the error case would also pass the test
  • FIXED: If we have a proxy we must send the whole request, otherwise the part behind the authority
  • FIXED: http_open/3 put full URL after the GET rather than the plain request_uri.
  • Package pengines:
  • ADDED: library(pengines_io): pengine_io_predicate/1 to inspect the predicates that are being redefined by this library.
  • ADDED: allow termination of a pengine from the pengine itself using abort/0.

New in SWI-Prolog 7.1.34 Development (Mar 30, 2015)

  • ENHANCED: Use new sort/4 to implement order_by/2 more efficiently.
  • TEST: library(solution_sequwnces): more tests.
  • DOC: sort/4
  • ADDED: sort/4: support dicts for sorting
  • ADDED: sort/3, providing more flexible sorting. Compatibility with ECLiPSe.
  • ENHANCED: library(sandbox): unambiguously detect clauses that execute their body in a different module and consider the (implicit) cross-module call that results from this safe (sandboxes do not allow to compile such clauses).
  • SECURITY: library(sandbox): clause/2 could be used to extract private information from other modules.
  • ADDED: clause_property/2: module(M) property to unambiguously detect we are dealing with a cross-module clause.
  • FIXED: vm_list(ClauseRef)
  • FIXED: Issue#39: apply given options for installing dependencies.
  • FIXED: set_stream/2 operations on stream pairs that should apply to both streams resulted in a permission error.
  • FIXED: Add iso property to phrase/2,3.
  • FIXED: format_time/3: crash if time is given as date(Y,M,D).
  • SECURITY: safe_goal/1: DCG meta calling was not verified correctly.
  • FIXED: CSV writing: Emit fields holding newlines as quoted
  • FIXED: Issue#38: pack_install/1: out-of-range replies to menus.
  • FIXED: Be more careful while deleting source file structures.
  • ADDED: sub_atom_icasechk/3 declared safe.
  • ADDED: Several extensions to pack_install/2, making it useable for non-interactive usage. New option silent(true) silent information
  • FIXED: offset/2: condition was the wrong way around.
  • Package clib:
  • FIXED: Issue#40: delete_directory_and_contents/1 and delete_directory_contents/1 no longer recurse into symbolic links but simply delete the link.
  • DOC: Moved documentation for library(socket) to PlDoc
  • Package http:
  • TEST: Added test_proxy.pl
  • ADDED: Proxy implementation
  • FIXED: http_open/3: Map non-redirect status to exceptions again. This used to be the case, but was broken in a recent patch.
  • Package penginesL
  • DOC: fixed location of pengines.js.
  • FIXED: pengine_debug/2.
  • Package semweb:
  • TEST: Indirect dependency on HTTP foreign libraries
  • ADDED: rdf_delete_literal_map/1
  • FIXED: make stem(X) imply case(X)
  • ADDED: Define sparql_query/3 as safe
  • Package sgml:
  • FIXED: Attr = Value handling in xpath.
  • Package space:
  • TEST: Fix indirect dependency on http foreign libraries
  • Package ssl:
  • ENHANCED: Allow starting an HTTPS server at an OS-chosen free port

New in SWI-Prolog 7.1.33 Development (Mar 23, 2015)

  • ADDED: library(sandbox): time and date primitives are safe.
  • DOC: writeln/1, writeln/2
  • FIXED: Make pack locations volatile
  • FIXED: Make pack locations volatile A machine that runs a saved state may have a different file system layout than the one which built the saved state.
  • BUILD: By default concurrent make with 4 jobs
  • Package http:
  • FIXED: Emitting cookie path option (must be as token).
  • FIXED: Properly emit parsed Content-Disposition field value. Generalised the code for emitting parsed header fields.
  • Package nlp:
  • ADDED: Declare metaphone and snowball as sandbox-safe.
  • Package pengines:
  • ADDED: broadcast major events from HTTP access to allow logging experiments.
  • ADDED: Reply to HTTP OPTIONS request to properly support CORS
  • FIXED: pengine_create/3: cope with possible redefinition of listing/1 in the target module.
  • Package semweb:
  • MODIFIED: rdf_find_literals/2: remove stopgaps from query.
  • ADDED: rdf_stopgap_token/1 and a setting stopgap_threshold for rdf_set_literal_index_option/1.
  • FIXED: Implemented rdf_current_literal/1 for partial literals.
  • FIXED: stem and metaphone index should not timeout and if multiple threads want this index they should wait for each other. The real indexing is now performed on a separate thread to allow for timeout on the thread that wants the index.
  • FIXED: rdf_current_literal/1 with partial instantiated argument.
  • ADDED: rdf_find_literal/2
  • ENHANCED: library(rdf_litindex): Use snowball stemmer with the appropriate language for stemming tokens.
  • ADDED: Allow literal map query predicates in sandboxed queries.
  • FIXED: rdf_process_ntriples/3 would fail in case the format option was not explicitly set.
  • FIXED: rdf_process_ntriples/3 would fail for stream input because init_state/3 would not be able to set the prefix option.
  • FIXED: rdf_retractall/3,4 did not enforce lang or type restriction.
  • Package sgml:
  • ENHANCED: Allow the specifiers upper_case and lower_case to be applied to attribute values in xpath/3.
  • Package ssl:
  • FIXED: Added forgotten free_X509_crl_list() function

New in SWI-Prolog 7.1.32 Development (Mar 7, 2015)

  • DELETED: R-project interface. Replaced by ?- pack_install(r_session).
  • DOC: documented PL_set_prolog_flag()
  • VERSION: Updated OpenSSL for MinGW to 1.0.2
  • FIXED: Make xref open source hook also work for included files.
  • ENHANCED: More structured hooking of directive sandboxing
  • SECURITY: Tightened sandboxed including of files.
  • SECURITY: Sandboxed loading does not deny cross-module assertions.
  • FIXED: exceptions may be considered uncaught if they are caught by an outer environment using PL_Q_CATCH_EXCEPTION.
  • CLEANUP: Avoid dependency of library(charsio) and library(codesio) on the memfile library from the clib package.
  • ADDED: open_string/2 to open a string (or any text representation) as a (text) stream.
  • ADDED: read_term_from_atom/3 now also accepts lists as input. Fixed this predicate to protect against GC if the input is not an atom.
  • ENHANCED: Translating an error term to a message may now contain either the internal stack representation or a string. This simplifies printing stacks for remote (pengine) servers.
  • ADDED: Allow strings in cells for CSV output
  • ENHANCED: csv_write_stream/3: type check on data argument
  • FIXED: function expansions of arguments to arguments of meta-arguments works just fine.
  • ENHANCED: more precise errors in labeling/2, all_distinct/1 etc. (i3a#314).
  • DOC: Updated link to paper on quasi-quotations.
  • DOC: library(solution_sequences) after comments by Jacco van Ossenbruggen.
  • Package clib:
  • FIXED: Previous patch for escaping : escaped :port in normalization. Now, : is only escaped in the path section.
  • Package http:
  • ADDED: http_open/3: new option headers(-Headers) Make all HTTP response headers available to callers that want it.
  • ADDED: http_open/3: new option version(-Major - -Minor) Make the HTTP version of reply available to callers who want it.
  • ADDED: http_parameters/3 now accepts the type specifier string
  • DOC: html_receive//2 after note
  • EXAMPLE: Avoid dependency on xpce
  • FIXED: Make sure user options are preferred over default options.
  • ADDED: second argument of http_server/2 is now module sensitive to accommodate module sensitive arguments for the ssl(_) option. Should not affect working programs.
  • FIXED: library(http/thread_httpd): generalised plugin hooks to facilitate SSL better. Also requires updated library(http/http_ssl_plugin) from ssl package.
  • ADDED: http_server_property(Port, scheme(Scheme)) to register HTTPS servers. Many enhancements to the documentation of the threaded HTTP server library.
  • FIXED: Avoid "Functions are not (yet) supported for meta-arguments of type 1"
  • MODIFIED: Hook http:open_options/2 to allow for multiple solutions that are merged. This allows for example for a hook that adds a proxy as well as a hook that adds an SSL certificate database.
  • ADDED: http_open/3: autoload library(http/http_ssl_plugin) when available and the requested scheme is https
  • Package pengines:
  • ADDED: Provide variable names to output handler if create contains an ask.
  • ADDED: The HTTP /pengine/create API now also accepts www-form-encoded name/value pairs. This simplifies interaction from scripts.
  • ENHANCED: If an error contains a stack, translate it to a string before sending to the client. The client cannot do that because the raw stack dump refers to clause references and other blobs that are only known in the server.
  • ADDED: hook pengines:write_result/3 to write completely different output output formats.
  • Package semweb:
  • DOC: Enhanced docs for rdf_process_turtle/3.
  • Package sgml:
  • FIXED: Declare all the values supported by option dialect of load_structure/3.
  • Package ssl:
  • ADDED: Prolog flag ssl_library_version, holding the current version of the OpenSSL library.
  • TEST: test 11 depends on tricky stuff that do not appear to work ok on MacOS 10.8. Disabled the test if the certificate was not generated correctly.
  • PORT: Use autoconf rather than versions to find OpenSSL features.
  • TEST: Added a large number of plunit tests for certificate checking
  • ADDED: verification of the target hostname
  • MODIFIED: Raise exceptions from the RSA encrypt/decrypt predicates, merged documentation of these predicates into one block.
  • ADDED: rsa_ encrypting/decrypting predicates to accept an encoding argument
  • MODIFIED: Certificate hash and signature and hexadecimal strings now
  • MODIFIED: rsa_* en/decrypt predicates now return strings.
  • ENHANCED: more consistent key representation
  • FIXED: We must specify the session ID if we allow client certs or we get SSL_GET_PREV_SESSION at SSL_accept if the client asks to resume a session
  • TEST: Public/Private key encrypt/decrypt roundtrip
  • MODIFIED: Key representations now return big integers as hexadecimal strings rather than atoms to improve security. Also generalised unification and recover implementation
  • DOC: fix description of error term
  • TEST: PlUnit based testing for SSL
  • DOC: Many documentation enhancements.
  • FIXED: Sharing X509_STORE holding the system root certificates between contexts appears to be impossible because freeing the context frees the store as well, regardless of whether we increment the reference count. Now we assemble the certificates in a list and create a fresh store for each context. Should be possible to avoid this copy, but doubt this is the case in the current OpenSSL version.
  • ADDED: Allow for a string for options with textual value.
  • MODIFIED: If a client provides a certificate and a key, send it, regardless of whether cert(true) is given.
  • CLEANUP: Types, keep private stuff private, lazily load the root certificates.
  • MODIFIED: The SSL context is no longer a term '$ssl'(), but simply a blob (Pointer).
  • PORT: Compatibility with OpenSSL 1.0.2
  • CLEANUP: Pass pl ssl instance to ssl_inspect_status instead of both the ssl and instance.
  • PORT: Handle ERR_remove_thread_state()/ERR_remove_state() using autoconf
  • TEST: Fixed module issues in test_ssl.pl
  • FIXED: ssl_exit/1 should close the associated socket if the old interface is used.
  • ENHANCED: Tidy up (much of the) error handling
  • DOC: Document that ssl_negotiate/5 does not close the plain streams.
  • FIXED: Close streams after failed SSL negotiation.
  • DOC: Document rsa and key predicates
  • MODIFIED: Always call cert_verify_hook if present, also if cacert_file verified the certificate ok.
  • MODIFIED: Accommodate modified http/thread_httpd API
  • DEMO: Added demo that deals with client certificates.
  • DOC: ystem_root_certificates/1, ssl_peer_certificate/2.
  • ADDED: ssl_peer_certificate/2
  • FIXED: Free peer certificate from the context if we requested this.
  • MODIFIED: ssl_session/2 now uses strings to communicate its sensitive information.
  • DOC: Migrated SSL library documentation from LaTeX to PlDoc.
  • ADDED: cert_accept_any/5 for conveniently accept any certificate
  • ADDED: Fetch certificates for OSX. Also fixes a memory leak(?) in Windows.
  • CLEANUP: ssl_context/3: remove host, port and reuseaddr options. They were no longer used.
  • DOC: Also on Windows we provide the OpenSSL dlls. On MacOS and Linux these are part of the dependencies and thus also present.
  • MODIFIED: Loading library(http/http_ssl_plugin) now causes http_open/3 to pass the option cacert_file('SYSTEM'), triggering loading the OS default set of trusted root certificates.
  • ADDED: Make cacert_file('SYSTEM') load /etc/ssl/certs/ca-certificates.crt if this file exists and we have no more specific algorithm for the OS.
  • ADDED: Allow for cacert_file('SYSTEM') to load trusted certificate from the OS using OS specific functions. Currently only implemented for Windows.
  • Package xpce:
  • FIXED: ->ispell can hang on empty strings.

New in SWI-Prolog 7.1.31 Development (Feb 20, 2015)

  • ADDED: Make library(solution_sequences) predicates known to xref
  • ADDED: library(sandbox): normalize_space/2
  • FIXED: Memory leak in PL_canonicalise_text() when converting long UTF-8 strings to canonical form.
  • ADDED: Support Unicode input in PL_canonicalise_text(). Needed by peek_string/3, which now crashes on such input.
  • ADDED: library(sandbox): $btree_find_node'/3 to support library(nb_set).
  • ADDED: library(sandbox): allow when/1. Markus Triska.
  • DOC: library(solution_sequences) added to manual.
  • ADDED: library(solution_sequences), providing the common database keywords for changing the enumeration of solutions.
  • ADDED: prolog_colourise_query/3: support module(Module) argument instead of a plain SourceID
  • ADDED: thread_create/3: option debug(Boolean) to create threads in nodebug mode.
  • Package clib:
  • MODIFIED: uri_encoded/3 now always encodes ":" as ":". This is not needed for absolute URIs, but if a URI is relative, "hello:world" is interpreted as an absolute URI with scheme "hello". Amer Abdallah.
  • Package http:
  • DOC: Deprecate http_location_by_id/2 in favour of http_link_to_id/3 after discussion on the list.
  • FIXED: Case handling of HTML5 Quasi Quotations. Requires updating library(sgml) as well.
  • DOC: Added the status codes that are supported by http_reply/[2-5] and http_status_reply/[4,5].
  • ADDED: Hook http:bad_request_error/2 to simplify returning 400 error pages from HTTP handlers.
  • ENHANCED: Reply with 400 to a malformed HTTP request header. Used to be 500. Wouter Beek.
  • Package pengines;
  • FIXED: Allow goal expansion to re-interpret Module:Goal for Pengine queries.
  • ENHANCED: Pass errors from /pengine/create to the error handler or display an alert.
  • Package pldoc:
  • ADDED: PlDoc: detect `{prolog} as verbatim fence (GitHub compatibility).
  • Package semweb:
  • FIXED: library(semweb/rdfa): avoid functions as arguments to meta-predicates.
  • ADDED: rdf_flush_journals/1: option graph(Graph). Some cleanup and remove persistent file when creating a database for an empty graph.
  • ENHANCED: try a bit harder to detect xhtml by looking for xmlns:
  • FIXED: If we are called from rdf_load/2, the stream is binary. We must do BOM detection.
  • FIXED: Properly pass transaction depth to monitor hook.
  • ADDED: Various sandbox declarations
  • Package sgml:
  • ADDED: case-preserving processing of enumerated attribute values. This is needed for html5 quasi quotations
  • Package xpce:
  • ENHANCED: Exception editor: no not handle exceptions from nodebug threads. Also fixed generalization of existence_error(Type, Instance) errors and added generalization of syntax errors.
  • ENHANCED: Create pce thread in nodebug mode.

New in SWI-Prolog 7.1.30 Development (Feb 10, 2015)

  • ADDED: library(base64): base64url//1.
  • ADDED: library(base64): base64url/2 to deal with Base64URL encoding and decoding.
  • ENHANCED: Try to avoid terminal state switching and provide full support for setting the Prolog flag tty_control. Avoiding the terminal state switching now allows running Prolog jobs as background processes without using the -tty flag. Roberto Bagnara.
  • FIXED: ls(non_existing).
  • FIXED: closeFiles() now prints an error on exceptions and clears the exception. There is no place to throw it to as we are terminating the system.
  • FIXED: Detection of the event hook in user. Andreas Becker.
  • FIXED: source_file_property/2: reported load context file. Andreas Becker.
  • MODIFIED: No longer unload foreign libraries explicitly at halt. Foreign libraries that registered a blob type cause the type pointer to point to nowhere. Explicitly unloading is no longer needed on modern OSes anyway. There is a new flag unload_foreign_libraries that can be set to true to get the old behaviour.
  • FIXED: pack installation for GitHub releases Trying to install a pack whose releases are hosted on GitHub was failing with errors like "ERROR: V0.9.0.zip: A package archive must be named -." When downloading a release from GitHub, store it locally using the proscribed naming convention.
  • ADDED: git/2: askpass(+Program) option.
  • Package archive:
  • ADDED: archive_open/3: Added predicate_options declaration
  • ADDED: library(archive): archive_data_stream/3, providing access to the data in nested archives. Wouter Beek.
  • ADDED: support processing 7zip files if the stream can be repositioned.
  • Package http:
  • ADDED: library(http/http_openid): hack that allows to mix non-OpenID quick-login buttons with OpenID ones.
  • ADDED: http_convert_parameters/2,3 to perform extraction and type checking on already obtained lists of parameter values. Can be used to try multiple parameter configs on the same (posted) data.
  • ADDED: Support passing additional arguments to OpenID servers. Needed to acknowledge Google's OpenID shutdown
  • Package pldoc:
  • ENHANCED: Make -... only negate the search if ... starts with a letter or digit.
  • Package semweb:
  • FIXED: discard rdf_retractall/3 inside a nested transaction.
  • FIXED: Turtle an ntriples format must allow for whitespace around @ and

New in SWI-Prolog 7.1.28 Development (Dec 19, 2014)

  • ENHANCED: Better fix for abort issue under Windows.
  • ENHANCED: persistency library now uses setup_call_cleanup/3 for more safety against errors while writing a new copy.
  • FIXED: Issue#7: aborting sleep/1 from tracer does not stop prematurely.
  • FIXED: fix for reading the character with code 0 from text streams that do not use a UTF-8 based locale. Patch by Fabrizio Riguzzi.
  • FIXED: Possible undetected overflow in code_type/2 which can cause a fatal stack overflow.
  • FIXED: Determinism in xref_public_list/3.
  • ADDED: set_stream(Stream, encoding(bom)) to ask the stream to look for a BOM marker right here. This is useful for dealing with embedded text objects.
  • FIXED: Avoid that illegal UTF-8 input results in negative characters. This can cause crashes.
  • CLEANUP: load_files/2 to use new error infrastructure of boot system.
  • DOC: Documented load_files/1.
  • DOC: |/2 is no longer a predicate and some more summary fixes
  • FIXED: Several issues with predicate_property(M:X, visible).
  • FIXED: Attempt to perform meta-argument expansion for locally defined non-meta predicates that are also available as globally defined meta-predicates.
  • DOC: get_dict/5 cleanup after comments from Wouter Beek.
  • PORT: Fix for os/pl-rc.c dependencies. Abramo Bagnara.
  • Package http:
  • FIXED: mailbox management inside CDATA elements. Jacco van Ossenbruggen.
  • CLEANUP: library(http/http_client). Documentation, removed dead code, enhanced error handling.
  • ADDED: library(http/http_multipart_plugin), providing a new framework for processing multipart/form-data content.
  • ADDED: http_parse_header_value/2 can now parse Content-Type fields into a term media(Type/SubType, Params).
  • ADDED: library(http_stream): multipart_open/3 and multipart_open_next/1 implement a stream filter that translates a multipart file (using a boundary) into a series of independent streams.
  • FIXED: Colourising html//1: attributes allow for Fmt-Args.
  • FIXED: html//1, PceEmacs coloring: leave ./2 to general classification (dict functins). Wouter Beek.
  • Package pengines:
  • ADDED: Pengines.stringify(data) to turn javaScript objects into meaningful Prolog representations.
  • ADDED: Pengine handlers now pass their context both in this and as first argument to their function. I think we should deprecare the use of this to make room for passing the Pengine as this.
  • FIXED: Errors from expand_goal/2 caused ask to a pengine not to be answered.
  • Package pldoc:
  • FIXED: Declare prolog:url_expansion_hook/3 as multifile.
  • FIXED: PlDoc, prolog:url_expansion_hook/3 handling. Matt Lilley.
  • ADDED: Hooks doc_url_expansion/3 and prolog:doc_wiki_face//2, which allows for extending the wiki notation processing. Contributed by Matt Lilley.
  • ADDED: prolog:doc_is_public_object/1 to include documentation objects into the default view of PlDoc. Matt Lilley.
  • CLEANUP: Avoid some warnings from PlDoc for processing the HTML manual.
  • Package sgml:
  • ADDED: pwp-file as new option for pwp:how to provide processing of nested PWP files
  • ADDED: apply substitution of c(..)c variables to CDATA content of ..
  • SECURITY: SGML/HTML/XML quoted write: possible buffer overflow when writing (illegal) character entities.
  • Package ssl:
  • FIXED: conditionally support different EVP_KEY types. (Some versions of OpenSSL do not support patent-encumbered EVP key types).

New in SWI-Prolog 7.1.27 Development (Nov 28, 2014)

  • DOC: explain error conditions of nb_* predicates.
  • ADDED: library(sandbox): declare copy_term/3 safe. Markus Triska.
  • ADDED: library(sandbox): get_attrs/2 and term_attvars/2 are safe.
  • MODIFIED: removed (undocumented) attribute_goal/2 hook, making attribute_goals//1 the only way to project attributes Previously, attribute_goal/2 was supported (though never documented and therefore not used anywhere) as well. Experience has shown that the DCG version is the only interface that is needed in practice. It also leads to more elegant code when several goals are produced.
  • FIXED: Disable atom-gc during PL_cleanup() to avoid calling hooks into foreign libraries that may be unloaded.
  • FIXED: Issue#5: format_time/3, %I, %l and %r: actually use 1..12 instead of 0..11, OskarSigvardsson.
  • FIXED: in wrap_meta_arguments/5, the hash should be generated using the full argument list and not only the extended ones.
  • CLEANUP: Placed common parts to compile auxiliary clauses in the predicate compile_ancillary_clause/2.
  • Package http:
  • ADDED: hooks that allow for dynamic management of the HTTP worker pool size.
  • ENHANCED: More human friendly error messages from http_parameters/2,3.
  • DOC: http_parameters/2,3 updated.
  • ENHANCED: Raise an error when trying to use http_parameters for the second time on POST data.
  • ENHANCED: http_parameters/2,3: error handling. Errors from http_parameters (missing parameter, wrong type) are now mapped to "400 Bad Request", the message is more informative and also if library(http/http_error) is loaded, the stack trace is omitted. After all, these are not server errors.
  • MODIFIED: Now uses existence_error(http_parameter, Name) rather than existence_error(form_data, Name).
  • SECURITY: Ensure that declared CDATA elements (script, style) cannot contain their end-tag. The script content must ensure this based on features of the scripting language. The library(http/html_write) verifies that this is done and throws a domain_error(cdata, String) if this is not the case. This should probably be a representation_error, but representation errors cannot provide the context :-(
  • MODIFIED: This patch also processes the content of script and style tags as if written as \[Content]. The processing of raw data is extended to include all relevant parts of regular HTML content that are meaningful for CDATA elements.
  • SECURITY: Ensure that strings in JavaScript and JSON that contain

New in SWI-Prolog 7.1.26 Development (Nov 10, 2014)

  • FIXED: Configuration of readline cleanup when receiving a signal. Matt Lilley.
  • FIXED: nb_rb_get_node/3: avoid arg/3 on ''. Jacco van Ossenbruggen
  • MODIFIED: Catch most signals and call PL_exit_hook() functions before killing ourselves with the same signal. Extended the set of `crash' signals that cause the system to print a stack-trace.
  • DOC: removed no-longer-relevant section on SIGSEGV handling.
  • FIXED: Provide error messages for, as yet, not-supported function expansion for meta-arguments.
  • FIXED: renamed extend_pos/2 and extend_pos/3 to extended_pos and made it reversible, as required by remove_arg_pos/7.
  • ADDED: goal_expansion/2,4 now applies to meta arguments with specifiers greater than zero.
  • ENHANCED: CLP(FD): Faster in/2 for integer in ground L..U range. Ulrich Neumerkel. Example, previously:
  • %?- N=500000, time((between(1,N,_), 3 in 1..10,false)). %@ % 17,000,001 inferences, 2.423 CPU in 2.436 seconds (99% CPU, 7014808 Lips) %@ false.
  • Now:
  • %?- N=500000, time((between(1,N,_), 3 in 1..10,false)). %@ % 1,000,003 inferences, 0.165 CPU in 0.170 seconds (97% CPU, 6076534 Lips) %@ false.
  • ENHANCED: Swap order of tests to speedup xref_defined/3 and xref_module/2
  • ENHANCED: CLP(FD): Faster sum/3 and scalar_product/4 when the lists contain only integers, further reducing the need for sumlist/2.
  • FIXED: colourise_query/3: handling empty string.
  • ENHANCED: Use double-linked lists for keeping track of counting mutexes. Avoids quadratic behaviour e.g., abolish/1 of many dynamic predicates. Abramo Bagnara.
  • CLEANUP: Counting mutex implementation: Use inline functions for better readability, use a 64 bit int for counting locks.
  • FIXED: possible crash when multiple threads are marking predicates
  • ADDED: library(sandbox): unify_with_occurs_check/2.
  • FIXED: Possible crash when using thread_signal() to a thread that performs a local stack shift.
  • ADDED: Limit the program space usage per module. See set_module/1 and module_property/1.
  • DOC: Document preparing MinGW compilation wrt. GCC thread libraries.
  • FIXED: setup_call_cleanup/4: Avoid superfluous calling of the cleanup handler because FR_WATCHED is set by the debugger or frame inspection. Matt Lilley.
  • Package clib:
  • FIXED: rootJob must be a global variable.
  • FIXED: process.c did not compile on Windows.
  • MODIFIED: Kill processes on exit/crash of Prolog unless they are detached. Put detached processes in a process group. Added process_group_kill/1,2. Matt Lilley.
  • FIXED: memory file manipulation on UTF-8 sequences.
  • MODIFIED: library(memfile), providing memory based buffers and streams. The implementation has changed considerably, although it remains compatible for typical use cases. Summary: - Handles are now reserved symbols (like streams, etc.), providing safety against double removal, memory corruption, etc. Memory files are now also subject to GC. - The API is now thread-safe. - open_memory_file/3 now supports the modes append, update and insert.
  • New predicates have been added to:
  • Get the content as a string
  • Insert and delete text anywhere in the buffer
  • Get a range of characters as a string.
  • With these changes memory files provide the functionality to maintain a mirror of the SWISH editor needed for code analysis. This avoids the need for XPCE to run SWISH and avoids the single-thread limitation of XPCE.
  • Package http:
  • ADDED: js_expression//1 to convert a dict into a JSON object. This allows passing dicts into javascript quasi quotations with the expected result.
  • Package pengines:
  • ADDED: Use new memory limitation feature of SWI-Prolog.
  • Package semweb:
  • FIXED: rdf_literal_value/2. Github issue#2, Honnix.
  • Package sgml:
  • FIXED: html_write/2, Avoid escaping in and in HTML documents.
  • FIXED: Accept a string as CDATA in mixed content elements

New in SWI-Prolog 7.1.25 Development (Oct 20, 2014)

  • ADDED: library(sandbox) declaration for findnsols/4,5.
  • MODIFIED: predicate_property(++P, visible) now also succeeds for `hidden' $-predicates. Hidden predicates are skipped when generating visible predicates.
  • FIXED: library(sandbox) handling of findall/4.
  • FIXED: propagate errors from promoteToFloatNumber(). Before, some arithmetic operations that imply conversion to floats of rationals (including integers) that are outside the IEEE double float range could give an incorrect result.
  • ENHANCED: group_pairs_by_key/2 now also works for variable keys.
  • CLEANUP: Avoid -fsanitize runtime error in MPZ-->int64 translation (not really an error). Abramo Bagnara.
  • FIXED: retractall/1 on reserved (ISO) predicates. Paulo Moura.
  • FIXED: Throw error on retractall(3). Paulo Moura.
  • FIXED: thread_get_message/1,2: avoid leaking term-references if waiting is repeatedly interrupted. This might be an important reason for crashes in long running servers. It surely is a bug.
  • FIXED: In ciao emulation, new_declaration/1 is modular, therefore declaration/2 should also record the module.
  • ADDED: library(sandbox): support *->, findnsols/4 and findnsols/5.
  • ADDED: library(sandbox): declare copy_term_nat/2 as safe.
  • PORT: Fix Cygwin build machinery Revert SOLIB for Cygwin to "lib", install into the arch specific lib and bin subdirs. In other words, install just as on any other UNIX system. Drop the Cygwin-specific "cygpl.dll" name for the shared lib since it's only used from within the SWI-Prolog installation dirs anyway. This allows to get rid of YA special case for Cygwin in configure.in, and it's more in line with all other platforms.
  • With these changes, I can build a functional SWI-Prolog installation for Cygwin which also correctly loads the package modules now (not a safe bet before since I neglected to notice a build error with my patches from last year).
  • ADDED: library(sandbox): allow for :- style_check/1.
  • INSTALL: MinGW: fixed lacking dependency, causing concurrent make to fail. Roberto Bagnara.
  • ADDED: library(sandbox): support freeze/2.
  • FIXED: term_string/3: Crash when reading comments using comments(-Comments) option.
  • ADDED: library(sandbox): allow for use_module/2 (under restrictions).
  • Package clib:
  • ADDED: prctl/1 to library(unix) to control core dumps on setuid programs under Linux.
  • Package cql:
  • INSTALL: DESTDIR was used twice
  • Package http:
  • MODIFIED: library(http_unix_daemon): re-enable core dumps on Linux systems after changing UID/GID.
  • Package pengines:
  • FIXED: Handle died and existence_error(pengine, Id) to update our admin of living pengines.
  • ADDED: add a field projection:list-of-variable-names to JSON output if the template is left unspecified. This is needed to support natural tabular output.
  • ADDED: hook pengines_io:binding_term//3 to overrule the HTML rendering of a binding or residual goal.
  • Package semweb:
  • ADDED: sandbox declarations of library(semweb/rdf_litindex).
  • FIXED: Prefix expansion for ?- rdf(S,P,literal(Query,Value)).
  • ADDED: sparql_client: accept text/turtle as Turtle media type. Samer Abdallah.
  • FIXED: ntriples parser: possible out-of-bounds array access can crash.
  • Package xpce:
  • ENHANCED: abort() if trying to report "out of memory" runs out of memory.

New in SWI-Prolog 7.1.24 Development (Oct 9, 2014)

  • FIXED: trace: skip on retry of previously skipped goal showed the same port twice. Kilian Evang.
  • ADDED: Package CQL
  • ADDED: prolog_colourise_stream/3 to pick the module context from the cross-referencer.
  • ADDED: xref_source/2: option module(Module) to specify the default context.
  • FIXED: Also use skippedVar() for optimized == and \==.
  • FIXED: https://github.com/SWI-Prolog/swipl-devel/issues/17: GC crash on optimized unification.
  • ADDED: library(sandbox): declare term_hash/2,3 and variant_sha1/2 as safe.
  • DOC: Improve some summary strings
  • FIXED: Colour handling of floating point numbers.
  • MODIFIED: findnsols/4,5: - generate a domain error if N < 0. - be deterministic if Goal leaves no choice while chunk is complete.
  • Allow for dynamically changing the chunk-size.
  • CLEANUP: Several details around findnsols/4,5.
  • FIXED: Now precision specifier in write_formatted/2 and related predicates is not ignored.
  • MODIFIED: library(prolog_colour): provide file with autoload classified predicates.
  • ADDED: library(prolog_colour): prolog_colourise_query/3 to emit semantic colours for a query that is to be executed in a given context.
  • ADDED: open/4: create(+AccessList) option to create a new file with specified modes.
  • FIXED: Do not try to interpret an unset as a term position
  • FIXED: git_shortlog/3: non-determinism
  • ENHANCED: Provide start position of not-terminated quoted material.
  • ENHANCED: library(sandbox): error message if format is not used correctly.
  • XREF: library(main): define that main/0 calls main/1
  • FIXED: Make sure autoloading preserves the notion of current procedure.
  • ADDED: hook safe_meta_predicate/1 for simple cases.
  • ADDED: CLP(B): Support for +(List) and *(List) syntax, denoting multi-argument disjunctions and conjunctions. This syntax is useful in very many CLP(B) tasks. Suggested by Gernot Salzer.
  • FIXED: Bad replacement in safety of call_cleanup/2. Now also supports setof/3 and bagof/3.
  • ADDED: JSON output: serialize #(Text) terms as a string. This allows us to use atoms for strings in the `dict' mode.
  • MODIFIED: serve_files_in_directory/2 now using the static_gzip(true) when sending files.
  • ADDED: http_reply_file/3, option static_gzip(+Boolean) to make the server look for a not-older .gz file and send that if the server accepts gzip encoding.
  • ADDED: http reply gzip_file(Type, File), sent with Content-encoding: gzip
  • ENHANCED: Add error for swapped arguments in http_404/2.
  • ADDED: Improved support for reading and writing HTTP status codes.
  • All codes that should be read according to RFC 7231 can now be read. This used to be only the most commonly used ones. Codes that are not explicitly defined are reduced to their x00 class code (as per RFC 7231).
  • Status codes that are read are now also returned in http_get/3 and http_post/4 by option status_code (consistent with http_open/3).
  • All legal codes (RFC 7231) can now be written. In addition, all codes within the 2xx range are interpreted as conveying a reply that is 'ok'.
  • Package pengines:
  • ADDED: HTTP/JSON interaction now includes a time field, containing the CPU time used to compute the result. This is included in the success and failure events.
  • FIXED: Pengines display/1 emulation.
  • ADDED: pengine_next/2: chunk(Count) option to midify the chunk-size on the fly.
  • Package semweb:
  • FIXED: The RDFa parser would not recognize Processing Instructions (PIs) as valid parts of XML documents (throwing a type error).

New in SWI-Prolog 7.1.23 Development (Sep 22, 2014)

  • XED: sandboxed meta built-ins with non-meta arguments.
  • ADDED: statistics/2 keys epoch and process_epoch
  • ENHANCED: threads/0, join_threads/0: use print_message/2. Output of threads now includes time and stack usage.
  • ENHANCED: Make statistics/0 use print_message/2 and added statistics/1, returning a dict carrying the same information and thread_statistics/2.
  • ENHANCED: Modernised library(shell), so we can use it in unrestricted SWISH shells for administrative tasks.
  • ADDED: library(sandbox): Support ^ and // meta-arguments
  • MODIFIED: prolog_load_context(term_position, Pos), now returns a '$stream_position'/4 term with real info in all fields rather than a '$stream_position'/5 where all info except for the line count was fake.
  • ENHANCED: provide precise location through prolog_load_context/2 term_position.
  • ADDED: library(pprint), providing the term pretty printer that is used by the graphical debugger for normal Prolog usage.
  • ADDED: Allow colouring of goals written as {...}.
  • FIXED: Safe directive checking
  • ADDED: load_files/2: sandboxed(true) to ensure we cannot assert clauses with other modules.
  • ADDED: Auto-load library(sandbox) if [sandboxed(true)] is used with load_files/2.
  • ENHANCED: library(sandbox): various issues with safe directive checking.
  • ENHANCED: Simplify clp(fd) goal_expansion output. Avoids compiler warnings about trivially true or false goals and speeds up non-optimized programs.
  • ENHANCED: CLP(FD): Use newly available var_property/2 to avoid "Test is always true: var(...)" warnings.
  • ADDED: library(sandbox): code_type/2, char_type/2 and others are safe.
  • ADDED: library(prolog_colour): support for user-provided colouring of dicts.
  • FIXED: use_module/1 did not import from module files that define additional modules (e.g., by defining unit tests inside the file). Wouter Beek.
  • FIXED: expand_goal/7 position information in clause that process the module was incorrect
  • FIXED: Crash on e.g. format('~*f',[-5, 100 rdiv 3]). Mike Elston.
  • ENHANCED: library(sandbox): do not examine pure Prolog facts.
  • SECURITY: sandbox handling of format/2.

New in SWI-Prolog 7.1.22 Development (Sep 11, 2014)

  • ADDED: library(sandbox): allow using :- op/3 in directives, provided the declaration is not qualified.
  • FIXED: variant_sha1/2 for indirect datatypes (big ints, strings, floats). Samer Abdallah.
  • ADDED: var_property/2, providing information about a variable for goal_expansion/2.
  • DOC: Updated operator table. Markus Triska.
  • ENHANCED: CLP(B): Improved taut/2 when the second argument is instantiated.
  • DOC: ~ is not an operator. Markus Triska.
  • FIXED: set_breakpoint/4: avoid exception if layout information is only partially available.
  • FIXED: Possible crash in dict_ordered()
  • ADDED: library(sandbox): current_op/3 is safe.
  • ENHANCED: CLP(B): Better support for large conjunctions in sat/1.
  • FIXED: Allows tagging directives with a source location. Patch by Edison Mera.
  • FIXED: Terms expanded to '$source_location'(_,_):Clause should consider the case when Clause is further expanded to a list. The predicate expand_terms/5 in expand.pl was modified to handle such situation correctly.
  • ENHANCED: CLP(B): Earlier release of internal association tables, reducing the library's peak memory consumption.
  • FIXED: Compilation of terms expanded to '$source_location':Clause in term_expansion was failing when Clause was a list. The predicate '$clause_source'/4 in init.pl was modified to handle such situation correctly.
  • ENHANCED: CLP(B): More compact internal node representation.
  • ADDED: Allows installing packs from GitHub releases. These are names https://github.com///archive/[Vv].zip.
  • DOC: Updated section on PrologScript.
  • ENHANCED: CLP(B): Various changes that improve space and time efficiency: Nodes can now be shared between BDDs and are represented more efficiently. This allows some shortcuts when fusing BDDs. Intermediate results are also stored more compactly. Tables are now stored per variable for faster access.
  • ENHANCED: library(sandbox): Allow b_setval/2 and b_getval/2 when the first argument is instantiated.

New in SWI-Prolog 7.1.21 Development (Sep 11, 2014)

  • DOC: CLP(B): Add example for sat_count/2.
  • ADDED: CLP(B): sat_count/2, counting the number of true assignments.
  • ENHANCED: Halt Prolog and allow for immediate termination of the console window on SIGABRT
  • ENHANCED: use DWARF debugging symbols to produce stacktraces on Windows
  • FIXED: Use Spending() for wait_for_input/3
  • ADDED: Spending() to query for buffered data on streams that act as an input filter on another stream.
  • ENHANCED: wait_for_input/3 is now left undefined if the underlying OS primitive (select()) does not exist.
  • ENHANCED: library(sandbox): Allow b_setval/2 and b_getval/2 when the first argument is instantiated.
  • FIXED: library(apply_macros): expanding maplist(SomeMetaPredicate, ...) was just `mostly correct'. This, together with the fact that sandboxing cannot deal with the required transparent directive and there is apparently some inner meta-calling, which makes getting rid of the outer meta-calling less important made me decide not to expand maplist/N if the argument is a meta-predicate. Found by Markus Triska, nesting maplist calls.
  • FIXED: Sandbox declarations for library(clpb).
  • SECURITY: library(sandbox): setting attributes can also cause calling of attribute_goals//1. Markus Triska.
  • ADDED: library(sandbox): del_attrs/1 is safe.
  • ENHANCED: Make library(clpb) tracktable by the sandboxing code.
  • FIXED: library(sandbox) declaration for nb_setval/2.
  • ENHANCED: CLP(B): Make attribute names SWISH-friendly.
  • FIXED: backtrace() on Windows can fail if a symbol handler installed on a previous call has not been deallocated
  • DOC: CLP(B) now supports card(Is,Exprs) in Boolean expressions.
  • ADDED: CLP(B): Tentative version of sat(card(Is,Fs)), constraining the number of true expressions in the list Fs to be a member of the list of integers Is.

New in SWI-Prolog 7.1.20 Development (Aug 14, 2014)

  • DOC: Get clp(b) into the manual
  • DOC: add taut/2 example for CLP(B)
  • DOC: Explain residual goals in CLP(B).
  • ADDED: library(clpb). Constraint Logic Programming over Boolean variables, CLP(B).
  • ENHANCED: alpha_to_lower//1 now succeeds on alpha_to_lower(0'a, `AB`, R).
  • ADDED: dict_options/2. Suggested by Jacco van Ossenbruggen.
  • FIXED: decompile C_SOFTIFTHEN VMI
  • FIXED: initialization race between atoms and blob types. Broke --traditional and correct registration of the `text' blob.
  • Package archive:
  • FIXED: archive_header_property/2: return unknown filetypes as integers instead of raising an assertion error. Wouter Beek.
  • Package clib:
  • PORT: call_with_time_limit/2 was not functioning properly on Windows because ETIMEDOUT has different definitions in errno.h and thread.h.
  • Package http:
  • ADDED: ws_receive/3, converting textual values such as Prolog and JSON and extended ws_send/2 to send such values.
  • TEST: Failed test due to incorrect path settings.
  • DOC: http_link_to_id/3. Anne Ogborn.
  • ADDED: Informational message on starting the HTTP server.
  • FIXED: serve_files_in_directory/2: reply 403 (forbidden) if the root is requested. Bambang Purnomosidi.
  • DOC: ws_close/3. Torbjorn Lager.
  • Package semweb:
  • ENHANCED: library(semweb/rdfa): try to guess HTML4 vs HTML5.
  • FIXED: rdf_read_ntriples/3 and friends raise an instantiation error when operating on a text stream.
  • FIXED: Failed to deallocate query if rdf/3 and friends are called from an illegal triple. Bug introduced in 3e6c627770c45eb652de36c1a2d293604985c64d. Jacco van Ossenbruggen.
  • ADDED: Allow RDFa parser to process documents with multiple toplevel elements (which is basically illegal XML/HTML, but appears in the wild). Wouter Beek.
  • Package sgml:
  • TEST: Fixed test suite after fixing
  • FIXED: XML parser parser rejected

New in SWI-Prolog 7.1.19 Development (Aug 7, 2014)

  • ADDED: library(sandbox): \=/2. Torbjorn Lager.
  • MODIFIED: Use blobs for referencing anonymous mutexes. Anonymous mutexes are now subject to garbage collection. In addition, they may be destroyed while locked (causing the actual destruction to delay until the mutex becomes unlocked).
  • FIXED: library(prolog_colour): avoid error if option value is a function.
  • MODIFIED: Allow stream_pair(+,-,-) with a stream argument and do not bind already closed streams
  • DOC: Issues around close/1 and stream pairs.
  • MODIFIED: do not complain if close/1 is called on a stream pair of which one or both streams are already closed.
  • ADDED: PL_get_stream(), replacing PL_get_stream_handle() and adding a flags argument.
  • FIXED: library(prolog_colour): Several issues: qualified terms, empty lists, failure on illegal meta-predicate specifications, control operators of DCG bodies.
  • FIXED: Colour tokens for module-qualified predicate indicators.
  • FIXED: Bug in subterm_pos that was causing cyclic terms
  • FIXED: Bug in subterm_pos that was causing cyclic terms: unifications between Sub and Term would cause undesirable bindings in Term, and also is not desirable that Sub be unified arbitrarily with any free variable in Term. Proper handling of module qualified terms when the module match the context.
  • ADDED: PL_syntax_error(comst char *message, IOSTREAM *in) to simplify raising a (simple) syntax error.
  • FIXED: Associate initialization goals with their source file, so they are wiped if the file is reloaded. Paulo Moura.
  • FIXED: library(prolog_xref): allow for :- encoding(_) before :- module(_,_)

New in SWI-Prolog 7.1.18 Development (Jul 24, 2014)

  • ADDED: call_dcg/3 to call a DCG rule without type checking. Samer Abdallah.
  • DEBUG: No longer report suspect foreign frame sizes. These are actually quite normal ...
  • FIXED: PL_write_term() handling of PL_WRT_NEWLINE flag
  • DEBUG: Fixed checkData() for 0-arity terms
  • FIXED: verification that sandbox predicate declarations are safe.
  • ADDED: CLP(FD): (#\)/2, "exclusive or". Ulrich Neumerkel. i3a#320.
  • FIXED: Avoid ininitialised variable. Not sure what could go wrong, but it affects *re*loading files that contain foreign predicates.
  • MODIFIED: Use blobs as references to anonymous message queues. This change makes later references to destroyed anonymous message queues safe and provides garbage collection of anonymous message queues. This change is similar to streams, clause and database references and introduces the same problem that terms that embed such objects cannot be written and read. This is intentional as reading such terms would be unsafe because the underlying object may not exists.
  • FIXED: Possible crash on halt if there are detached Prolog engines. Honnix Liang.
  • ENHANCED: CLP(FD): automaton/3 now supports multiple sources. Anne Ogborn.
  • ENHANCED: library(prolog_colour) now distinguishes strings from chars and codes as produced by string or "string".
  • ADDED: library(prolog_colour): Additional items for handling dicts.
  • ADDED: Hook prolog:called_by/4, similar to called_by/2, but it pass module and context as arguments to increase precision.
  • FIXED: Added some required undefined predicates in ciao dialect.
  • FIXED: library(prolog_colour): handling of the empty list.
  • DOC: Enhanced with_output_to_codes/4 documentation.
  • MODIFIED: Colour specification of list as list-ElemSpec
  • ADDED: library(sandbox): allow for functional notation, but only for accessing known keys.
  • FIXED: realign lTop with the current frame being unwound in B_THROW
  • FIXED: ensure lMax does not extend past its allocated space
  • FIXED: possible hang in print_backtrace_named()
  • Package clib:
  • DOC: various issues on install_alarm/1,2 and uninstall_alarm/1.
  • DOC: crypt/2: Update for SWI7
  • Package http:
  • FIXED: Consistent colouring for HTML entities and content lists.
  • FIXED: Colour helper: handle incomplete lists as attribute value.
  • Package pengines:
  • FIXED: Sandbox declarations
  • FIXED: Handle /pengine/abort. The abort event may have been trapped by a pull_response because abort can happen at any state of the pengine. In that case /pengine/abort replies with the event died(Pengine). The JS client ignores died after an abort and handles it as an error otherwise.
  • FIXED: We should disable the HTTP handler timeouts as we do our own pengine timeouts.
  • FIXED: add newline after fullstops generated from src_list(Terms) option.
  • FIXED: Correctly compute a template for ask in create.
  • ADDED: Support multiple source options.
  • Package semweb:
  • FIXED: rdf_save_turtle/2: handling of prefixes(+List) option.
  • Package sgml:
  • FIXED: check first argument of load_structure/3 is valid.

New in SWI-Prolog 7.1.17 Development (Jul 2, 2014)

  • FIXED: Use proper test for _X toplevel variable filtering.
  • FIXED: Send query-response messages to user_output rather than user_error.
  • FIXED: possible crash when ATOM GC signal is received while handling GC signal
  • FIXED: Attach packs when called in compilation mode (-c). Michael Hendricks.
  • Package pengines:
  • FIXED: Set encoding of the file to avoid errors in non-UTF-8 environments.
  • TEST: Test json-s and json-html formats
  • FIXED: Dropping automatic translation of [Atom=Value, ...] lists in term_to_json/2 caused JavaScript clients that do not use a template to fail.
  • FIXED: Exchange Prolog messages as UTF-8, so e.g., pengine_rpc/2 handles full Unicode.

New in SWI-Prolog 7.1.16 Development (May 28, 2014)

  • FIXED: Avoid crash in signal-checking when called from a non-prolog thread. This fixes atom-completion in swipl-win.exe on Windows. Reported by Douglas Miles.
  • FIXED: Meta-declaration for on_signal/3.
  • FIXED: Do not expand :- at_halt(G). when cross-referencing.
  • DOC: Be more precise on when temporary files are deleted. Matt Lilley.
  • FIXED: Forget to bind accumulator.
  • FIXED: library(sandbox) Evaluation of safe expansion rules in the wrong context.
  • ADDED: library(sandbox): declare library(clpfd) to be safe.
  • ADDED: library(sandbox): multifile declaration safe_global_variable/1.
  • DOC: Added labels to library(clpfd) section headers (used to generate persistent URLs for the sections).
  • FIXED: Invalid (but harmless) directive generated from exporting operators. Trapped by sandboxed loading.
  • MODIFIED: Verbosity of loading files. There are now four levels,
  • controlled by the Prolog flag verbose_load: full, normal, brief and silent. The default is silent. To change the default back to the old behavior, add the following to your initialization file: :- set_prolog_flag(verbose_load, normal).
  • ADDED: library(sandbox): unifiable/3, attvar/1.
  • ADDED: translate_bindings/3, which makes the toplevel rewrite:
  • operations on answer bindings available to applications that wish to make the Prolog toplevel available through other means (e.g., SWISH)
  • NSTALL: Add pengines_io.pl to the Win32 installer spec.
  • FIXED: Possible crash reloading a file. Jacco van Ossenbruggen.
  • FIXED: Prepare for errors while reading the history. Philippe Chatalic.
  • FIXED: Call goal_expansion/2,4 for sandboxed loading.
  • DOC: Minor fixes to avoid overful lines in the documentation.
  • FIXED: Avoid non-termination in ?- A = [a|A], atomic_list_concat(A, L). Thanks to an anonymous reviewer of my WLPE-14 paper.
  • FIXED: Do not save anything from volatile predicates that are not dynamic or multifile.
  • Package http:
  • MODIFIED: Renamed http/examples/debian-init-script to linux-init-script.
  • PORT: Bug#175: Port init script to support Linux lsb. Now runs on at Debian and Redhat based systems. Contributed by Joachim Neubert
  • FIXED: typo: Just using format/2 is not satisfactory
  • Package pengines:
  • DOC: PlDoc Typo
  • ENHANCED: Allow redefining I/O to HTML and pengine_output/1 by redefining the I/O predicates rather than using goal expansion.
  • ADDED: Hook pengines:prepare_module/3 to allow for more complicated preparation of the pengine's work space.
  • MODIFIED: Renamed module pengine into pengines for consistency with the file name.
  • FIXED: Parse ask-event string in the context of the pengines module to deal with operators. Note that this now works for ask, but not (yet) for ask in create events.
  • ADDED: pengine_property(Pengine, module(Module)).
  • ADDED: term//1 (term--> HTML): process option module(Module) for module aware operators.
  • FIXED: Allow processing output events during compilation. This sends compiler messages to the output window when compiling in SWISH.
  • FIXED: Handle syntax errors in ask() request.
  • CLEANUP: Used dicts for JSON translation
  • MODIFIED: term_to_json/2,3: use dicts and only accept dicts as native translation to JSON objects. Might break some code, but makes the translation more predictable.
  • ADDED: Reply format json-html, to support a remote toplevel.
  • ADDED: Hook pengines:event_to_json/3 to allow for variations in translating the output to JSON. Will be used to support Prolog toplevel bindings and can be used for application-specific translations.
  • FIXED: Re-enable CORS support
  • ADDED: Converting terms to HTML
  • ADDED: Suppress _A, etc. variables from the default template.
  • ADDED: I/O wrappers for most common Prolog I/O and listing/0,1
  • ADDED: library(pengines_io) to redirect normal Prolog I/O to HTML pengine clients
  • Package sgml:
  • FIXED: xpath/3: enhanced determinism.

New in SWI-Prolog 7.1.15 Development (May 20, 2014)

  • FIXED: '$qlf_include'/5: inconsistent representation of files. Causes problems if :- include/1 is the first term of a file. Douglas Miles.
  • TEST: temporary modules.
  • ENHANCED: Avoid callProlog() to create undefined procedures to be resolved by autoImport(). This both safes time and reduces memory.
  • FIXED: Double call of unshareDefinition() in autoImport()
  • DOC: Path for MacOS app commandline version. Ognjen Savkovic.
  • MODIFIED: Implementation of source_file/2. The following
  • modifications and improvements are achieved: - The implementation is now thread-safe (could crash) - The mode (-,-) is supported.
  • All files are reported for multifile predicates (MODIFIED) - The first argument is a true meta-argument and thus the following only returns Head that appear in the context module. Use M:Head to get all definitions.
  • ?- source_file(Head, '/path/to/my/file.pl')
  • CLEANUP: Use modern interface for some builtins
  • ADDED: Actually destroy registered source files if they are empty.
  • ENHANCED: Implement index-->source_file index using a thread-safe dynamic array. This reduces the need for locked reading (actually, reading was unsafe).
  • CLEANUP: Separate source file admin in a new file pl-srcfile.c.
  • WIP: Update source administration when destroying a module.
  • ADDED: library(modules). Currently only provides in_temporary_module/3.
  • ADDED: Notion of temporary modules.
  • ADDED: '$destroy_module'/1
  • DOC: Various minor LaTeX issues, deleted -Asize commandline option
  • ADDED: load_files/2: option module(+Module) to force loading a file into a given module. Experimental option used to support Pengine sandboxes.
  • FIXED: Allow colouring options for predicates that have otherwise specified colour instructions. E.g., the 2nd argument of load_files/2.
  • SANDBOX: Consider global term expansion safe. Only run local term expansion through safe_goal/1.
  • CLEANUP: Deleted unused predicate from init.pl
  • FIXED: format_time/3: %f rounding. Igor Wojnicki.
  • ADDED: findnsols/4,5: find maximum N solutions and on backtracking the next chunk of N.
  • ADDED: library(prolog_colour): meta_declarations(Extra) to support variations on meta-predicate declarations.
  • FIXED: JIT clause indexing could mis the right argument in the following scenario: - There is a best index Ib, which is poor.
  • There is a normally better index I2, but the corresponding argument is not indexable.
  • Although the scenario is not that common, it can lead to a huge slowdown.
  • ADDED: Declare print_message/2 as safe.
  • ADDED: library(sandbox): term_string/2.
  • FIXED: Location in error message when reading from a stream swapped line and line position.
  • FIXED: Wrong declaration (new warning).
  • ADDED: timeout and deadline options to thread_send_message
  • ADDED: make/0 calls list_void_declarations/0
  • ADDED: list_void_declarations/0 to list predicates that have declarations such as meta_predicate/1 but no clauses.
  • MODIFIED: meta_predicate/1 declarations associate the declared predicate with the source file being loaded. Reloading a file clears meta predicate declarations.
  • FIXED: Avoid type error on arg(_, atom, _). Samer Abdallah.
  • BUILD: Added missing dependency to support parallel build. Roberto Bagnara.
  • ENHANCED: Try to avoid messages about the thread pool manager not existing while terminating the process
  • FIXED: qsave_program/2 failed with autoload(false) The cleanup in commit 8f6a3ee28795c0bed893974ad07d0122be67b81c caused qsave_program/2 to fail anytime the autoload option was set to false. This restores the intended behavior of skipping autoload/0 in that case.
  • ADDED: library(sandbox): writeln/1 as safe.
  • Package clib:
  • FIXED: Crash in crypt/2 on unsupported hash type.
  • ADDED: rlimit/3: limit as (address space)
  • FIXED: rlimit/3 for 64-bit machines
  • Package http:
  • FIXED: Proper colouring of meta through html_meta/1 declarations.
  • DOC: How time_limit of HTTP requests is arranged.
  • ENHANCED: PceEmacs: colour predicates described by the html_meta/1 directive.
  • Package jpl:
  • PORT: Use javadoc -Xdoclint is supported. Deals with javadoc v8.
  • Package pengines:
  • SECURITY: Use version 4 UUIDs. The default version 1 UUIDs are predictable.
  • MODIFIED: Process src_text and src_url using the new temporary modules.
  • MODIFIED: Handling of pengine source isolation and reclaiming of resources is now based on the new temporary module support of SWI-Prolog instead of the support for thread local predicates. This provides better isolation, and will allow for features such as defining operators and managing the location of sources.
  • FIXED: Replaced pengine_find_n/4 with a new builtin findnsols/4. The implementation of pengine_find_n/4 is incorrect because the recorded database is shared between threads, so pengines can steal answers from each other. Turns out that a safe and cycle-safe version is pretty hard in pure Prolog.
  • ADDED: current_pengine_application/1
  • MODIFIED: Renamed name(+Name) option into alias(+Name).
  • MODIFIED: Removed pengine_name/2. Use pengine_property(ID, alias(Name)) instead.
  • ENHANCED: Limit size of the message queue of remote pengines
  • FIXED: Abort of auto-destroy pengines should destroy the pengine
  • FIXED: abort was replied as an error.
  • FIXED: delay the destruction of the remote pengine output queue if there are output events left in the queue after the pengine thread terminates.
  • HACKY: waiting for safe message queue handles.
  • ADDED: Handle new options is new Pengine()
  • ENHANCED: GC and trim stacks on pengine idle loop to reduce the footprint.
  • ADDED: setting idle_limit
  • ENHANCED: When replying to a JSON client, pass errors as a string.
  • MODIFIED: Deleted pengine_ask_around/2 and pengine_seek_agreement/2
  • ADDED: Enforce maintaining slave limit and destroy pengines if window is unloaded.
  • ADDED: HTTP action /pengine/destroy_all
  • ADDED: pengine_destroy/2 with option force(true).
  • ADDED: Server pengines.js from stable location /pengine/pengines.js
  • ENHANCED: Use ask(Query) option in pengine_rpc/3.
  • TEST: Test for dangling pengines for RPC tests
  • ADDED: pengine_create/1: ask(Query) and related options.
  • TEST: Only run javascript tests if we have phantomjs
  • TEST: choose between in-process and external pengine server
  • TEST: make collect assume destroy(true)
  • FIXED: handle destroy/2 events properly in pengine_event_loop/2.
  • FIXED: We must destroy the message queue from the HTTP handler when sending the final destroy event instead of when the pengine terminates.
  • TEST: Allow using a truely remote pengine server
  • ADDED: Process pengine_create/1 destroy option.
  • TEST: Add random delays to expose timing errors.
  • TEST: Asking next to another pengine cannot work because the `other' pengine may not have processed its first ask yet.
  • ADDED: Allow for :- dynamic declarations inside pengines.
  • ADDED: pengine_create/1: destroy(+Boolean) option (no effect yet)
  • FIXED: Timing issue in destroy of remote pengines
  • TEST: Added regression testing for the web client
  • MODIFIED: HTTP messages are no longer wrapped in request/1 terms. This is the visible consequence of separating messages to pengines from their replies.
  • ADDED: Manage pengine resources using thread pools
  • FIXED: handle errors in creating remote pengines.
  • MODIFIED: Reply normal pengine error if a remote pengine does not exist
  • FIXED: Pass application option properly to remote pengine create
  • ADDED: Setting slave_limit
  • DELETED: setting max_session_pengines
  • MODIFIED: Introduce per-application settings.
  • ENHANCED: Wrap pengine events into pengine_event(Id, Event), so we can wait for events of a specific pengine. Needed for pengine_rpc/2.
  • MODIFIED: Use child/2 to keep track of the known pengines.
  • MODIFIED: terminate pengine_event_loop/2 if an error is raised by a pengine that is not handled.
  • ADDED: pengine_name/2
  • CLEANUP: merged child/1 and named_child/2.
  • ADDED: Notion of application. Predicates pengine_application/1 and option application(Application) to pengine_create/1.
  • Package semweb:
  • FIXED: Inverse triples. Jacco van Ossenbruggen
  • FIXED: New type checking in rdf_current_predicate/1, rdf_subject/1 and rdf_resource/1.
  • TEST: Asynchronous RDF GC can cause test for zero literals to fail, while the actual destruction is just delayed.
  • TEST: Use assertion/1 instead of homebrew
  • ADDED: rdf_current_predicate/1, rdf_subject/1 and rdf_resource/1 now fail silently if the argument is a literal. Used to raise a type error. This provides more logical support for generated goals, such as optimizing rdf(S,_,_) to rdf_subject(S).
  • FIXED: rdf_reset_db/0 could crash.
  • FIXED: Do path normalization on URLs that are relative to the base. We also collapse sequences of // to a single /. Rapper does not appear to do so. Jacco van Ossenbruggen.

New in SWI-Prolog 7.1.14 Development (May 7, 2014)

  • DOC: Updated example
  • DOC: Updated open/4 (Wouter Beek).
  • DEVEL: Fix --enable-dmalloc option to compile with malloc debugging
  • FIXED: dict.put(Var,Value) now raises an instantiation_error (ran out of local stack).
  • ENHANCED: Base stack traces in Linux on backtrace(), dladdr() and addr2line(1). This produces stack traces at the line level and removes the need for libunwind on Linux.
  • FIXED: link local variable if it appears as Var:G or G@Var. Without, uninitialised memory may be used for Var, causing a crash. Guenter Kniesel.
  • FIXED: variant_sha1/2 gave same hash for all indirect types (big integers, floats and strings). Jacco van Ossenbruggen.
  • FIXED: Prepare to update git submodules
  • FIXED: Slock(): wrong place to increment stream->references
  • FIXED: reference locked streams to avoid them being GC'ed
  • FIXED: Rereference stream `filters' to avoid them being GC'ed
  • FIXED: peek_string/3: clear EOF if file is shorter than peeked string.
  • GIT: Avoid directory names in git submodules to facilitate github
  • FIXED: Reading one byte after static array (innocent).
  • FIXED: trimming the stacks in GC. Reported by Johan Romme. Keri Harris discovered that we need to include ARGP in `body mode'.
  • FIXED: possible signed overflow when creating stand-alone resource archives. Very unlikely to occur in practice
  • REVERTED: Packages pengines to March 1 version. Current version is available in the branch 'testing'. It exhibits timing issues, notably on slow hardware such as the Pi.
  • FIXED: . notation on lists, added test cases. Raivo Laanemets.
  • PORT: Avoid dependency on 8-byte atomic operations on 32-bit platforms. Allows compiling on ARMv6 (e.g., the Raspberry Pi)
  • Package archive:
  • FIXED: Release archive stream when closing archive
  • FIXED: Avoid access to archive after closing
  • FIXED: archive_next_header/2: Raise a permission error if the previously opened entry has not been closed.
  • Package clib:
  • DOC: Typo in example. Reported by Raivo Laanemets as comment.
  • Package http:
  • FIXED: atom_json_dict/3: make as(Type) optional (defaults to atom).
  • Package pengines:
  • REVERTED: Reverted pengines to March 1 version, which is the last version that passes the tests on all hardware (notably slow hardware such as the Pi exhibits timing issues).
  • Package semweb:
  • PORT: 32-bit version of modified deallocation of triples.
  • FIXED: Delay unregistering atoms and literals from triples until the triple is really deleted. Without, we may still process the triple after it has been deleted.
  • FIXED: Added enter/exit scan to update_duplicates() to avoid that duplicate detection crashes on freed triples.
  • ADDED: rdf_statistics/1: lingering(-Triples), showing #triples freed but not yet released for re-use
  • ENHANCED: Limit considered size for O and PO indexes to the number of triples (because we do not have resource GC, this may be higher).
  • FIXED: Stop transactions from garbage collecting reindexed triples.
  • FIXED: Only the tail of a ->reinidexed chain can be considered garbage.
  • FIXED: Triple copying while extending the hash tables during a transaction causes modifications to survive if the transaction is discarded. Wouter Beek.
  • FIXED: Make erase_triple() thread-safe. This is called concurrently when asserted triples are erased for discarding a transaction.
  • ENHANCED: Better message if the Turtle empty prefix is not defined.
  • ENHANCED: Try to read more triples from invalid Turtle.
  • ADDED: Provide default definitions for foaf and void prefixes
  • FIXED: library(semweb/rdf_library) to find input that has a .gz (or other registered storage extension). Chris Dijkshoorn, Jacco van Ossenbruggen.
  • ADDED: register library(semweb/rdfa) as hook for rdf_load/2, format rdfa and .html files.
  • FIXED: MD5 computation of qualified literals may crash.
  • Package sgml:
  • MODIFIED: sgml_parse/2: unknown options are now silently ignored.
  • Package ssl:
  • FIXED: Avoid reading past end-of-string for time conversion.
  • FIXED: Convert subject/issuer fields to UTF-8, so the appear as proper Unicode names in Prolog.
  • Package xpce:
  • FIXED: X11: possible curruption of window administration.
  • FIXED: Wrong detection of changed device. Performs read access to xpce Int array one past end of local array (this is innocent).

New in SWI-Prolog 7.1.13 Development (Apr 17, 2014)

  • ADDED: thread_create/3: option inherit_from(+Thread) to define the thread from which all settings are copied.
  • FIXED: url_iri/2 in mode (-,+). Wouter Beek.
  • FIXED: print_message/2: do not worry if user_outout does not exist (is flushed before writing to user_error to ensure proper ordering of buffered output).
  • Package pengines:
  • FIXED: Prevent pengine thread-pool hook to create threads for other libraries.

New in SWI-Prolog 7.1.12 Development (Apr 16, 2014)

  • ADDED: create_prolog_flag/3: option keep(true) to keep the flag at its current setting if it is already defined.
  • ENHANCED: Do not generate an error if the commandline history cannot be written.
  • FIXED: Safe-goal declaration: get_dict_ex --> '$get_dict_ex'
  • MODIFIED: Removed get_dict_ex/3. This used to implement the functional notation for Dict.Field. The new predicate '$get_dict_ex'/3 has very specific behaviour to speed up ./3 for this typical case.
  • DOC: Support [|] in fragile LaTeX environments.
  • DOC: numbervars option of write_term/3. Ulrich Neumerkel.
  • ENHANCED: Remove order verification from dict contents in is_dict/1 and is_dict/2.
  • DOC: Clarified numbervars/3. Guenter Kniesel.
  • FIXED: source location of syntax errors
  • FIXED: previous patch left is_resource_error() undefined
  • FIXED: Implement outOfStack() using more low level primitives, avoiding term references. This saves stack space (which may be scarce) and avoids overwriting body terms written by ARGP, which may crash GC.
  • FIXED: library(prolog_colour): Deal with incomplete position information
  • SECURITY: Windows: update OpenSSL dependency to 1.0.1g.
  • CLEANUP: Many issues around handling of stack overflows. This patch makes cleans many issues wrt. handling of the `spare' stacks and creating space that allows starting the debugger after a stack overflow.
  • FIXED: GC: move trimStacks() out of the protected zone of GC such that it can indeed shift the stacks.
  • FIXED: Save/restore LD->outofstack over callbacks.
  • CLEANUP: No longer let conditional tracing depend on the outofstack.
  • TEST: Removed obsolete comment
  • TEST: We need to trim the stacks, otherwise the first shift can be an overflow, while this test is about shifting.
  • FIXED: open/4: validate argument of option type(+Type). Ulrich Neumerkel.
  • PORT: Avoid looking for clock_gettime() on MinGW because we have our replacement and it clock_gettime(CLOCK_REALTIME) returns bogus on MinGW4.8 on Win32.
  • MINGW: Fixed detection of pthread_getw32threadhandle_np() vs pthread_gethandle()
  • CLEANUP: Avoid some benign type conversion warnings
  • FIXED: Compensate for lazy creating of threads with redirected output. This can happen, for example if the pool is created from an HTTP server thread. Dubious. Most likely we need some option to create a thread without inheriting I/O from its parent.
  • PORT: Updated README.mingw to document compilation on Ubuntu 14.04/MinGW 4.8
  • PORT: PL_atom_generator(): fixed thread-specific data handling (0 is a valid key).
  • MINGW: Make NSIS script deal with different thread models.
  • MINGW: Pass detected pthread library to Makefile and NSIS
  • MINGW: Deal with versions that needed pthread-win32 and recent versions that have that bundled.
  • MINGW: Do not install SSL documentation as the .pod file do not process in Ubuntu 14.04 and we do not need these for building.
  • PORT: Install proper support libraries
  • PORT: Allow using MinGW 4.8 default pthread emulation
  • PORT: Avoid undefined timespec_to_double()
  • PORT: Be prepared that dtoa and strtod are macros
  • PORT: Avoid dependency on ms_snprintf() in pl-stream.c
  • FIXED: library(prolog_stack): avoid error if source location is incomplete.
  • FIXED: library(prolog_colour) to color quasi quotations that produce a goal term.
  • FIXED: possible crash when reading very large multibyte characters
  • FIXED: possible crash when using excessively large character codes with atoms
  • ENHANCED: Make PL_chars_to_term() process a plain number by bypassing the while Prolog machinery. This allows for (relatively) fast parsing of e.g. large integers.
  • Package clib:
  • FIXED: Bug#174: uri_encoded/3 should encode IRIs and %. Raivo Laanemets.
  • FIXED: cgi_get_form/1 to use Prolog's parser for numbers. This avoids locale issues and supports unbounded integers.
  • FIXED: possible off-by-one error when processing URIs
  • FIXED: possible hang when processing invalid query string
  • Package http:
  • ENHANCED: library(http/http_unix_daemon) to disable the IDE for messages.
  • MODIFIED: library(http/http_unix_daemon): By default, suppress all debug messages
  • FIXED: library(http/http_daemon): try to avoid starting the xpce event handling thread before forking.
  • ADDED: library(http/http_unix_daemon): options --help and --interactive
  • FIXED: library(http/http_header): bug where a second round of authentication fails.
  • Package nlp:
  • FIXED: tokenize_atom/2 now uses PL_chars_to_term() to translate recognised numbers into Prolog integers. This implies: - Numeric tokens are not locale sensitive - Integer tokens profit from unbounded arithmetic
  • Package pengines:
  • REVERTED: The pengine default application is named pengine_sandbox
  • ADDED: Inherit settings over pengine:. This is both more practical and avoids incompatibility.
  • UPDATED: plans.txt
  • FIXED: Ignore errors resetting streams (dubious).
  • ADDED: pengine_event_loop/2: options created(+ListOfPengines) to stop the loop terminating before all pengines have become visible.
  • DOC: Pengine IDs are UUIDs
  • ADDED: pengine_application/1 to declare a new pengine application
  • ADDED: pengine_property/2: new application(Application) property
  • CLEANUP: Throw standard exception if the pengine limit is reached
  • CLEANUP: Import library(aggregates)
  • Package semweb:
  • FIXED: Attach to a read-only database is supposed to raise only a warning
  • FIXED: Include to get swprintf().
  • Package sgml:
  • ADDED: Warning when trying to use SYSTEM entities if this is not allowed.
  • FIXED: possible crash while reporting markup syntax errors
  • SECURITY: provide a max_memory/1 option to load_structure/3 to stop entity-expansion blowup
  • SECURITY: disable SYSTEM entity expansion by default
  • ADDED: Dialect support for xhtml and xhtml5.
  • Package xpce:
  • ENHANCED: Only set the message_ide flag if it was not set before.
  • ENHANCED: Be silent about errors saving PceEmacs bookmarks
  • FIXED: Handling of type 1.2..2.4 in locales that do not use . for decimal point.
  • FIXED: Use new answer_write_options flag instead of toplevel_print_options.

New in SWI-Prolog 7.1.11 Development (Apr 2, 2014)

  • FIXED: off-by-one error in signal handlers
  • ENHANCED: Avoid tracing into arithmetic expansion
  • MODIFIED: print/1 now used quoted output by default. Its behaviour is now defined by the new Prolog flag print_write_options.
  • MODIFIED: Renamed flag toplevel_print_options into binding_write_options
  • MODIFIED: flag debugger_print_options is renamed into debugger_write_options for consistency with print_write_options.
  • CLEANUP: Use foreign_t rather than word for write predicate implementations.
  • FIXED: Possible non-termination in code walker due to incomplete source information.
  • FIXED: Development tools for handling name() at various places.
  • DOC: Added det, nondet, semidet and choice point to the glossary.
  • FIXED: Feedback output of commandline tracer in Windows swipl-win.exe was broken. Grishma Jena.
  • FIXED: check_installation/0 for library(pce).
  • FIXED: prolog_trace_interception/4 on unify caused attribute wakeups not to be called. Edison Mera.
  • FIXED: '$find_predicates/2' should not return system: for things imported from the library.
  • FIXED: Some enhancements to listing/1. Notably make listing(module:_) list all predicates in module. Jan Burse.
  • FIXED: Possible memory leak in sub_atom/5 and sub_string/5. Keri Harris.
  • FIXED: use of uninitialized memory in peek_string/3
  • FIXED: thread_create_in_pool/4: generate exception if new pool creation hook fails.
  • FIXED: Also need to check we have a thread in the libunwind version. Keri Harris.
  • FIXED: Missing break; in ar_pow, leading to an assertion error. Markus Triska.
  • ENHANCED: CLP(FD): Stronger exponentiation.
  • FIXED: save_backtrace() if threads are not yet initialized. Keri Harris.
  • ADDED: hook thread_pool:create_pool/1 to allow for lazy creation of thread pools.
  • FIXED: Illegal casts in C++ between pointers. This patch complements a patch to the cpp package.
  • ADDED: parse_time/3: support numeric RFC 1123 timezones RFC 1123 section 5.2.14 says, "There is a strong trend towards the use of numeric timezone indicators, and implementations SHOULD use numeric timezones instead of timezone names." Since the RFC recommends numeric timezone support, parse_time/3 ought to support them.
  • FIXED: Integer size issues with creating saved states. Roberto Bagnara.
  • FIXED: Max stack-size warning for 64-bit platforms
  • ENHANCED: safe_goal/1: Do not try to specify for a more specific goal if the generic goal is the same as the specific one.
  • FIXED: Possibly listing of predicates multiple times due to changed semantics of list_to_set/2.
  • FIXED: Handling of {G} in //-annotated arguments. Samer Abdallah
  • Package archive:
  • PORT: Omit filter property for older libarchive versions. Carlo Cappelli.
  • Package clib:
  • FIXED: Allow for tcp_bind(localhost:Port), i.e., bind to an interface, but leave the port to the system.
  • DOC: Updated tcp_bind/2 docs
  • Package cpp:
  • FIXED: Illegal cast of C++ pointers Hello SWI-Prolog developers, and thank you for your work!
  • ISO-C++ forbids casting pointers-to-functions to pointers-to-objects. This patch fixes some casts that issue a warning in GCC.
  • Package http:
  • TEST: Added test to verify that the server closes the connection if requested to by the client.
  • FIXED: Make sure http_server(http_dispatch, localhost:Port) is documented and works.
  • FIXED: Bug#172: connection(close) is ignored for requests that are handled through exceptions. This results in waiting for the server keep-alive timeout for clients that assume that the server will close the connection. Raivo Laanemets.
  • DOC: Make library linkable.
  • FIXED: Bug#170: http_open/3 with empty server response causes confusing error message. Raivo Laanemets
  • FIXED: Bug#168: json_read/2 can fail on illegal input. Should be det and throw an exception. Raivo Laanemets.
  • FIXED: Conditionally load code that depends on is_dict/1
  • Package odbc:
  • FIXED: possible memory leak when reading large strings from database
  • FIXED: possible crash when reading large strings from database
  • Package pengines:
  • ENHANCED: Use lazy thread-pool creation provided by latest SWI-Prolog.
  • DELETED: pengine_assert/1 and friends
  • ADDED: plans
  • ADDED: list of remaining bugs
  • ADDED: pengine_assert/1 and friends
  • MODIFIED: current_pengine/4 -> current_pengine/5
  • CLEANUP: Some layout, white space errors and missing declarations for new arguments.
  • Package plunit:
  • ENHANCED: Avoid trapping the tracer on the test internals.
  • Package semweb:
  • FIXED: Use defferred finalization to get rid of predicate clouds. Fixes an early free when closing a query.
  • TEST: Start random tests from printed seed, so we can replay them.
  • TEST: Fixed replaying of failed rdfs:subPropertyOf sequences
  • FIXED: Literal reference count was 24 bits and not checked for overflow. Now 32-bit with assert-based overflow checking.
  • FIXED: We must always lock queries.write.lock when removing a triple in GC, both to update the hash chains and to ensure consistent update of triple->linked.
  • FIXED: Use atomic inc/dec to make sure the count for the number of triples per graph is accurate.
  • FIXED: rdf_load/2: Actually return the loaded graph when using graph(Var)
  • FIXED: rdf_load/2 must synchronize concurrent loads on the source rather than the graph to facilitate loading quad/trig files.
  • ADDED: Media types for ntriples and nquads
  • OOPS: Revert "CLEANUP: library(rdf_ntriples): synchronise iriref reading" This reverts commit c58c0d2ff233e41e478dfbfe11365507ec221d9a. I mistakingly though that the iriref was synchronised between Turtle and ntriples. This does not seem to be the case.
  • CLEANUP: library(rdf_ntriples): synchronise iriref reading
  • MODIFIED: library(rdf_ntriples): synced character classification with Turtle. Effectively makes detection of language tags and blank nodes compatible with the RDF 1.1 spec.
  • Package ssl:
  • FIXED: memory leak when ssl_open/3 fails
  • Package swipl-win:
  • BUILD: Avoid including packs in the app.
  • Package xpce:
  • ENHANCED: Avoid a non-terminating loop of errors if (some component of) xpce cannot be found. It is very hard to recover cleanly from this condition, so we just terminate the process

New in SWI-Prolog 7.1.10 Development (Mar 21, 2014)

  • ENHANCED: Interrupt handling
  • MODIFIED: Print debugger interaction to user_error instead of user_output.
  • FIXED: check_installation/0 message if library was not found.
  • ENHANCED: DO not start tracer from forced interrupt (may crash)
  • ENHANCED: Handling of abort from ^C inside readline().
  • ENHANCED: Try harder to exit cleanly if errors arrise.
  • BUILD: Consider configure out of data if there is a newer aclocal.m4
  • FIXED: swipl-ld must dispatch shared objects as liraries to the linker.
  • ADDED: Menu item Help/Check installation (and make check-installation)
  • FIXED: Also get Exit at the bottom of the Qt console File menu
  • FIXED: Windows console: have Exit at the end of the menu again
  • PORT: Check for if RLPREFIX is given (MacOS).
  • FIXED: Honour write_attributes flag in write/2, etc. Abramo Bagnara.
  • FIXED: string_lower/2, string_upper/2: output was an atom. Peter Berry.
  • ENHANCED: limit scope of lock. My mistake in handling Keri's patch 05d1e50d24ce3b14797178d98d732b159d9b1e2c.
  • FIXED: Item#673: Interrupt and abort during output set user_output in error-mode. Ulrich Neumerkel.
  • ADDED: Interrupt handling: 's' to print the C-stack (if libunwind or some alternative is around).
  • FIXED: Bug#142: possible crash when marking records in thread message queues
  • FIXED: absolute_file_name/3: use first extension if the same extension appears multiple times in the list.
  • ADDED: check_installation/0 to verify that the installation is sane.
  • UPDATED: Windows builds to use libarchive 3.1.2 (was 3.0.4).
  • FIXED: Raise existence_error if an already closed stream is closed.
  • FIXED: Shell syntax error in packages "make install". Wouter Beek.
  • PORT: Bug#162: remove prototype for rl_event_hook(). Maks Verver.
  • FIXED: If use_foreign_library/1 loads a C++ object that registers at least one predicate, do not complain that it does not have an initialization function.
  • FIXED: Bug#161: get_dict/3: wrong type error of first argument is not a valid key. Raivo Laanemets.
  • ADDED: Implement break on unification
  • BUILD: Only report failed packages rather than aborting the build process
  • FIXED: Hide '$expand_goal'/2 and '$expand_term'/4 from the debugger.
  • FIXED: Only wrap the console if input, output and error are attached to a console.
  • PORT: Fixed winsock2.h include
  • PORT: Fixed Windows identification of console I/O using GetFileType().
  • MODIFIED: Only enable colour I/O if stdin, out and error are attached to a terminal. If you want colour anyway, load library(ansi_term) explicitly.
  • FIXED: Item#672: call_with_inference_limit/3 does not reset limit on retry. Ulrich Neumerkel.
  • ADDED: call_with_inference_limit/3. After discussion with Ulrich Neumerkel and Markus Triska.
  • FIXED: Possible crash in GC related to Goal@Var. Keri Harris.
  • ADDED: message_to_string/2 as safe predicate for library(sandbox).
  • Package archive:
  • FIXED: Handling of non-repositioning input. If seek() fails we should reset the error state of the stream.
  • ENHANCED: Fail with a type error if an archive-argument does not contain an archive.
  • FIXED: AGC interaction
  • ADDED: archive_property/2.
  • MODIFIED: archive_open/3 renamed compression(Compression) to filter(Filter). Old option is still supported for backward compatibility.
  • ADDED: Support 3.1.2 archive formats
  • ADDED: All 3.1.2 filters
  • FIXED: archive_open/3: compensated for fixed double close/1.
  • Package clib:
  • FIXED: uri_file_name/2 in mode (+,-): actually check the file scheme.
  • DOC: replace @tbd for syslog with @see library(syslog)
  • MODIFIED: uri_is_global/1 fails for a single-letter scheme. This avoids misinterpretation of DOS path names.
  • Package pengines:
  • FIXED: error event if a pengine cannot be created
  • DELETED: the probe and probe_template options
  • Package semweb:
  • FIXED: Prefer exact file name if present. Wouter Beek.
  • FIXED: library(semweb/rdf_ntriples): if the input is a binary stream, switch it to UTF-8.
  • ADDED: rdf_save_ntriples/2 to library(semweb/turtle). Wouter Beek.
  • FIXED: Persistency handling of rdf_reset_db/0. Was lost on 3.0 conversion.
  • ADDED: rdf_save_turtle/2 and friends: option prefixes(List) to specify the prefixes used in the output.
  • MODIFIED: Update Accept header for library(http/rdf_http_plugin).
  • DOC: Avoid misinterpretation of :
  • Package sgml:
  • ADDED: Dialect support for xhtml and xhtml5.
  • FIXED: sgml_parse/2 using parse(content) if a end callback is defined.
  • Package swipl-win:
  • FIXED: Also add (recursive) dependencies for the .dylibs we copy from MacPorts to the app.
  • Package xpce:
  • PORT: Avoid ending up with c89 as local compiler on MacOS
  • BUILD: Use for building xpce-copy
  • Package zlib:
  • FIXED: Stream deflate handling of end-of-stream (depends on flushing behaviour)
  • ENHANCED: forwarding of deflate errors to exceptions produced by reading predicates. Updated the docs to explain that successful opening of an input stream using zopen/3 does not imply it is a compressed stream.

New in SWI-Prolog 7.1.9 Development (Feb 27, 2014)

  • FIXED: safe_goal/1: allow calling back into the original module, even if the predicate is not public.
  • ENHANCED: goal-expanded phrase/2,3 goals now process the position
  • ENHANCED: Use goal_expansion/4 for ignore/1, once/1 and forall/2, maintaining position information.
  • FIXED: Position logic for DCGs that produce no body.
  • FIXED: clause_info/4: avoid non-termination in position logic
  • FIXED: Trying to colour M.func := ... raised an exception.
  • FIXED: Windows installer: undefined predicate: wise_install_xpce. Jan Burse.
  • FIXED: Non-deteminism in shallow copy for stacktraces.
  • ADDED: Maintain position logic for function expansion.
  • ENHANCED: clause_info/4 now calls expand_term/4 to include position logic.
  • ADDED: Shallow copy of dicts for generating stack traces.
  • ENHANCED: prolog_read_source_term/4, with subterm positions now uses term_expansion/4 and goal_expansion/4 work properly with position information.
  • FIXED: Allow defining functions on dicts in other modules.
  • FIXED: Definition of user-functions on dicts
  • ADDED: Functional expansion in the head. Bob Minors and Chris Dijkshoorn.
  • DOC: Updated PlDoc such that we can use it for the manual.
  • DOC: Use PlDoc version for documenting library(check).
  • FIXED: Json convert rule ordering if last properties are ignored.
  • FIXED: Syntax error and renamed figures to avoid _ in their name (causes problems with LaTeX backend).
  • FIXED: enabled the use of the src option in pengines.js
  • FIXED: expanded comment to pengine_respond/3
  • FIXED: the I/O example to use pengine_input/2 and pengine.respond()
  • FIXED: made pengine.send private in pengines.js
  • FIXED: changed pengines.input -> pengines.respond in pengines.js
  • FIXED: whitelisted pengie_input/2
  • DELETED: pengine_set_prompt/1 and pengine_get_prompt/1
  • FIXED: replaced pengine_input/1 with pengine_input/2
  • FIXED: comment for pengine_respond/3
  • FIXED: updated images again
  • FIXED: updated images
  • ADDED: pengine_respond/3
  • FIXED: forgot to make the semicolon in the PLTP rund diagram red
  • FIXED: json-s output
  • FIXED: documentation
  • FIXED: the examples in the examples directory
  • ADDED: added diagram depicting a PLTP run
  • FIXED: corrected examples
  • FIXED: removed cut that stopped pengine_abort/1 from working
  • FIXED: Sandbox declarations for pengine_event_loop/2 and pengine_ask/3. Still not functioning due to errors in library(sandbox).
  • FIXED: Input/output handling under pengine_rpc/3.
  • MODIFIED: pengine_debug/1 --> pengine_debug/2 using format/2 spec.
  • ADDED: library(semweb/rdfa) for parsing RDFa documents.
  • FIXED: Bug#160: rdf_load_library/2 claims non-existence of URLs.
  • FIXED: Turtle parser on """"\"""" (should read '""')
  • DOC: Updated docs to add a new index. Haitao Zhang.
  • FIXED: Include
  • FIXED: EOF cannot appear in an IRIREF. Wouter Beek
  • FIXED: rdf_meta/1: pass non-compliant arguments verbatim instead of failing the expansion.
  • FIXED: Default charset of HTML5 files is UTF-8
  • DOC: load_html/3.
  • MODIFIED: HTML5 DTD to accommodate RDFa attributes.

New in SWI-Prolog 7.1.8 Development (Feb 27, 2014)

  • ADDED: ord_selectchk/3. Nicos Angelopoulos (ask) & Richard O'Keefe (provide).
  • ADDED: library(sandbox): support for format/2,3 and debug/3.
  • FIXED: Item#671: arg(1000000000000000000,s(_),_) should fail. Ulrich Neumerkel.
  • DOC: Deal with version 6/7 issues in docs of phrase. Fixed after comments from Michael T. Richter.
  • ADDED: clause_property(Clause, SizeInBytes)
  • ADDED: library(prolog_format) for analysing Prolg format strings. Contributed by Michael Hendricks.
  • DOC: Status of strings is no longer unsure
  • DOC: Be more careful about \verb$$. Avoids a lot of \bnfmeta{}{} in the generated web pages.
  • DELETED: library(wise). Used to support the Wise solutions Windows installer. This installer no longer exists and SWI-Prolog switched to NSIS long time ago.
  • ENHANCED: Allow double declarations for a setting, provided both name, type and default are the same. Simplifies moving settings between libraries that are part of different source trees.
  • ADDED: peek_string/3, providing long look-ahead to facilitate guessing the content type from data on (HTTP) streams.
  • DOC: More on select/4
  • MODIFIED: Use backtrace_show_lines flag to derive the default for subgoal_positions(Boolean) in print_prolog_backtrace/3.
  • DOC: select/4. Abramo Bagnara.
  • FIXED: Prevent colour handling from failing on a meta-called list. Wouter Beek.
  • UPDATED: library(mimetype): Mime type for Turtle, added n-triples and nquads.
  • ADDED: setting http:prefix to library(http/http_path). Fixes undocumented dependencies on ClioPatria.
  • FIXED: pengine_pull_response/2 was not yet updated for UUID based pengine representation.
  • DELETED: Most option-less versions of the pengine_* predicates.
  • MODIFIED: Made pengine_send/2 and pengine_send/3 private.
  • FIXED: pengine_rpc/3: avoid operator issues between client and server.
  • ADDED: JavaScript class Pengine now accepts server: string to define the location of the server.
  • ADDED: Send errors to console.error if there is no onerror handler and there is a console.
  • ADDED: pengine_debug/1
  • FIXED: Continue main loop if ask fails due to an unsafe goal.
  • FIXED: Terminate if option processing fails.
  • ENHANCED: Throw existence_error when sending to a non-existing pengine. Make pengine_destroy/1 succeed silently if the pengine has gone.
  • ENHANCED: Use /pldoc/man?section= for section(ID) object HREF.
  • ADDED: library(semweb/rdf_ntriples): Support nquads format.
  • DELETED: rdf_input/3 hook that was used by old ClioPatria versions. Please upgrade ClioPatria if this hits you.
  • MODIFIED: rdf_load/2: default graph for loading RDF from an URL now normalizes the URL and removes a possible #fragment. This ensures that rdf_load/2 for e.g., skos:Concept and skos:prefLabel load the same graph.
  • DOC: rdf_load/2 updates
  • DOC: \verb$ error
  • ENHANCED: Added type checking on element content instead of using assertion/1. Alan Baljeu.
  • FIXED: Avoid getting SWI-Prolog.app inside SWI-Porlog.app
  • ADDED: Support for using the %! comment syntax

New in SWI-Prolog 7.1.7 Development (Feb 5, 2014)

  • ADDED: Sanity check for sandbox safety declarations.
  • ADDED: safe_call/1
  • SECURITY: safe_goal/1 now verifies that explicitly qualified goals (e.g., some_module:some_predicate(...)) can only call exported or public declared predicates. This avoids fetching privacy sensitive information from web services such as cookies through the new pengines interface.
  • FIXED: Garbage collection and stack overflow issues with dicts
  • FIXED: setting/2 in the mode setting(-,?). Anne Ogborn.
  • DOC: Updated INSTALL, README.git and various other details in the description for building the system. After feedback from Anne Ogborn.
  • ADDED: Declare the aggregate family from library(aggregate) safe.
  • FIXED: Make sure safe_goal/1 is really det and only throws errors if the goal is not safe.
  • ADDED: nb_setarg/3 to safe predicates
  • FIXED: Must qualify ^ and // meta-arguments
  • FIXED: Make safe_foal/1 det.
  • ADDED: library(sandbox): atom_number/2, number_codes/2 and number_chars/2.
  • DOC: Document variable_names order of read (Ulrich Neumerkel).
  • FIXED: Possible crash resulting from 786402392f3ff2c7d68db9c81b22cf304e4b4153
  • FIXED: Use atomic instructions for managing the thread signal mask. Using a mutex (as it was) can lead to a deadlock if raiseSignal() is interrupted by a signal.
  • FIXED: Avoid getting into the GMP danger zone with exponentiation. Ulrich Neumerkel.
  • MODIFIED: Colour infrastructure now emits structured_comment token for PlDoc comments. Dependent code may handle this the same as comment.
  • ENHANCED: Make pack_upgrade/1 ignore HTML parsing errors from the download page. Nicos Angelopoulos.
  • FIXED: Raise an error on pack_info/1 if argument is not an atom.
  • DOC: interactive options for pack_install. Nicos Angelopoulos.
  • Package bench:
  • PORT: Compensate for V7 list functor and terminator.
  • PORT: Avoid dependency on ` being a symbol character
  • Package http:
  • ADDED: Bug#159: http_open/3: support for method(put). Raivo Laanemets
  • Package nlp:
  • ADDED: Sandbox declarations
  • Package pengines:
  • ADDED: HTTP CORS (cross domain scripting) support.
  • FIXED: Sometimes the test no_more_pengines/0 fails due to asynchronous behaviour.
  • FIXED: pengine_event_loop/2 is only safe if the called closure is safe.
  • FIXED: Safe execution of the probe(Guard) goal.
  • MODIFIED: Renamed paging option into chunk.
  • MODIFIED: Run client code in the module pengine_sandbox. Document how code can be made available to clients.
  • FIXED: Complete meta_predicate declarations
  • FIXED: Maintain determinism of remote call.
  • ENHANCED: pengine_rpc/3: use term_variables/2 to create a template and reduce network traffic.
  • ADDED: src_predicates(+List) option to transfer predicates from the local Prolog to the remote one.
  • CLEANUP: No longer export pengine_find_n/4.
  • CLEANUP: No longer export pengine_src_* predicates.
  • FIXED: Apply expand_goal/1 before running the goal.
  • ADDED: allow_from and deny_from settings to do IP-based access control.
  • MODIFIED: Generalized allow_multiple_session_pengines into max_session_pengines and do not enforce this is session handling is disabled.
  • Package pldoc:
  • FIXED: /pldoc/doc_for?object=dict_create/3. Wouter Beek.
  • FIXED: Finding the library from manual documentation for predicates documented in subsections.
  • CSS: More conventional line numbers in source view
  • ADDED: Source view: alternate between formatted and plain PlDoc comments.
  • FIXED: Unwanted non-determinism in is_structured_comment/3.
  • ENHANCED: Get an anchor id="name/arity" at the first definition of a predicate in an HTML source listing.
  • ADDED: id=Name/Arity attribute to the first head of a predicate.
  • FIXED: prolog:doc_object_summary(section(ID), ...). Needed for tagged sections on the website.
  • FIXED: Serving image files for the package documentation.
  • Package semweb:
  • ADDED: Sandbox declarations
  • Package xpce
  • FIXED: Menu entries to edit Prolog customization file. Bob Minors.

New in SWI-Prolog 6.6.0 (Nov 23, 2013)

  • 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 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 SWI-Prolog 6.2.1 (Sep 17, 2012)

  • 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.