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

SWI-Prolog Changelog from version 8.4.2 to 8.4.3

[Jun 15 2022]

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

[Apr 23 2022]

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

[May 23 2022]

  • FIXED: Sfprintf(): handling of ENC_WCHAR() encoding.
  • ENHANCED: Sfprintf(): allow Unicode characters for %c

[Jun 15 2022]

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

[Jun 12 2022]

  • FIXED: write_term/2 and friends handling of embrace of operants that are operators for partial writes.
  • FIXED: no space is required between a space and (.

[Jun 11 2022]

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

[Jun 9 2022]

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

[Jun 8 2022]

  • DOC: Started documenting SWI-Stream.h
  • FIXED: Sgets() handling of non-0-terminated output from Sfgets().

[Jun 2 2022]

  • DOC: ord_intersection/2 is semidet.
  • DIST: Fixed rmd160 generation for scripts/update-macports

[Jun 1 2022]

  • FIXED: write_term/2 with numbervars and variable_names (#866)
  • FIXED: Issue#993: possible deadlock when loading a module. Reported by Sean Leather.

[May 23 2022]

[May 17 2022]

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

[May 15 2022]

  • FIXED: explain/1: hide references from called/5
  • FIXED: Have breakpoints cleared in the UI when the clause that holds them is removed during a reload of the file.

[May 14 2022]

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

[May 13 2022]

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

[May 12 2022]

  • FIXED: Issue#122: dif/2: or-node simplification.
  • FIXED: Possible deadlock enumerating predicates from a source file.

[May 10 2022]

[May 6 2022]

  • FIXED: LaTeX conflict preventing building the PDF docs

[Apr 21 2022]

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

[Apr 19 2022]

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

[Apr 17 2022]

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

[Apr 15 2022]

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

[Apr 13 2022]

[Apr 12 2022]

[Apr 8 2022]

[Apr 7 2022]

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

[Apr 5 2022]

[Apr 4 2022]

[Apr 3 2022]

  • FIXED: Possible wrong Windows drive letter normalisation.

[Apr 2 2022]

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

[Apr 1 2022]

  • PORT: Msys2/clang64
  • PORT: MSYS2/clang64 the dll name appears several times in the ".a" file, select the first appearance
  • FIXED: swipl-ld didn't pass -I for SWI-Prolog.h any more.

[Mar 30 2022]

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

[Mar 29 2022]

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

[Mar 27 2022]

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

[Mar 26 2022]

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

[Mar 24 2022]

  • FIXED: swipl-ld: access to uninitialized memory

[Mar 22 2022]

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

[Mar 21 2022]

[Mar 20 2022]

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

[Mar 18 2022]

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

[Mar 16 2022]

  • FIXED: fast_term_serialized/2: memory leak.
  • FIXED: Avoid transaction rollback to be recorded (memory leak).
  • FIXED: Avoid leaking a trie node on concurrent insert of the same value.
  • ENHANCED: if we created a supervisor that is equal to the existing, discard the new one. This may happen if multiple threads create a supervisor. Leaks memory as we cannot safely discard a running supervisor.

[Mar 14 2022]

  • FIXED: consistent use of tree pool allocation.

[Mar 13 2022]

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

[Mar 15 2022]

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

[Mar 10 2022]

  • ADDED: Make encoding accessible by name using PL_atom_to_encoding() and PL_encoding_to_atom()
  • DOC: tabling po(Compare) argument.

[Mar 8 2022]

  • DOC: refer to pack debug_adapter in the GNU Emacs Interface page
  • FIXED: dif/2 not firing after unifying with other attributed variables.

[Mar 7 2022]

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

[Feb 28 2022]

  • ADDED: on_signal/3 now takes value 'ignore' This allows for requesting the SIG_IGN disposition, and also unifies the SIGPIPE behavior with the other initially-prepared signals. Technically, this could be considered a backwards-incompatible change. However, for this to actually affect someone's working code, they would have to
    1. Redefine the system predicate ignore/1,
    2. Call on_signal(Sig, _, ignore), AND
    3. Expect ignore(Signal) to do something besides ignoring Signal; and in that case I think we can all agree they've brought this trouble upon themselves. :)

      Also adds SIGPIPE's default disposition to the docs.

[Feb 25 2022]

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

[Feb 24 2022]

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

[Feb 19 2022]

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

[Feb 18 2022]

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

[Feb 16 2022]

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

[Feb 17 2022]

  • PORT: Issue#939: TLD_alloc() undefined error on Win32. @mgodan.
  • FIXED: Gui tracer for inlined unification with SSU clauses, e.g. p(X), X = aap(N) => writeln(N).
  • FIXED: Allow tracing test predicates that are inlined into the VM.
  • FIXED: Make gui tracer handle inlined head unifications.
  • FIXED: rule/3 for => rules that have the unification moved into the head and listing/1 for such SSU clauses.

[Feb 15 2022]

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

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

  • FIXED: Consider $/0 a breakable instruction. This fixes the debugger

for clauses holding $/0.

  • FIXED: Avoid instantiation error on =../2 when analysing clause

positions with incomplete information.

[Feb 14 2022]

  • SANDBOX: SWISH issue#147: Allow for copy_term/4.
  • FIXED: Allow retry from the body of => rules.
  • ENHANCED: Avoid tracing inside spy/1, nospy/1 and related debug control predicates.
  • FIXED: Issue#935: package manager: download location of git archives
  • DOC: Remove obsolete reference of break/1 trace port

[Mar 22 2022]

  • FIXED: Issue#963: possible undefined to_list/2 in message handling. Caused by wrong backport.

Package clib

[Jun 7 2022]

  • FIXED: process_create/3: allow env([]).
  • FIXED: process_create/3: Windows: make environment(List) inherit the environment as documented.
  • FIXED: process_create/3: double env/environment option raised an assertion failure. Now raises a permission error.

[Mar 30 2022]

  • TEST: Disable CGI test for Windows because environment variables set using Prolog setenv/2 are not visible in the CRT runtime function getenv(). This either requires updating the CGI module to use the Win32 environment API or start a new process for reading the CGI input.

[Mar 29 2022]

  • TEST: Cross-platform null in stream_input

[Mar 23 2022]

  • ENHANCED: Close sockets that are reclaimed because their blob is being garbage collected.

[Mar 12 2022]

[Mar 11 2022]

[Mar 10 2022]

  • ADDED: udp_receive/4 as(term) to parse the message into a Prolog term.
  • ADDED: udp_receive/4 and udb_send/4: encoding(Enc) option to affect the encoding.
  • CLEANUP: Use new PL_atom_to_encoding() to avoid code duplication.

[Mar 9 2022]

  • TEST: Disable test killing non-existing process on MacOS. Can deliver SIGTERM to Prolog itself when executed concurrently.

[Feb 28 2022]

  • TEST: test_af_unix works without signals

[Feb 23 2022]

  • FIXED: memory_file_to_atom/3: do not trap an assertion if the encoding is not supported but raise a domain error instead.

[Feb 17 2022]

  • FIXED: tcp_connect/3 and other predicates that rely on nbio_get_sockaddr() to initialize the unused part of the address.

Package clpqr

[Mar 31 2022]

[Feb 23 2022]

  • MODIFIED: renamed internal modules with names that may easily conflict to clpqr_ followed by the old name. As as result the attributes on variables have also be renamed. Should not affect code unless applications use explicitly qualified calls or directly manipulate the attributes.
  • ENHANCED: Faster dump/3 implementation.

Package cpp

[Jun 15 2022]

  • ADDED: PlFunctor class conversion and comparison to functor_t

[May 23 2022]

  • TEST: Add Unicode/wchar tests

[May 12 2022]

  • TEST: PL_atom_wchars print

[Apr 17 2022]

  • TEST: Added foreign language interface regression tests

Package http

[Jun 1 2022]

[May 16 2022]

  • ADDED: http_open/3: option raw_encoding(+Encoding) to prevent deconding certain (transfer) encodings.
  • ADDED: http_open/3: option raw_headers(-Strings) to get access to the unparsed HTTP header as a list of strings.
  • ADDED: http_post_data/3: support string(String) and string(Type, String) simlar to atom(String) and atom(Type, String). Avoids creating a potentially large garbage atom.

[May 3 2022]

  • ENHANCED: Reduce overhead of session GC

[Mar 29 2022]

  • PORT: Make CGI tests succeed on Windows. @mgodan1

[Mar 28 2022]

  • UPDATED: Bundled jquery from jquery-1.11.3 to 3.6.0.

[Mar 16 2022]

  • REVERT: It is not a good idea to handle file input not as binary.
  • FIXED: HTTP multipart message handling: set encoding for uploading a file and ensure that switching to octet restores the binary mode. After report by Mike Elston.

[Mar 9 2022]

  • TEST: Avoid non-termination if there is an error.

[Mar 8 2022]

[Feb 18 2022]

  • FIXED: Ping and pong frames may contain non-utf8 "Application Data"

Package libedit

[Feb 25 2022]

  • MODIFIED: Don't do any signal-handling if O_SIGNALS is disabled

Package mqi

[May 12 2022]

  • FIXED: Residual constraints on variables are now returned in a special binding variable called '$residuals' MQI Prolog change only, no changes to the language clients (e.g. the swiplserver Python library) are required.

    Usage:

    with server.create_thread() as client:

    result = client.query("member(X, [A, B, C]), put_attr(X, my_module, x).") [{'$residuals': [{'args': ['A', 'my_module', 'x'], 'functor': 'put_attr'}], 'X': 'A', 'A': 'A', 'B': '_', 'C': '_'}, {'$residuals': [{'args': ['B', 'my_module', 'x'], 'functor': 'put_attr'}], 'X': 'B', 'A': '_', 'B': 'B', 'C': '_'}, {'$residuals': [{'args': ['C', 'my_module', 'x'], 'functor': 'put_attr'}], 'X': 'C', 'A': '_', 'B': '_', 'C': 'C'}] == result

[May 6 2022]

  • FIXED: If exceptions happen during serialization to JSON, MQI will now send an exception message instead of hanging

[Feb 15 2022]

  • FIXED: On a multi-user system, running the MQI test suite fails if
    you're the second user to do that. Reported by @dmchurch
  • FIXED: Goals are now expanded when used in MQI as they are on the top level. Found by @Losbarthos

Package pengines

[Jun 11 2022]

  • FIXED: term//2: operator atoms for other operators must always be embraced.

[Apr 22 2022]

  • ENHANCED: Pengines waiting for a new event now wait the first second without idling. After than they call thread_idle/2 to minimise their footprint. This avoids garbage collections for short waits while going into a deeper sleep mode for a long wait.

[Mar 29 2022]

  • ENHANCED: term//2 for rendering terms as HTML has many new options and provides HTML that is easier to deal with using JavaScript and CSS.

Package pldoc

[Jun 9 2022]

  • DOC: Support the S*() functions for IOSTREAMS.

[May 9 2022]

  • MODIFIED: when creating a link from a URL, do not include a punctuation character before a space. So, http://example.com/home.html. Bla correctly links to the html page.

Package plunit

[May 5 2022]

  • ENHANCED: show_coverage/2: use new built-in coverage collecting primitives to achieve only a modest slow down.

[Apr 20 2022]

  • ENHANCED: show_coverage/1,2: call-site annotation (sub goals), several new options to control the output.

Package semweb

[Apr 3 2022]

  • PORT: msys2/clang64, Release, avoid unused warning

Package sgml

[May 13 2022]

  • FIXED: Avoid illegal access to local variable (harmless)

[Apr 21 2022]

  • CLEANUP: Use PATH_MAX consistently

[Apr 7 2022]

  • TEST: Make test_c14n.pl tests independent from newline conventions.
  • TEST: Make test_sgml.pl independent from newline conventions.

[Mar 22 2022]

  • ENHANCED: Avoid leaking the DTDs in the main thread on exit.

Package xpce

[May 17 2022]

  • FIXED: PceEmacs Prolog/spy and Prolog/trace menu items to deal with SSU (=>) rules and fix DCG (-->) rules.

[May 15 2022]

  • ADDED: PceEmacs: Prolog mode command Set breakpoint condition.

[Apr 21 2022]

  • CLEANUP: Consistently use PATH_MAX

[Apr 20 2022]

  • CLEANUP: Use POSIX PATH_MAX rather than MAXPATHLEN

[Apr 17 2022]

  • ADDED: file->open: allow using resource iris
  • ENHANCED: file->size to use information from the stream when the file is open.
  • ADDED: Allow opening res:// resources.

[Apr 11 2022]

  • ADDED: PceEmacs to recognise Emacs -*- Var: Value; ... -*- syntax. For now only processes tab-width: Width;

[Apr 10 2022]

  • FIXED: PceEmasc Consult selection command resulted in an error message wrt. format/3 and url/1 terms.

[Mar 24 2022]

  • CLEANUP: MinGW-11 complains on cl_hash() in gitwrite.c. Code seems fine to me, but a simple memset() does the same trick and keeps the compiler silent.
  • FIXED: GIF: Write last byte outside mask image if width is divisible by 8.
  • FIXED: Buffer overflow by one byte. Avoid using alloca().
  • FIXED: Read outside object.
  • PORT: Avoid non-portable %I64d.

[Mar 18 2022]

  • TEST: Make test file conform to policies and include into the test set.

[Mar 1 2022]

  • FIXED: edit or create the Prolog preferences file from the swipl-win menu.

[Feb 17 2022]

  • FIXED: Occasional lack of display update, notably in the graphical debugger. This fix is a work-around that disables an early abort of the repaint cycle if a new event arrives. It is not clear why this fixes the redraw issue. This needs to be investigated further. Applications that wish the old behaviour can use `send(@display_manager, test_queue, @on)`.
  • FIXED: Delay geometry request for windows with a given geometry to happen after processing the MapNotify event (X11 only). This seems to avoid a 5 sec delay that sometimes happens in the XtGeometryRequest() call.