# Ann: SWI-Prolog 8.3.6

**URL:** <https://swi-prolog.discourse.group/t/ann-swi-prolog-8-3-6/2819>\
**Category:** Releases\
**Created:** [August 24, 2020, 7:27pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-3-6/2819 "2020-08-24T19:27:04Z")\
**Posts on this page:** 2\
**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:** [August 24, 2020, 7:27pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-3-6/2819/1 "2020-08-24T19:27:04Z")

</div>

Dear SWI-Prolog user,

I have uploaded SWI-Prolog 8.3.6. This version brings important fixes,  
extensive internal rewrites and some performance improvement. See below  
for details.

Note that the internal rewrites may have caused regression. Please  
test.

```
Enjoy --- Jan

```

# SWI-Prolog Changelog since version 8.3.5

- FIXED: Possibly crash in wrap\_predicate/4. With help from Peter  
Ludemann.

- FIXED: re-enable inline unification after switching off debug mode.  
Rick Workmann.

- ENHANCED: Proper Last Call Optimization (LCO) for a subset of the  
calls: last calls for which each argument is a variable (with some  
restrictions), a small integer or atom.

- MODIFIED: Extensive rewrite to avoid variable references inside  
and between environments, i.e., reference pointers _always_ point  
at or inside the global stack. This is a necessary step for LCO.  
The only visible change is PL\_put\_term(to, from) which used to be a  
`void` function but which may now need to allocate a variable on the  
global stack when two fresh term references are unified. As a result  
PL\_put\_term() may fail.

- ADDED: library(sandbox): support load\_files/2 with safe options.

- FIXED: SICStus emulation: avoid mapping use\_module/1,2 unconditionally.

- FIXED: is/2 using optimised arithmetic with a float value while the  
left side is instantiated to a float can exit Prolog (unintended  
`return`).

- FIXED: load\_file/2: if(changed) option for loading a non-module file  
was ignored, always loading the file.

- ADDED: library(prolog\_code): is\_predicate\_indicator/1.

- FIXED: supporting wide file names in qlf files

- ENHANCED: ignore tty stream errors when there is no active terminal

- ADDED: set\_system\_IO/3 to bind stdin/stdout/stderr to Prolog streams

- FIXED: compile\_predicates/1: wrong handling of module qualification  
causes `compile_predicates(Module:List)` to fail.

- COMPAT: Export memberchk/2 from library(lists).

- FIXED: Make sure the xpce boot files are handled as library files  
and not as user files to avoid xpce failing to load when the user  
defines global conflicting operators.

- FIXED: Encoding for command line options passed through  
‘$cmd\_option\_val’/2. Reported by UweR on Discourse.

- PORT: Support Unicode wmain() for Windows. This adds PL\_winitialise().

- FIXED: copy\_stream\_data/2: ensure exceptions are passed.

- DOC: consistency of docs for forall/2 and concurrent\_forall/2.

## Package bench

- LEGAL: Clarified legal status of benchmarks contributed by David H  
Warren with permission from the author.

- PORT: Allow running the benchmark using YAP again.

- LEGAL: Re-licensed chat80-derived benchmark after re-licencing  
of CHAT-80. See [https://github.com/JanWielemaker/chat80](https://github.com/JanWielemaker/chat80), commit  
f0e120e7f99a5c1314370e6805655f75073415c0

## Package cpp

- PORT: Avoid including `malloc.h` for FreeBSD. Didier31 through  
Discourse.

- FIXED: PlTerm::PlTerm(double val): deal with failing PL\_new\_term\_ref()

## Package jpl

- FIXED: put\_term() to handle error cases

## Package odbc

- FIXED: Error propagation from SQL\_SUCCESS\_WITH\_INFO and PL\_put\_term().

## Package semweb

- DOC: fixed rdf\_has second argument mode to match wrapped  
rdf\_db:rdf\_has4

## Package ssl

- FIXED: Two more 365 timeouts on certificates. Lev Lamberov.

- TEST: Increase both certificate expiry time and CRL  
refresh time to 3 years so that tests will pass 3 years  
after builds with no further actions required. See  
[https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=968013](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=968013)

---

<div class="post-metadata">

**Author:** ![swi](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@swi](https://swi-prolog.discourse.group/u/swi)\
**Post date:** [August 24, 2020, 8:16pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-3-6/2819/2 "2020-08-24T20:16:18Z")

</div>

> [@jan](#):
>
> some performance improvement.

Great, I get a 10%-20% improvement (PGO compiled) for some simple DCG code I have.

Thanks!!
