# Ann: SWI-Prolog 8.1.21

**URL:** https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-21/1778
**Category:** Releases
**Created:** [January 23, 2020, 3:15pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-21/1778 "2020-01-23T15:15:42Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)
#### Post date: [January 23, 2020, 3:15pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-21/1778/1 "2020-01-23T15:15:42Z")

</div>

Dear SWI-Prolog user,

I’m happy to announce SWI-Prolog 8.1.21. The main enhancements are  
related to tabling, but there are quite a few smaller but important  
fixes as well as many documentation enhancements thanks to the  
continuous comments on documentation on this forum. Highlights:

- Much better support for tabling with _answer subsumption_, also  
known as _mode directed tabling_. These patches notably allow  
_answer subsumption_ and normal tabled predicates to have mutual  
dependencies and provide _well founded semantics_ for predciates  
using _answer subsumption_. With these changes,  
[PLOW](https://github.com/theresasturn/plow), _A Meta-Interpreter  
for Fuzzy (Probabilistic) Logic Programming_ developed for XSB now  
runs on SWI-Prolog.

- Matt Lilley redesigned much of the library(ssl) handling of  
certificates. This supports more reasoning about certificate  
and more fine grained support of accepted certificates. Basic  
usage (using the default system certificates or no certificate  
checking) is compatible. Applications using more advanced  
certificate handling may need updating. See the changelog and  
documentation for details.

- When and where to prompt the user is rationalized and documented  
after discussion here.

- format/3 now raises an exception on excess arguments.

- Fixed a possible crash in stream\_pair/3.

- Several extensions to the XSB compatibility framework.

# SWI-Prolog Changelog since version 8.1.20

- FIXED: Compilation of single threaded version

- ENHANCED: Tabling with answer subsumption. This elaborate patch is a  
fundamental rewrite on how answer subsumption stores the aggregated  
answers and how it relates to the default tabling. It realises the  
following: - Support well founded semantics under answer subsumption

- FIXED: build without O\_PLMT.

- FIXED: crash in ‘$tbl\_worklist\_data’/2 (for table debugging).

- FIXED: Issue#537: stream\_pair/3 crashed if the first argument is not  
a blob (atom or stream pair). Reported by Peter Ludemann.

- FIXED: xpce isue#17: predicate\_label/2 should call  
prolog\_predicate\_name/2 using a _head_ rather than a _predicate  
indicator_. Paulo Moura.

- PORT: Add `-with-zlib` to the MinGW build instructions for library  
archive. Matt Lilley.

- FIXED: Docs says that prompting only depends on the `tty` property of  
`user_input`. Implementation also demanded `user_output` to be a  
tty. Now according to docs, which is compatible with e.g., `bash`.

- DOC: Updated docs for prompt/2.

- MODIFIED: Do not prompt if `user_input` is not connected to a terminal,  
i.e., stream\_property(user\_input, tty(true)) is `false`. After forum  
messages by Peter Ludemann and Boris Vassilev.

- DOC: deprecate old meta predicates and explain +/1 vs. not/1.

- FIXED: XSB get\_residual/2: also deal with answer subsumption.

- FIXED: table/1: answer subsumption (mode) specifications with only  
indexed arguments.

- ENHANCED: tabling with answer subsumption: as normal tabling, only  
add the unbound answer skeleton to the answer table.

- XSB: properly implement not\_exists/1.

- XSB: abort/1 is an XSB built-in rather than defined in `error_handler`.

- FIXED: Avoid predicate\_property(\_:Head, visible) with instantiated  
Head creating empty predicates in all existing modules. This is  
not a semantic problem, but it wastes resources.

- ADDED: Collect statistics on shared tabling: deadlocks and events where  
a thread has to wait for a table to be completed by another thread.

- FIXED: mutex\_statistics/0: keeping trackof known mutexes was broken.

- FIXED: Create the `shared_table_space` Prolog flag.

- MODIFIED: resource\_error(table\_space) is now  
one of resource\_error(private\_table\_space) or  
resource\_error(shared\_table\_space).

- XSB: :- table/1: accept `as private`.

- MODIFIED: format/1-3: raise an exception if there are more argument  
than are consumed by the format. Issue raised by Boris Vassilev  
on the forum. Note that this may result in good programs now being  
aborted with an exception. I have little clue as to how many problems  
this may raise. Introducing a flag to choose between silent operation,  
warning or error seems an overkill as well though.

- XSB: Added coninc/1,2 to the `gensym` module.

- XSB: Added `thread` module.

- XSB: provide thread\_shared/1.

- FIXED: Possibly use-after-free while inserting a node in a trie.  
This patch also fixes the trie/tabling memory usage admin.

- ENHANCED: read\_term/2,3 should not create a new module if the option  
module(Module) is given but the target module does not exist. Now uses  
`user` as this is the default module from which new modules inherit.  
Made this behaviour explicit in the documentation.

- DOC: Added library(thread) to main documentation.

- ADDED: prolog:deprecated//1 to generate dedicated deprecated messages.

- ADDED: tbacktrace/1,2: print the stack of another thread in the  
console for debugging purposes.

- ADDED: library(thread): call\_in\_thread/2 to run a goal synchronously  
in another thread, allowing to obtain information from a thread.

- DOC: Updated man/gen/swipl.bbl, the generated LaTeX bbl file used  
for the HTML documentation.

- DOC: predicate\_property/2 enhancements.

- DOC: Add library(prolog\_jiti) to the manual.

## Package http

- FIXED: Missing cut

- MODIFIED: http\_open/3: map cacerts\_file(File) to cacerts options.

## Package ltx2htm

- ENHANCED: Map some more mathematical symbols to HTML entities.

## Package plunit

- DOC: Fix documentation link. Also removes some old files from  
pre-cmake eras.

## Package semweb

- ENHANCED: library(semweb/rdf\_portray): recognise HTTPS URLs.  
Joos Geurts.

## Package ssl

- MODIFIED: ssl\_context/3 option processing. The option cacert\_file(File)  
has been deprecated in favor of cacerts(List) to ensure unambiguous  
merging of options. This notably affects the hook http:open\_options/2  
when both cacert\_file and cacerts options are provided. New rules:

## Package table

- PORT: Fix for MacOS by Abramo Bagnara.

---

<div class="post-metadata">

### Author: ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://swi-prolog.discourse.group/u/EricGT)
#### Post date: [January 23, 2020, 3:25pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-21/1778/2 "2020-01-23T15:25:29Z")

</div>

> Fuzzy (Probabilistic) Logic Programming

I hope this is a valid reference: [Fuzzy-probabilistic logic for common sense](http://agi-conference.org/2012/wp-content/uploads/2012/12/paper_31.pdf)

* * *

EDIT

See better reference in this [post](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-21/1778/5).

---

<div class="post-metadata">

### Author: ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://swi-prolog.discourse.group/u/EricGT)
#### Post date: [January 23, 2020, 3:26pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-21/1778/3 "2020-01-23T15:26:26Z")

</div>

> Matt Lilley redesigned much of the library(ssl) handling of certificates.

Thanks Matt.

---

<div class="post-metadata">

### Author: ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://swi-prolog.discourse.group/u/EricGT)
#### Post date: [January 23, 2020, 3:29pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-21/1778/4 "2020-01-23T15:29:05Z")

</div>

> When and where to prompt the user is rationalized and documented after discussion here.

I believe this is the proper post: [How to turn off "|:" prompt for reading from user\_input?](https://swi-prolog.discourse.group/t/how-to-turn-off-prompt-for-reading-from-user-input/1736)

---

<div class="post-metadata">

### Author: ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)
#### Post date: [January 23, 2020, 3:43pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-21/1778/5 "2020-01-23T15:43:05Z")

</div>

> [@EricGT](#):
>
> I hope this is a valid reference: [Fuzzy-probabilistic logic for common sense](http://agi-conference.org/2012/wp-content/uploads/2012/12/paper_31.pdf)

I think the correct reference is [http://ceur-ws.org/Vol-2350/xposter1.pdf](http://ceur-ws.org/Vol-2350/xposter1.pdf)
