SWI-Prolog Changelog

What's new in SWI-Prolog 7.6.3

Dec 21, 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.6 Dev (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 ''. 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.6.2 (Nov 24, 2017)

  • FIXED: Possibly crash in AGC when another thread is doing findall. Keri Harris.
  • ENHANCED: library(prolog_colour): handling of cross-module calls.
  • FIXED: Avoid instantiation errors when colouring insufficiently instantiated goals.
  • ENHANCED: Colour library: classify m:Var and m:noncallable as errors.
  • FIXED: predicate_property(m:P, autoload(File)) raised an instantiation error instead of enumerating the autoloadable predicates.
  • PORT: Global generation handling on machines without atomic 64-bit operations. James Cowgill. This is a temporary workaround. On the long run we should use libatomic to guarantee properly ordered operations that are fully portable. This should be a temporary fix for 32-bit platforms (mips, mipsel, powerpc, powerpcspe)
  • ADDED: Multiline CSV rows where newlines are embedded in quoted fields.
  • FIXED: atom_is_named_var(): incorrect classification of wide-character atoms leading to false multiton messages. Arthur Wang.
  • FIXED: _ is not subject to multiton check
  • FIXED: atom-garbage collection when compiled for single threading. Abramo Bagnara.
  • DOC: Document engine_destroy/1

New in SWI-Prolog 7.6.0 (Oct 11, 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

New in SWI-Prolog 7.4.1 (Sep 1, 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.
  • 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
  • FIXED: Avoid warning compiling set_breakpoint/5 in optimized mode.
  • 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.
  • 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).
  • FIXED: Included file registration if there are multiple levels of include.

New in SWI-Prolog 7.5.14 Dev (Sep 1, 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.
  • 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.
  • FIXED: retain exported attribute for predicates loaded from QLF files
  • FIXED: Possible crash when reloading a file holding foreign predicates. Jacco van Ossenbruggen.
  • 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.
  • ADDED: module_property/2: last_modified_generation(-Gen) property.
  • 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.
  • 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.
  • ADDED: is_trie/1. This patch also ensures that current_trie/1 and trie_property/2 do not enumerate destroyed tries for which the symbol is not yet garbage collected.
  • ADDED: trie_delete/3 to remove keys from a trie.
  • ENHANCED: concurrent/2, concurrent_maplist/2-4: catch signals while the main thread is waiting and cleanup if such a signal arrives.
  • 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
  • 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.

New in SWI-Prolog 7.3.25 Dev (Aug 10, 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).

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

  • 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

New in SWI-Prolog 7.3.17 Dev (Feb 12, 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

New in SWI-Prolog 7.3.16 Dev (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

New in SWI-Prolog 7.3.14 Dev (Dec 21, 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

New in SWI-Prolog 7.3.11 Dev (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.

New in SWI-Prolog 7.3.10 Dev (Oct 28, 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.

New in SWI-Prolog 7.3.6 Dev (Aug 28, 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. Julio Di Egidio.
  • ENHANCED: CLP(FD): Avoid residual variable for all_different([]). Ulrich Neumerkel.
  • 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). Markus Triska and Ulrich Neumerkel.
  • 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. Jan Wielemaker.
  • ADDED: Sandbox listing/1 if argument is not qualified.
  • ADDED: --disable-mt configure option.
  • DOC: Deal with \log{N}. Stephen Coda and Michael Hendricks.
  • 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 Dev (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. Ulrich Neumerkel.
  • 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

New in SWI-Prolog 7.2.2 (Jun 23, 2015)

  • 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: Invalid (but harmless) directive generated from exporting operators. Trapped by sandboxed loading.
  • FIXED: Possible crash reloading a file. Jacco van Ossenbruggen (hand-copied from 47100fd1c436d58e9ff767db5fc7592e926077bd)
  • FIXED: Prepare for errors while reading the history. Philippe Chatalic.
  • FIXED: Do not save anything from volatile predicates that are not dynamic or multifile.
  • FIXED: '$qlf_include'/5: inconsistent representation of files. Causes problems if :- include/1 is the first term of a file. Douglas Miles.
  • DOC: Path for MacOS app commandline version. Ognjen Savkovic.
  • FIXED: Allow colouring options for predicates that have otherwise specified colour instructions. E.g., the 2nd argument of load_files/2.
  • FIXED: format_time/3: %f rounding. Igor Wojnicki.
  • 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. Found by Jos de Roo.
  • FIXED: Location in error message when reading from a stream swapped line and line position.
  • FIXED: Wrong declaration (new warning). Jacco van Ossenbruggen.
  • FIXED: Avoid type error on arg(_, atom, _). Samer Abdallah.
  • BUILD: Added missing dependency to support parallel build. Roberto Bagnara.
  • 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.
  • DOC: Updated open/4 (Wouter Beek).
  • 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: 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. Found by Jos de Roo.

New in SWI-Prolog 7.3.3 Dev (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). Patch by Tom Schrijvers after analysis work by Markus Triska.
  • 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. Wouter Beek.
  • TEST: Added second (still failing) test for dif/2. Test by Markus Triska.
  • FIXED: Avoid DOS CRLF translation for e.g., format(atom(X), 'a\n', []). Keri Harris.
  • ADDED: PL_foreign_context_predicate() to find the predicate that is executing a foreign function. Keri Harris.
  • 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.

New in SWI-Prolog 7.2.1 (Jun 11, 2015)

  • The new dict type and syntax provides both time and space efficient name-value maps with a pleasant syntax.
  • As a consequence, it was necessary to replace the list constructor .(H,T) by the (also in use by Mercury) '[|]'(H,T). That may seem drastic, but in practice affects only a few programs, notably doing functor(Term, F, A) on lists and then selecting further processing on F == '.', A == 2. To turn lists more into a special construct, [] is still the empty list, but no longer the same as '[]', i.e., [] is not at atom.
  • The syntax "..." is now mapped to strings. Strings are compatible with ECLiPSe (thanks to Joachim Schimpf for all the discussions). Traditional code-lists are constructed using .... The flags double_quotes and back_quotes control this behaviour.
  • Thanks to Torbjorn Lager, we have "Pengines", Prolog engines on the web. This provides a generic API to talk comfortably to a Prolog server from JavaScript and other Prolog instances. It enabled SWISH, SWI-Prolog in your browser (http://swish.swi-prolog.org) as well as http://lpn.swi-prolog.org (Learn Prolog Now! with embedded SWISH).
  • Markus Triska added clp(b), the boolean constraint solver, improved his clp(fd) and was before several enhancements to the toplevel dealing with constraints.
  • Thanks to Matt Lilley and Mike Elston, there is CQL, a DSL (Domain Specific Language) for dealing with SQL. CQL is developed in an environment where complex SQL databases are the norm and therefore supports a large subset of SQL and can deal with tables with thousands of columns and other stuff that the ocasional SQL user won't expect.
  • Matt Lilley improved networking support significantly, including much better support for SSL and general support for both HTTP and SOCKS proxy servers.
  • Many people have provided add-ons (packs) that rely on SWI-Prolog version 7. See http://www.swi-prolog.org/pack/list.

New in SWI-Prolog 7.3.2 Dev (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.0 Dev (May 14, 2015)

  • MODIFIFIED: Name of Windows installer is now swipl--.exe
  • MODIFIED: Renamed archive files.
  • MODIFIED: Renamed .plrc --> .swiplrc and pl.ini --> swipl.ini
  • DOC: fixed some missing plrc --> swipl-rc renaming issues.
  • FIXED: Set stream type of open(pipe(_)) and with_output_to/2 streams to text (unless type(binary) is provided for a pipe).
  • ENHANCED: Provide more readable error messages for using text I/O to binary stream or byte I/O to text streams.
  • ADDED: Predicate property static. Omission was detected by the Logtalk test suite.
  • BUILD: Avoid unattended operation (./prepare --yes) to loop on errors.
  • COMPAT: read_term/1 and friends now peek the character behind the fullstop rather than reading it. This behaviour appears to be ISO compliant. Results from Logtalk test suite.
  • ENHANCED: Throw more errors from (built-in) option processing. Detected by the Logtalk test suite.
  • FIXED: current_input/1 and current_output/1 with instantiated argument. Resulted from Logtalk test suite.
  • DOC: Mode for empty_assoc/1.
  • FIXED: write_term/1: insert space between prefix op and {...}. Alan Baljeu.
  • ADDED: db_sync(detach) to detach a persistent database completely.
  • TEST: Modernised code for toplevel answer tests and added tests for detached residuals.
  • ADDED: Keep track of hidden residual goals and write them from the toplevel.
  • ENHANCED: CLP(B): suppress sat(V=:=V) constraints for inaccessible variables. Jan Wielemaker. Example:?- xor(X, Y, 0). %@ sat(1#X#Y).
  • ENHANCED: CLP(B): use a list of sat/1 goals in constraint projection This avoids many large formulas in residual constraints that do not occur anywhere in the program, and yields more readable relations.
  • ENHANCED: CLP(B): More compact residual goals. Variables that occur in sat/1 residuals are no longer redundantly constrained to Boolean expressions, because that is already implied.Example:
?- example_knights(5, [A,B,C]). %@ C = 0, %@ sat(A#B).
  • ENHANCED: CLP(B): remove all auxiliary variables from residual goals Example:%?- xor(X, Y, 0). %@ sat(X=:=X), %@ sat(1#X#Y), %@ sat(Y=:=Y).
  • CLEANUP: remove dummy hooks that were only necessary for sandboxing
  • ADDED: Attributed variable hook project_attributes/2 and a new Prolog flag toplevel_residue_vars. Suggested by Markus Triska.
  • ENHANCED: safe_goal/1 now accepts adding attributes for which no or only some of the hooks are defined. Suggested by Markus Triska.
  • ADDED: library(sandbox): call_residue_vars/2, call_with_inference_limit/3, call_with_depth_limit/3.
  • ADDED: CLP(B): project_attributes/2. Ready for toplevel integration.
  • ENHANCED: CLP(B): Stronger propagation, reducing choice points in labeling/1. We now apply the previous reasoning to all variables in the BDD. This currently slows down labeling significantly when collecting all solutions (there may be a way to improve this). However, it has the significant advantage that it propagates more strongly in many situations and leaves no redundant choice points after labeling/1.
  • FIXED: pack_install/1,2: Installation of dependencies inherited version. Nicos Angelopoulos.
  • MODIFIED: CLP(B): Residual goals are now in algebraic normal form(ANF). The advantage is clear: Goals can now be reposted on the toplevel. Drawbacks: Slower goal projection and more memory needed.
  • FIXED: CLP(B): Correct propagation for smaller than topmost index. Example:%?- sat(A=:=card([1],[A,B])). %@ B = 0, %@ sat(A=:=A).
  • FIXED: allow atom-GC to include threads running at-exit hooks
  • DOC: complexity of heaps library operations [Apr 29 2015]
  • DOC: complexity of heaps library operations Added the individual operations' time complexities.The Pettie reference is unnecessary since we don't support decrease-key anyway, and I wouldn't know how to ever fit that into a persistent implementation of pairing heaps except by brute-force search.
  • DOC: thread_create/3, at_exit(:AtExit) option. Jacco van Ossenbruggen.
  • DOC: Added library(persistency) documentation to the manual. Stephen Coda.
  • DOC: Added JPL documentation

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

  • 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.
  • 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.
  • DOC: open/4 create option (LaTeX error)
  • ADDED: library(error): uninstantiation_error/1.
  • INSTALL: support ./prepare --server=http://us.swi-prolog.org
  • DOC: function atan2/2: document ISO C99/POSIX discrepancies.
  • 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().
  • FIXED: Various issues wrt exception term-references
  • 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.

New in SWI-Prolog 7.1.36 Dev (Apr 15, 2015)

  • 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: Invalid (but harmless) directive generated from exporting operators. Trapped by sandboxed loading.
  • FIXED: Possible crash reloading a file. Jacco van Ossenbruggen (hand-copied from 47100fd1c436d58e9ff767db5fc7592e926077bd)
  • FIXED: Prepare for errors while reading the history. Philippe Chatalic.
  • FIXED: Do not save anything from volatile predicates that are not dynamic or multifile.
  • FIXED: '$qlf_include'/5: inconsistent representation of files. Causes problems if :- include/1 is the first term of a file. Douglas Miles.
  • DOC: Path for MacOS app commandline version. Ognjen Savkovic.
  • FIXED: Allow colouring options for predicates that have otherwise specified colour instructions. E.g., the 2nd argument of load_files/2.
  • FIXED: format_time/3: %f rounding. Igor Wojnicki.
  • 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. Found by Jos de Roo.
  • FIXED: Location in error message when reading from a stream swapped line and line position.
  • FIXED: Wrong declaration (new warning). Jacco van Ossenbruggen.
  • FIXED: Avoid type error on arg(_, atom, _). Samer Abdallah.
  • BUILD: Added missing dependency to support parallel build. Roberto Bagnara.
  • 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.
  • DOC: Updated open/4 (Wouter Beek).
  • 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: 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. Found by Jos de Roo.

New in SWI-Prolog 7.1.35 Dev (Apr 4, 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. Raivo Laanemets.
  • FIXED: Issue#42: pack_install/1 from versioned directory name. Raivo Laanemets.
  • FIXED: --traditional if atom table was initialized before calling PL_initialise(). This is the case for the Windows version. Paul Singleton.
  • ADDED: library(sandbox): sort/4 is safe.

New in SWI-Prolog 7.1.33 Dev (Mar 19, 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

New in SWI-Prolog 7.1.32 Dev (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
  • [Feb 24 2015]
  • 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
  • [Feb 21 2015]
  • 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.
  • a, stai, nu am copiat bine
  • asa:
  • 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.30 Dev (Feb 9, 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). Boris Vassilev.
  • 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.

New in SWI-Prolog 7.1.28 Dev (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.

New in SWI-Prolog 7.1.27 Dev (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.

New in SWI-Prolog 7.1.26 Dev (Nov 15, 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 Dev (Oct 24, 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.
  • 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).

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

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

New in SWI-Prolog 7.1.22 Dev (Sep 4, 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 Dev (Sep 2, 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)),

New in SWI-Prolog 7.1.20 Dev (Aug 12, 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.19 Dev (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 Dev (Jul 25, 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()

New in SWI-Prolog 7.1.17 Dev (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.

New in SWI-Prolog 7.1.13 Dev (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).

New in SWI-Prolog 7.1.12 Dev (Apr 17, 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.

New in SWI-Prolog 6.6.4 (Mar 21, 2014)

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