Did you know ... Search Documentation:
Title for pldoc(default)
Branch: stable (switch to development),
version to version

SWI-Prolog Changelog from version 7.4.2 to 7.6.0-rc1

[Sep 13 2017]

  • BUILD: Bump OpenSSL for Windows build to 1.1.0f

[Sep 12 2017]

  • ADDED: Allow set_prolog_flag(browser, Command-fg) to run the browser as a foreground job. Samer Abdallah.
  • 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.

[Aug 31 2017]

  • FIXED: Possible crash enumerating threads (atom and clause gc) while the thread array is being resized.
  • FIXED: Atomic handling of flags on structures. Paulo Moura.

[Aug 30 2017]

  • FIXED: PL_thread_attach_engine() with attr = NULL
  • FIXED: Issue#245: get_single_char/1 incorrectly returns -1 (EOF) on Windows 10. Diagnosed by Matt Lilley.

[Aug 29 2017]

  • FIXED: retain exported attribute for predicates loaded from QLF files
  • FIXED: Possible crash when reloading a file holding foreign predicates. Jacco van Ossenbruggen.

[Aug 28 2017]

  • FIXED: predicate/module generation property: update on file reload.
  • FIXED: call endReconsult() when loading QLF files so that consulted clauses are finalized
  • FIXED: Issue#266: goals in directives are handed twice to expand_goal/2.

[Aug 24 2017]

[Aug 23 2017]

  • ADDED: predicate_property/2: last_modified_generation(-Gen) to support caching.
  • MODIFIED: prolog_walk_code/2: handle ->, *-> and \+ as control structures.
  • MODIFIED: prolog_walk_code/2: do not walk multifile and initialization goals if a list of clauses is given.
  • RELEASE: Merged 7.5.13 (7fa94fa8d103115007eaa0985fad05dae7bba8f7)
  • ENHANCED: make thread_join/2 and mutex_lock/1 interruptible if timed versions of these functions are provided: pthread_mutex_timedlock() and/or pthread_timedjoin_np().
  • LICENSE: man/plindex.pl. Missed during license transition.
  • FIXED: --nosignals also inhibits the use of a separate GC thread (see Prolog flag gc_thread). This is needed because the synchronisation uses signals. Caused a crash when Prolog is embedded in Java on Unix systems.

[Aug 22 2017]

[Aug 21 2017]

[Aug 19 2017]

  • FIXED: hasClausesDefenition(): avoid relying on LD->gen_reload and simply scan the clause list. Do not use the environment frame generation as this can be bogus.
  • FIXED: LD->gen_reload must be of type gen_t

[Aug 18 2017]

  • FIXED: Do not consider '$reset'/0, '$call_continuation'/1 and '$shift'/1 as undefined.
  • FIXED: $filled_array/4: raise stack overflow rather than crashing if stack space is insufficient. Wouter Beek.
  • 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

[Aug 17 2017]

  • DOC: Describe new reload behaviour

[Aug 16 2017]

  • 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

[Aug 17 2017]

  • FIXED: Waiting for more than 10 threads to terminate.

[Aug 16 2017]

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

[Aug 15 2017]

[Aug 14 2017]

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

[Aug 11 2017]

  • FIXED: actually trigger GC thread.

[Aug 7 2017]

  • DOC: Mode directed tabling is provided.
  • CLEANUP: Updated comments and removed unused '$start_reset'/0.

[Aug 11 2017]

  • 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

[Aug 9 2017]

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

[Aug 7 2017]

  • BUILD: Make script/make-ppa a little easier to use
  • 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]

[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.
  • PORT: fallback code if C backtraces are not supported
  • DOC: char_type/2: typo.
  • FIXED: make compile with --disable-gmp

[Jul 10 2017]

  • MODIFIED: Updated Unicode classification from Unicode 6.0.0 to 6.3.0. This affects character classification for Prolog syntax, i.e., what are valid Prolog identifier characters, etc. Note that ASCII codes (0..127) are defined by the ISO standard and use a separate fixed table.
  • PORT: Generate either C or JavaScript code from our Unicode maps to support SWISH.

[Jul 7 2017]

  • FIXED: Issue#185: compile without gmp.

[Jul 6 2017]

  • FIXED: ^/2 and **/2 (pow) function for 32-bit. Jos de Roo.

[Jul 4 2017]

  • HACK: Avoid immediate crash in time limit enforcement. The current fix is not safe though.
  • DEBUG: Also print crash stacks for threads not related to Prolog.
  • FIXED: Issue#236 Handle github release files that have no extensions.
  • FIXED: file_name_extension(+Base, '', -Full) should not add a "." to Base.
  • FIXED: Possible segv in PL_thread_raise()

[Jul 3 2017]

  • ADDED: support Rational^NegInteger
  • FIXED: Possible crash during shutdown when reclaiming all memory
  • MODIFIED: PL_cleanup(): only try to reclaim memory if the exit status is zero. This provides a safe PL_cleanup() in the presence of cleanup hooks that may not be called in the right order or not function properly when called in arbitrary order.
  • FIXED: Issue#239: call clearThreadTablingData() before cleanupAtoms(). Still dubious to call the cleanup handlers of atoms during Prolog shutdown as they may depend on each other.

[Jul 2 2017]

  • MODIFIED: Issue#185: ^/2 and **/2: return rational on rat^non-neg-int. Jan Burse.
  • DOC: Fixed typo in documentation of random/3.

[Jun 30 2017]

  • FIXED: Possible deadlock if a thread is signalled by thread_signal/2 or an alarm timer, executing the signal traps the garbage collector and another thread is attempting an atom garbage collect. This because the AGC thread locks L_GC and then L_THREAD, while the signal action locks L_THREAD and then L_GC.
  • FIXED: qsave_program/2 using the option foreign(save) if there are multiple directories in the foreign search path (e.g., if there are packs). Nicos Angelopoulos.

[Jun 29 2017]

  • CLEANUP: timezone initialization. Also more robust if not properly setup on the OS.
  • FIXED: Issue#248: char_type/2 in mode (-,+) only generates ISO latin
    1. Wouter Beek.
  • ENHANCED: CLP(FD): Stronger exponentiation, using logarithm. This can be used to compute the most significant bit even without using msb/1. It may be useful for Brachylog.

    For example, previously:

    ?- 2^X+ R #= 1000, R #>= 0.
    2^X#=_1250,
    _1250 in inf..1000,
    _1250+R#=1000,
    R in 0..sup.

    Now:

    ?- 2^X+ R #= 1000, R #>= 0.
    X in inf..9,
    2^X#=_8836,
    _8836 in inf..1000,
    _8836+R#=1000,
    R in 0..sup.

[Jun 28 2017]

  • FIXED: dict_pairs/3: correct exception if a key is invalid. Jacco van Ossenbruggen.

[Jun 25 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.

    A new binding must not be dragged outside of disjunctions, since the code may look for example like this:

    i(X) :- ( X #= 3 ; X #= 4 ).

    In fact, this would previously not even compile, and instead raise:

    put_attr/3: Uninstantiated argument expected, found 3 (1-st
            argument)

    already during goal expansion.

    This commit fixes this issue, and still rewrites CLP(FD) expressions as far as possible already at compilation time.

    For example:

    n(X) :- X #= 1+3.

    This is now compiled to (note that 1+3 is evaluated to 4):

    ?- listing(n/1).
    %@ n(A) :-
    %@ ( integer(A)
    %@ -> A=:=4
    %@ ; var(A)
    %@ -> A=4
    %@ ; B=4,
    %@ clpfd:clpfd_equal(A, B)
    %@ ).

    Ideally, it should be compiled to:

    n(4).

[Jun 24 2017]

  • 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

[Jun 23 2017]

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

[Jun 22 2017]

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

[Jun 20 2017]

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

[Jun 19 2017]

  • 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 to keep the variable registered as seen. In a next step we should avoid such dead code being generated in the first place.
  • CLEANUP: Generalise compiler warnings for tests that always yield true/false.
  • ADDED: I_INTEGER instruction to speedup integer/1

[Jun 18 2017]

[Jun 16 2017]

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

[Jun 15 2017]

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

[Jun 14 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.

[Jun 11 2017]

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

[Jun 10 2017]

  • FIXED: current_type/2 to qualify goals that are local to library error.
  • DOC: Fixed .txt --> .tex dependency.

[Jun 9 2017]

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

[Jun 8 2017]

  • DOC: ! --> #!
  • 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.

[Jun 7 2017]

  • 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

[Jun 6 2017]

[Jun 4 2017]

[Jun 6 2017]

[Jun 5 2017]

  • CLEANUP: Avoid duplicate definitions of meta-specifications that need transparency
  • ENHANCED: Move meta-argument specification to arg_info structure, lifting the 16-argument limitation.

[Jun 3 2017]

  • ADDED: arg_info structure do deal with JITI and meta arguments

[Jun 2 2017]

  • ENHANCED: Keep indexes sorted by quality
  • FIXED: Select proper arguments for multi-argument indexes

[Jun 1 2017]

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

[May 31 2017]

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

[May 30 2017]

  • CLEANUP: Split accessing clauses to a new function
  • CLEANUP: make bestHash() return 1-based arguments for consistency
  • ENHANCED: Pass LD to bestHash()

[May 31 2017]

  • FIXED: Variables or meta-predicates not marked as non fresh, related to 406b689

[May 30 2017]

  • INSTALL: Avoid loading ~/.swiplrc during built (done by check-installation step).

[May 23 2017]

[May 22 2017]

  • DOC: Properly documented current (Unix) signal processing.
  • ENHANCED: Chain processing of SIGUSR2
  • DOC: Document recent changes to exception handling.

[May 19 2017]

  • 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

[May 21 2017]

  • PORT: Failed to build on Windows.

[May 19 2017]

  • ENHANCED: debug/3: only print the thread id instead of the ugly thread handle as thread context.

[May 18 2017]

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

[May 17 2017]

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

[May 18 2017]

  • FIXED: Handle uncaught Prolog exceptions from C++. Reported by Nikolaj Thygesen.

[May 17 2017]

  • FIXED: PL_write_term() must lock the stream

[May 16 2017]

  • FIXED: possible use-after-free when redefining a static predicate as thread_local

[May 15 2017]

  • FIXED: illegal memory access when computing whether the tty state was modified (Unix, mostly harmless).

[May 14 2017]

[May 12 2017]

[May 11 2017]

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

[May 10 2017]

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

[May 9 2017]

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

[May 7 2017]

  • MODIFIED: transpose/2 now fails for ragged matrices. Julien Cumin. Example, previously:
    ?- transpose([[a],[b,c]], Ts).
    Ts = [[a, b]].

    Now:

    ?- transpose([[a],[b,c]], Ts).
    false.

    Note that we had previously, and still have now:

    ?- transpose([[a,b],[c]], Ts).
    false.

    Thus, transpose/2 would previously succeed only for some ragged matrices, and now fails consistently if the matrix is ragged.

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

[May 2 2017]

  • FIXED: Memory leak for localised predicates that have no clauses as the thread dies.

[Apr 30 2017]

[Apr 28 2017]

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

[Apr 26 2017]

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

[Apr 25 2017]

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

[Apr 24 2017]

[Apr 23 2017]

  • 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

[Apr 21 2017]

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

[Apr 19 2017]

  • ADDED: PL_put_string_nmbchars()

[Apr 14 2017]

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

[Apr 12 2017]

  • FIXED: Steadfastness of partition/5. Example definition:
    c(A, B, Rel) :- compare(Rel, A, B).

    Sample query and answer, previously:

    ?- partition(c(a), [a,b,c], Ss, [], Gs).
    true.

    Now:

    ?- partition(c(a), [a,b,c], Ss, [], Gs).
    false.

    Note that the signature allows this usage mode!

  • FIXED: Correct error in partition/5.

[Apr 11 2017]

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

[Apr 9 2017]

  • ADDED: stream property write_errors(+How), which can be used to ask a stream (typically user_error) to ignore write errors.

[Apr 1 2017]

  • FIXED: library(record): module qualification of inlined type checks. Eyal Drechter.

[Mar 28 2017]

  • FIXED: Signal handling while shutdown is in progress.
  • FIXED: Avoid rewriting of '$aborted' exceptions and thus prevent an abort from happening.

[Mar 25 2017]

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

[Mar 23 2017]

  • ADDED: Support case conversion while importing CSV files.

[Mar 20 2017]

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

[Mar 17 2017]

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

[Mar 16 2017]

  • FIXED: Added human message for duplicate_key(+Key) dict error term.

[Mar 13 2017]

[Mar 11 2017]

  • FIXED: Codewalk library: do not propagate bindings between the branches of a disjunction (Abramo Bagnara).

[Mar 9 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.

[Mar 2 2017]

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

[Feb 28 2017]

  • FIXED: Handle thread-creation exceptions.

[Feb 27 2017]

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

[Feb 26 2017]

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

[Feb 25 2017]

  • FIXED: Possibility of dereferencing a NULL pointer

[Feb 20 2017]

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

[Feb 19 2017]

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

[Feb 17 2017]

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

[Feb 15 2017]

  • ADDED: convlist/3, compatible with YAP and SICStus.

[Feb 13 2017]

  • FIXED: Included file registration if there are multiple levels of include.

[Feb 10 2017]

[Feb 9 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.

[Feb 8 2017]

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

[Feb 7 2017]

  • 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 :(

[Feb 6 2017]

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

    1. if you want fast lookup, use rb_lookup/3;
    2. 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;
    3. 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.

[Feb 5 2017]

  • FIXED: pi_to_head/2: protect against an infinite loop.
  • FIXED: Make '$find_predicate'/2 fail if the unknown flag is warning. Douglas Miles.

[Feb 4 2017]

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

[Feb 3 2017]

  • PORT: Avoid trying to compile dlopen or emulations thereof if EMULATE_DLOPEN is active. Matthias Gondan.

[Feb 2 2017]

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

[Feb 1 2017]

[Jan 23 2017]

  • 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

[Jan 22 2017]

  • FIXED: meta-calling call/N. Samer Abdallah.

Package debian

[Apr 23 2017]

  • ADDED: package pcre

Package RDF

[Sep 10 2017]

  • DOC: replaced \url by \href
  • DOC: replaced \url by \href

Package archive

[Sep 10 2017]

  • DOC: replaced \url by \href

[Aug 15 2017]

[Jul 14 2017]

  • DOC: Fixed ungrammatical sentence.

[Jun 15 2017]

Package bdb

[Sep 10 2017]

  • DOC: replaced \url by \href

[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 chr

[Jun 24 2017]

Package clib

[Aug 11 2017]

  • FIXED: Deal with gc thread in fork/1

[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]

[Jul 4 2017]

[Jul 2 2017]

  • FIXED: SSL issue#110: Ensure stream is locked before closing it and relay error codes. Markus Triska.

[Jun 18 2017]

  • FIXED: Issue#29: directory_file_path(-,+,+) returns directory with trailing '/'. Paul Singleton.

[May 18 2017]

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

[May 17 2017]

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

[May 12 2017]

  • DOC: Pull request#9, Eyal Drechter.

[Apr 28 2017]

Package http

[Jul 22 2017]

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

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

[Aug 29 2017]

  • ADDED: http_handler/3: option condition(:Goal). Experimental.
  • MODIFIED: http_handler/4: deleted support for http_handler(prefix(...), ...). This was deprecated for a long time. Use prefix in the option list.
  • ENHANCED: No longer stop processing http_handler/4 declarations if expanding a virtual location fails. This prevents that a single wrong handler declaration stops the entire server.

[Aug 24 2017]

  • FIXED: Issue#104: Possibly undefined shift behaviour for long websocket messages on 32-bit platforms. Abramo Bagnara.

[Aug 14 2017]

  • ENHANCED: Issue#101: provide default UTF-8 encoding for Turtle derived formats and allow extending the mapping. Wouter Beek.

[Jun 29 2017]

[Jun 28 2017]

  • SECURITY: The HTTP Unix daemon now uses a much more secure set of ciphers as default. The goal is to make setting up secure HTTPS servers easy for users. With the new default, you obtain grade A at ssllabs.com for your servers, whereas you previously obtained only F.

    Future SWI-Prolog versions will likewise enable default ciphers that are deemed secure at the time of the respective release, and at the same time ensure compatibility with all but the most exotic or outdated devices.

    Note that obsolete ciphers must be disabled to reliably prevent protocol downgrade attacks.

[Jun 27 2017]

  • MODIFIED: http_peer/2 to prefer the X-Real-IP header and document the dubious status of the X-forwarded-for header.

[May 21 2017]

  • FIXED: Encapsulate predicates inside debugging/1 to avoid singleton warnings when running in optimized mode.

[Jun 14 2017]

  • ADDED: Set encoding to UTF-8 for application/x-prolog.

[Jun 10 2017]

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

[Jun 7 2017]

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

[May 22 2017]

  • ENHANCED: Allow the mapping from exceptions to HTTP replies to be extended through a hook.

[Apr 28 2017]

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

[Apr 26 2017]

  • FIXED: Clean websocket.o
  • FIXED: locking and error recovery in websocket stream
  • FIXED: locking issues and error recovery for opening chunked streams.

[Apr 24 2017]

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

[Apr 18 2017]

  • FIXED: Issue#84: ws_receive/3: fixed retry after an websocket ping message.

[Apr 14 2017]

  • FIXED: Make sure an unlikely exception while computing websocket random is not lost.

[Apr 12 2017]

  • FIXED: Correct setting name is StartLimitBurst. DefaultStartLimitBurst is only admissible in system.conf.

[Apr 11 2017]

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

[Apr 10 2017]

  • DOC: Correct default timeout for threaded HTTP servers.

[Apr 8 2017]

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

[Mar 21 2017]

  • FIXED: Create HTTP session gc thread lazily, so we can fork as a daemon.

[Mar 20 2017]

  • FIXED: json_convert: Use current_type/3 rather than direct clause to allow using protected code. Paulo Moura.

[Mar 16 2017]

  • FIXED: Call HTTP session begin broadcast after completing the session initialisation such that handlers can call e.g., http_session_assert/1.

[Mar 14 2017]

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

[Mar 4 2017]

[Mar 3 2017]

  • ADDED: atom_json_term/3: default as(As) defaults to atom and this predicate now supports chars.

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.

[Aug 30 2017]

  • FIXED: Engine pool management was subject to a race condition because pthread_cond_signal() was called without the mutex locked. This also turns out to be why pthread-win32 failed: apparently pthread_cond_signal() itself cannot be called without the associated lock held. Windows version still uses Event based implementation, but now a bit smarter and closer to the POSIX code.
  • FIXED: Issue#57: possible deadlock managing the engine pool. This is probably a bug in condition variable handling of pthread-win32. Under heavy load it is possible that pthread_cond_signal() deadlocks. The new implementation uses Windows Events for the Windows version. This probably also improves performance. Note that SWI-Prolog uses its own condition variable emulation for performance reasons.
  • FIXED: Pass --nosignals in all cases. Was missing for the tests and was deprecated -nosignals.

[Jun 27 2017]

  • WORKAROUND: Work around crash while starting the JVM.

Package libedit

[Sep 4 2017]

  • FIXED: Read lines longer than 4096 characters. Wouter Beek.

[Aug 15 2017]

  • FIXED: Only do signal prepare/unprepare for the primary console as we only have one signal handling space.

[Aug 11 2017]

  • FIXED: Avoid interrupted system call messages while reading from the terminal.

[Aug 3 2017]

  • PORT: Check whether we need ncurses.

Package ltx2htm

[Sep 10 2017]

  • DOC: Fix some really outdated remarks.
  • DOC: replaced \url by \href

Package nlp

[May 18 2017]

  • FIXED: Missing PL_register_atom() call for cached snowball stemmers. May cause OOPS: PL_unregister_atom(...): invalid atom messages as well as crashes.

Package odbc

[Sep 10 2017]

  • DOC: replaced \url by \href

[Aug 10 2017]

[Aug 8 2017]

  • 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

[Jun 1 2017]

  • ENHANCED: use SQLGetData() for wide NVARCHAR columns

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.

[Jul 6 2017]

  • COMPAT: Make this version of pengines talk to servers running pengines older than 0d0a818e8df029baf3ccd481c43ffe8098b1e6ae. Anne Ogborn.

[Jun 16 2017]

  • ENHANCED: SWISH Issue#62: allow redirecting I/O using e.g. with_output_to/2. Anne Ogborn.

[May 12 2017]

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

[May 2 2017]

  • FIXED: Use more reliable beforeunload to kill all running Pengines.

[Apr 11 2017]

  • ADDED: Allow setting source locations using :- '#file'(File,Line).

[Apr 2 2017]

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

[Apr 1 2017]

  • ADDED: Pengine emulation of read_line_to_{codes,string}

[Mar 23 2017]

[Mar 22 2017]

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

[Mar 20 2017]

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

[Sep 13 2017]

  • ADDED: Make <br> at the end of the line break a line. Nicos Angelopoulos.

[Sep 12 2017]

  • FIXED: Wrong handler name. Samer Abdallah.

[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

[Aug 29 2017]

  • FIXED: Disable PlDoc not by disabling path locations but by disabling its handlers using the new condition(:Goal) option of http_handler/3.

[Aug 19 2017]

  • ADDED: doc_enable/1 to enable/disable the documentation HTTP locations. Merely loading library(doc_http) no longer enables PlDoc to prevent it from being available in user HTTP servers by simply loading the code.
  • MODIFIED: Move PlDoc to /pldoc by default so even if it is loaded it will not conflict easily with the user's HTTP server.

[Jul 14 2017]

[Jul 12 2017]

  • TEST: Working on new test infrastructure.

[Jul 9 2017]

  • FIXED: face end before structure term.

[Jun 24 2017]

  • FIXED: Issue#27: recent change disallowed font switches inside a [...] label. Markus Triska.

[Jun 22 2017]

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

[Jun 18 2017]

  • FIXED: Avoid <img> alt to be prepended for the predicate name by inserting a space and compensate the layout. Not very nice ...

[Jun 15 2017]

  • FIXED: Formatting comments inside source code (broken after changes to the fragment classification).

[Jun 10 2017]

  • FIXED: Issue#21: Use /swi/ alias when generating a link to the source, so both backends produce the same link.

[Mar 9 2017]

  • DOC: cleanup, small fix

Package plunit

[Sep 10 2017]

  • DOC: replace \url with \href. Wouter Beek

[Sep 9 2017]

  • DOC: Fixed typo in plunit docs.

Package readline

[Sep 12 2017]

  • FIXED: Setting proper value for the readline flag. Samer Abdallah.

[Aug 3 2017]

  • PORT: Check for ncurses dependency

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.

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

[Jun 29 2017]

  • ADDED: Make pre_ground_object/2 also accept the old syntax to relieve compatibility between the two RDF APIs

[Jun 20 2017]

[Jun 18 2017]

[Apr 24 2017]

  • DOC: Missing instantiation indicator.

[Mar 29 2017]

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

[Jan 24 2017]

  • FIXED: application/turtle -> text/turtle

[Jun 15 2017]

  • FIXED: iri_turtle_prefix/2 returned the suffix after recent patch rather than the prefix. Jacco van Ossenbruggen.

[Jun 13 2017]

[Jun 11 2017]

  • FIXED: Issue#59: Possible "ambiguous stream pair" message. Wouter Beek.

[May 22 2017]

  • FIXED: Avoid ambiguous access to a stream pair.

[May 21 2017]

  • FIXED: Issue#57: Avoid ambiguous access to a stream pair.

[Apr 28 2017]

  • FIXED: Avoid ambiguous stream pair.

[Apr 24 2017]

  • IMPROVED: keep .gz suffix on source property for graphs loaded from file (similar to graphs loaded from http)

[Apr 3 2017]

  • FIXED: rdf11 type conversion hook now check for no string.

[Mar 29 2017]

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

[Mar 28 2017]

  • FIXED: Turtle parser: be precise about parsing language tags.

[Mar 27 2017]

[Feb 16 2017]

  • ENHANCED: print file name for stream when wrapped in stream(Stream) term.

[Feb 9 2017]

[Feb 4 2017]

Package sgml

[May 11 2017]

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

[Apr 28 2017]

  • FIXED: Avoid ambiguous stream reference

[Apr 26 2017]

  • FIXED: Handling of #empty and #default.

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, such as in:
    ?- phrase(utf8_codes([255]), Cs).
    %@ Cs = [195, 191].

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

[Aug 21 2017]

  • MODIFIED: The 2 predicates for symmetric encryption are renamed. See below. There were previously 2 predicates for symmetric encryption:
    evp_encrypt/6
    evp_decrypt/6

    They are now called, respectively:

    crypto_data_encrypt/6
    crypto_data_decrypt/6

    Only the names have changed, so please simply replace any calls.

    This change serves the following purposes:

    First, it puts these predicates into the crypto_... namespace that is adhered to also by most other predicates of library(crypto). This is also nice because the rather cryptic "evp_" prefix is OpenSSL-specific and makes very little sense to Prolog application programmers.

    Second, it paves the way for naturally named additional predicates that work incrementally. These new predicates will be called crypto_encryption_context/5, crypto_data_cipher_context/4 etc.

    I expect almost no impact on existing applications from this change:

    The two evp_... predicates were added less than one year ago to then library(ssl). However, these predicates were not really usable without cryptographically secure random numbers, and those were only made available one month ago. In the future, these predicates and especially the incremental versions will become much more important to encrypt large volumes of data.

[Aug 13 2017]

  • DOC: Clarify and correct documentation of symmetric encryption.

[Aug 11 2017]

[Aug 9 2017]

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

[Aug 8 2017]

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

[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]

[Jul 2 2017]

  • CLEANUP: Replace several trivial functions by in-place assignments. Many other context parameters were already set directly when parsing the given options, and there was little reason for further indirection because the SSL context is not opaque to begin with.

    In fact, too many similarly named entities made navigating the code harder than necessary and also quite a bit longer.

  • REMOVED: ssl_set_sni_hook/3. It is fully subsumed by ssl_set_options/3. The impact on existing code is negligible, since it only affects users who are already running SWI-Prolog HTTPS servers with SNI, but are not using the convenient HTTP Unix daemon interface for SNI and instead are using custom HTTP hooks to set up SNI. In all likelihood, there is currently only one user of this obscure feature (namely I).

    In case you are affected too, instead of:

    ssl_set_sni_hook(SSL0, Goal, SSL)

    please use:

    ssl_set_options(SSL0, SSL, [sni_hook(Goal)]).

    ssl_set_options/3 is the much more general interface predicate for tweaking contexts, fully subsuming ssl_set_sni_hook/3 and also other predicates that would otherwise have to be introduced to set various SSL parameters.

  • ADDED: New predicate ssl_set_options/3 for tweaking SSL contexts. This predicate is an important building block for setting various SSL parameters from hooks, such as when using the HTTP Unix daemon. Note the important design principle: No destructive modification to existing contexts! This is important to guarantee thread safety on the Prolog level. Logical purity all the way.

    Usage examples of this new predicate include:

    -) disabling specific protocol versions -) setting elliptic curves for key exchange -) enforcing client authentication via certificates -) etc.

    For example, to disable SSLv3, you can add the following definition to your server:

    http:ssl_server_create_hook(SSL0, SSL, _) :- ssl_set_options(SSL0,
        SSL, [disable_ssl_methods([sslv3])]).

    This is of course only necessary for old versions of OpenSSL, since SSLv3 is disabled in all versions that are still supported (>= 1.0.2).

[Jul 1 2017]

  • CLEANUP: disable_ssl_methods(+List): raise type errors on illegal input, use a long and warn in debug mode if setting fails.

[Jun 29 2017]

  • MODIFIED: By default disable SSLv3
  • DOC: The MacOS binary no longer uses the MacOS ssl library.
  • DOC: Added Markus as author
  • ADDED: ssl_secure_ciphers/1, making a list of default secure ciphers available. Moved from http package.

[Jun 26 2017]

[Jun 25 2017]

[Jun 23 2017]

  • CLEANUP: ssl context blob handling. Code was dubious, but probably not wrong.

[Jun 20 2017]

[Jun 19 2017]

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

    For reasoning about Bitcoin addresses with library(crypto), check out:

    https://www.metalevel.at/bitcoinolog/

    Sample use of scalar multiplication over elliptic curves:

    ?- crypto_name_curve(secp256k1, C), crypto_curve_generator(C,
       G), crypto_curve_scalar_mult(C, 5, G, P).

    Yielding:

    %@ C = <crypto_curve>(secp256k1, 0x21e8a90),
    %@ G =
       point(55066263022277343669578718895168534326250603453777594175500187360389116729240,
       32670510020758816978083085130507043184471273380659243275938904335757337482424),
    %@ P =
       point(21505829891763648114329055987619236494102133314575206970830385799158076338148,
       98003708678762621233683240503080860129026887322874138805529884920309963580118).

[Jun 18 2017]

  • 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

17 2017]

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

    For example, consider the following Prolog implementation, using the extended Euclidean algorithm:

    multiplicative_inverse_modulo_p(X, P, Y) :- eea(X, P, _, _, Y),
            R #= X*Y mod P, zcompare(C, 1, R), must_be_one(C, X, P, Y).
    
    must_be_one(=, _, _, _).
    must_be_one(>, X, P, Y) :-
            throw(multiplicative_inverse_modulo_p(X,P,Y)).
    must_be_one(<, X, P, Y) :-
            throw(multiplicative_inverse_modulo_p(X,P,Y)).
    
    eea(I, J, G, S, T) :- State0 = state(1,0,0,1), eea_loop(I, J,
            State0, G, S, T).
    
    eea_loop(I, J, State0, G, S, T) :- zcompare(C, 0, J), eea_(C, I,
            J, State0, G, S, T).
    
    eea_(=, I, _, state(_,_,U,V), I, U, V).
    eea_(<, I0, J0, state(S0,T0,U0,V0), I, U, V) :- Q #= I0 // J0,
            R #= I0 mod J0, S1 #= U0 - (Q*S0), T1 #= V0 - (Q*T0),
            eea_loop(J0, R, state(S1,T1,S0,T0), I, U, V).

    We now have, using the Prolog implementation:

    ?- time((between(1,1000,_),
       multiplicative_inverse_modulo_p(65341020041517633956166170261014086368942546761318486551877808671514674964848,
       115792089237316195423570985008687907853269984665640564039457584007908834671663,
       I),false)).
    %@ % 14,921,002 inferences, 1.133 CPU in 1.133 seconds (100% CPU,
       13173595 Lips)
    %@ false.

    And using the new crypto_modular_inverse/3:

    ?- time((between(1,1000,_),
       crypto_modular_inverse(65341020041517633956166170261014086368942546761318486551877808671514674964848,
       115792089237316195423570985008687907853269984665640564039457584007908834671663,
       I),false)).
    %@ % 326,205 inferences, 0.079 CPU in 0.079 seconds (100% CPU,
       4116844 Lips)
    %@ false.

[Jun 16 2017]

FIXED:ssl_peer_certificate/2,ssl_peer_certificate_chain/2:avoid
ambiguous stream pair warning. Sam Neeves.

[Jun 15 2017]

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

[Jun 9 2017]

[Jun 3 2017]

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

[Apr 25 2017]

  • CLEANUP: make ssl_close() more readable
  • CLEANUP: ssl_negotiate/5: more readable and complete cleanup in error conditions.

[Apr 24 2017]

  • FIXED: ssl_close(): return -1 on errors of underlying functions.

Package table

[Sep 10 2017]

  • DOC: replaced \url by \href

[Aug 2 2017]

  • PORT: Define unix, so we surely can undefine it.

Package utf8proc

[Sep 10 2017]

  • DOC: replaced \url by \href

Package xpce

[Sep 10 2017]

  • DOC: replaced \url by \href

[Aug 21 2017]

  • FIXED: QA warning (harmless). Jacco van Ossenbruggen.

[Aug 15 2017]

  • ADDED: PceEmacs: extend M-/ (dabbrev completion) to include the names of all global predicates.

[Jun 25 2017]

  • FIXED: prolog_predicate<-convert (reported as always false).

[Jun 12 2017]

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

[Jun 5 2017]

  • PORT: Update for changed indexed predicate property.

[May 14 2017]

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

[May 10 2017]

  • FIXED: regex->for_all: use end of match if match is not at start OR not empty instead of `AND not empty'.

[Apr 26 2017]

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

Package zlib

[Sep 10 2017]

  • DOC: replaced \url by \href