# Ann: SWI-Prolog 8.1.3

**URL:** <https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-3/395>\
**Category:** Releases\
**Created:** [March 13, 2019, 3:14pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-3/395 "2019-03-13T15:14:48Z")\
**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:** [March 13, 2019, 3:14pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-3/395/1 "2019-03-13T15:14:49Z")

</div>

Dear Prolog user,

I’m happy to announce SWI-Prolog 8.1.3. Thanks to extensive feedback and  
help, things are moving fast. Highlights:

- SECURITY: fixed possible buffer overrun in the SGML/XML/HTML parser.  
This bug is related to error reporting against documents processed  
from http\_open/3 on a long URI. With help from Keri Harris.

- Goal expansion can now easily wrap a goal without running into  
non-terminating expansion. With input from Peter Ludemann and  
Paulo Moura.

- Fixed various issues wrt. tabling and XSB emulation. The source  
now includes two of the tabling test suites from XSB. With help  
from Teri Swift and David Warren.

- Improvements to garbage collection scheduling. This can cause huge  
speedups in some rare corner cases. Abramo Bagnara.

- Fixed packaging issues for Debian and MacOS with help from Lev Lamberov  
and Paulo Moura.

- Fixed swipl-ld.exe for Windows with help from Abramo Bagnara.

# SWI-Prolog Changelog since version 8.1.2

- MAINTENANCE: Provide support for using AddressSanitizer  
(-fsanitize=address) See `CMAKE.md`

- DEBUG: Avoid c99 dependency `for(int i=0; ...` in DEBUG statement.

- INSTALL: Added declaration for JNIDIR (requires updating jpl module)

- PORT: Android minizip USE\_FILE32API

- TEST: Added XSB `ai_tests` set to our test suite.

- FIXED: ‘$tbl\_table\_discard\_all’/1 deleted worklists twice.

- XSB: Fixed handling a redefined XSB module if the redefined SWI-Prolog  
module was already loaded.

- TEST: Added xsbtests/basic\_tests test suite from XSB Prolog to  
our tests. Added a Prolog driver to fit these tests into the  
SWI-Prolog/CTest framework. Also avoided some _singleton in branch_  
message and use include/1 to get the data set available from multiple  
modules.

- FIXED: :- table/1: undefined predicate check should ignore implicitly  
imported predicates.

- FIXED: reloading a file with tabled predicates sometimes failed to  
rename the implementation.

- XSB: Added dummy implementations for set\_pil\_on/0 and set\_pil\_off/0.

- PORT: Conditionally deal with `-fprofile-dir=` and  
`-Wno-maybe-uninitialized` as these are not supported in the default  
MacOS toolchain. Paulo Moura.

- FIXED: Reenable actually freeing worklists.

- DOC: Updated demo/README and renamed to README.md

- FIXED: trie\_gen/3: memory leaks

- CLEANUP: Use new unification style extraction for trie terms for also  
for trie\_term/2 and its internal usage in tabling.

- TEST: Adjust test parameters for changed GC policies.

- ENHANCED: Make gc scheduling dependent on the sizes of all stacks.

- ADDED: Collect statistics over most recent garbage collections,  
including the time spent on GC relative to useful CPU time.

- TEST: Moved trie tests from core to tabling for better balance.

- FIXED: trie\_gen/3: Variable database resizing.

- FIXED: tries for complex nested terms. Bug introduced with new  
trie\_gen/3 implementation.

- PORT: `swipl-ld.exe` to configure for native MinGW tools.

- FIXED: `swipl.exe --dump-runtime-variables` to provide the right  
value for `PLLIBDIR` on Windows. Abramo Bagnara.

- FIXED: Avoid excessive GC because the system incorrectly believes it  
is nearly reaching the stack limit. This is only part of the solution  
to avoid excessive GC.

- TEST: Test trie\_gen/3 variable sharing.

- DOC: expand\_goal/2 discussing fixed-point computation for generating  
wrappers.

- ENHANCED: goal\_expansion/2: when wrapping a goal, do allow the same  
expansion to work on arguments.

- ENHANCED: Allow goal\_expansion/2,4 to wrap a goal.

- COMPATIBILITY: Allow basic saved states to work with --traditional.

## Package debian

- INSTALL: Use -DJNIDIR=$(JNIDIR), leaving installation of libjpl.so  
to CMake.

## Package jpl

- INSTALL: Allow installing libjpl.so in $JNIDIR to support Debian  
install. After discusion with Lev Lamberov.

## Package ltx2htm

- FIXED: read outside automatic variable.

## Package sgml

- SECURITY: Possible buffer overrun when handling parser errors and  
warnings if the file name is very long. This patch also puts a  
separate length constraint on the location such that not all space is  
used by the location part of the message. With help from Keri Harris.

---

<div class="post-metadata">

**Author:** ![ridgeworks](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/ridgeworks/32/886_2.png) [@ridgeworks](https://swi-prolog.discourse.group/u/ridgeworks)\
**Post date:** [March 25, 2019, 9:32pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-3/395/2 "2019-03-25T21:32:49Z")

</div>

Just wanted to send kudos for those responsible for the optimizations in garbage collection. Any of my tests that had significant time spent in GC were much improved, some by a factor of 10. Guess you hit my sweet spot.

---

<div class="post-metadata">

**Author:** ![abaljeu](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/abaljeu/32/136_2.png) [@abaljeu](https://swi-prolog.discourse.group/u/abaljeu)\
**Post date:** [March 26, 2019, 6:45pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-3/395/3 "2019-03-26T18:45:45Z")

</div>

![image](https://global.discourse-cdn.com/free1/uploads/swiprolog/original/1X/6f0009b7ef9a670ee78a0d07175b7ce1d0863f62.png)

Were any of these supposed to be updated?

![image](https://global.discourse-cdn.com/free1/uploads/swiprolog/original/1X/1a41801073611b4943f7c77792cced9141b688fb.png)

---

<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:** [March 26, 2019, 7:44pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-3/395/4 "2019-03-26T19:44:22Z")

</div>

I can’t interpret that. The top seems to suggest %PATH% cannot be extended. That is either an NSIS or Windows limitation. No idea what the bottom is about.

---

<div class="post-metadata">

**Author:** ![abaljeu](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/abaljeu/32/136_2.png) [@abaljeu](https://swi-prolog.discourse.group/u/abaljeu)\
**Post date:** [March 27, 2019, 12:29am UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-1-3/395/5 "2019-03-27T00:29:36Z")

</div>

The bottom is files in swipl/bin that are not current. My concern is maybe the setup error caused things to not be installed.
