Ann: SWI-Prolog 8.3.8

Dear SWI-Prolog user,

I’m happy to announce SWI-Prolog 8.3.8. Highlights:

  • Quite a few enhancements to JPL for better support of the
    GOAL agent programming language together with Vincent Koeman. Notably

    • Provide one-to-one Java/Prolog threads
    • Fix JPL for 64-bit windows (pointers were casted to an intermediate
      32-bit integer)
    • Fix JPL for 32-bit windows (requires MinGW --kill-at link option).
  • Added a new library(strings), providing long string quasi quotation,
    multi line string indent/dedent and string interpolation. With help
    from notably Peter Ludeman for the string indent predicates, naming
    and porting Python tests. Not 100% settled yet, but close.

See below for some smaller issues that have been resolved. Thanks for
all the contributions!

Enjoy --- Jan

SWI-Prolog Changelog since version 8.3.7

  • ENHANCED: library(strings): added indent_lines/3 and test cases for
    indent_lines, dedent_lines/3 derived from Python.

  • ADDED: library(strings).

  • TEST: Issue#675: avoid duplicate coroutining test unit. David

  • FIXED: Declarations such as dynamic/1 to enforce the argument to
    be predicate indicators. Before that, a head was accepted which
    causes these predicates to succeed silently when the arity is omitted,
    working on name/0.

  • CLEANUP: Replace complex macros in the parser by functions. Also added
    a maintenance debug topic for operator parsing.

  • PORT: Only use __declspec for MSVC and MinGW. Also Cygwin now uses
    traditional extern.

  • PORT: Issue#668: compilation on Cygwin for thread_affinity/3.

  • FIXED: function roundtoward/2 with variable direction was miscompiled,
    causing a crash. Rick Workman.

  • ENHANCED: library(portray_text): use appropriate quote (` or "),
    escape the quote inside a string and added portray_text:is_text_code/1
    to allow the user to extend the codes that are considered likely
    text codes.

  • DEBUG: invalid internal debug message, crashing in full trace mode.

  • FIXED: meta-calling a wrapped thread-local predicate ignored the

Package clib

  • FIXED: library(udp_roadcast): possible race condition. Jacob Friedman.

  • FIXED: cut redundant choice point

Package jpl

  • PORT: Add -Wl,kill-at option when compiling jpl.dll for Windows.
    This seems necessary on 32-bit. On 64-bit it seems to work with
    as well as without this option. Withouth this option we get an
    unsatisfiedlinkerror exception when trying to find the first JNI
    method from jpl.dll.

  • TEST: Fixed detection of REPORT=true environment detection.
    David Tonhofer.

  • FIXED: Windows: pointers get truncated to 32-bits.

  • FIXED: Sync all SWI-Prolog.h constants.

  • PORT: one-to-one threading for Windows. pthread key cleanup is also
    called if the associated value is NULL on Windows.

  • FIXED: calling throw/2 rather than throwme/2.

  • ADDED: thread example illustrating new Prolog.engine_create()

  • ADDED: Prolog.create_thread() and Prolog.destroy_thread() to have a
    Prolog thread uniquely attached to a Java thread.

Package ltx2htm

  • ADDED: Deal with \curltermitem()

Package pengines

  • ADDED: term//2 from library(http/term_html): format/1 option to
    specify formatting all atomic values.

  • FIXED: SWISH Issue#670: wrong space computation for prefix operators.

Package pldoc

  • ENHANCED: Map items with {…} onto \curltermitem{}

  • ENHANCED: Render {…} terms properly.