Ann: SWI-Prolog 8.1.2

Dear SWI-Prolog user,

I’m happy to announce SWI-Prolog 8.1.2. There has been a lot of
progress, notably as a result of a Kyndi initiated project to bring XSB
and SWI-Prolog closer together. With input from Teri Swift, David Warren
and Fabrizio Riguzzi we try to support XSB source files by implementing
an XSB dialect module and get SWI-Prolog’s tabling more mature.

These efforts have already resulted in managing tabling using
dynamically assembled components instead of a single component,
substitution factoring (reducing table space requirements) and early
completion for ground tabled goals. As a result, tabling deals better
with cuts, negation, findall, and similar constructs. As a bogus, tabled
execution is over twice as fast on the benchmarks established by Benoit
Desouter and uses considerably less memory on many benchmarks.

This version fixes the installation of start menu and desktop shortcuts
for the Windows installer.

This version comes with several other enhancements and bug fixes, many
of them were contributed.

Enjoy --- Jan

SWI-Prolog Changelog since version 8.1.1

  • ENHANCED: Windows: Updated swipl.ico for higher resolutions, so we
    no longer have to simplify it.

  • INSTALL: Windows: properly install shortcuts.

  • FIXED: trie_gen/3: memory leak

  • ENHANCED: Use a buffer rather than a linked list for trie enumeration
    choice points. Reduces memory and provides a small speedup.

  • ENHANCED: Avoid GET_LD for internal _PL_unify_atomic()

  • ADDED: Implement early completion for tabling SCCs if the associated
    goal is ground.

  • ENHANCED: Tabling to determine the variable skeleton for a tabled
    subgoal. This reduces the sizes of tables and improves the performance
    for extracting many answers.

  • FIXED: Tabling to use call_setup_catcher_cleanup/4 rather than
    catch/3 to cleanup tables after an exception. Provides marginally
    better performance, makes cleanup work with abort and preserve SWIs
    notion of uncaught exceptions, improving debugging.

  • ENHANCED: Tabling: realise dynamic creation of minimal SCCs. This
    generally improves performance, reduces memory usage and allows
    many more Prolog constructs to be compatible with tabling.
    After discussions with Teri Swift, David Warren and Fabrizio Riguzzi.

  • WIP: First steps dealing with dynamic local SCCs. Compiles and runs.

  • SECURITY: possible buffer overrun when dealing with very large strings

  • BUILD: Update CMAKE.md and enhanced cmake/CheckEnv.cmake, checking
    the environment for things that may break the build.

  • FIXED: convert ‘annotated’ stack_limit command line option to an
    integer when qcompiling a toplevel

  • ENHANCED: allow plain integer values to be passed to --stack_limit
    command line option

  • ENHANCED: Avoid trapping debug hooks for setup_call_cleanup/3 and
    friends. This avoids about doubling the overhead when the development
    environment is used (PceEmacs and/or SWISH).

  • ADDED: Sandbox declarations for nb_linkval/2 and
    nth_integer_root_and_remainder/4

  • PORT: Emscripten: by default use the native friend.

  • CLEANUP: we no longer need a native friend with the same address
    bits.

  • PORT: Remove -s BINARYEN_METHOD='native-wasm'
    as this is no longer supported. See
    https://www.google.com/url?q=https%3A%2F%2Fkripken.github.io%2Femscripten-site%2Fdocs%2Fcompiling%2FWebAssembly.html%23debugging&sa=D&sntz=1&usg=AFQjCNHxLe2QvzskaC58CouZdjzaqCW9Dw

  • PORT: Make sure to include CMAKE_CROSSCOMPILING_EMULATOR when setting
    the PROG_SWIPL

  • PORT: Make alignment detection work for Emscripten.

  • DEBUG: Adding conditional debug statements to boot/tabling.pl

  • DEBUG: Added Prolog flag prolog_debug if the system is compiled in
    Debug configuration.

  • TEST: Move tabling tests into their own subdir so we can run only
    those using ctest -R tabling.

  • FIXED: library(prolog_colour): Avoid an exception on :- meta_predicate
    p().

  • FIXED: pack_remove/1 if the pack exists but was not attached due to
    a lacking foreign library. If the pack is really missing it now just
    prints a message instead of raising an exception. Paulo Moura.

  • XSB: More emulation

  • XSB: Get directives to the head. Order doesn’t matter for XSB,
    which uses a two phase compiler, but it does for SWI.

  • PORT: Avoid dependency on C99 for alignment check.

  • FIXED: return exit code if swipl -c fails

  • FIXED: PL_thread_attach_engine(NULL) crashed. Stisko.

  • XSB: Work in progress.

  • XSB: Added various predicates to the emulation libraries.

  • FIXED: Declare dynamic/1, multifile/1 and discontiguous/1 as iso.
    This avoids accidental redefinition.

  • MODIFIED: display/1,2 now write lists using the internal SWI-Prolog
    '[|]' functor. Adds an option no_lists(bool) to write_term/3.

  • XSB: Ignore :- ti/1, allow for cyclic module dependencies and start
    emulating the string library.

  • BUILD: Allow scripts/pgo-compile.sh to run from any build dir, also
    if this is not an immediate subdir of the source. Paulo Moura.

  • PORT: Allow building in Haiku

Package http

  • ADDED: library(http/thread_httpd): load http_ssl_plugin if the option
    list indicates we want SSL. After remark by Fernando Sáenz-Pérez.

  • DOC: Use new [[library(http/json)]] notation to get proper
    paths for the source files included by json.md. Also updated the
    documentation intro for JSON a bit.

Package jpl

  • FIXED: Install env.sh into the Java examples and update it to deal
    with both the installed version and version from the build environment.

Package pengines

  • FIXED: in pengines:output_result for CORS and write_result hook
    1. Currently CORS support is only implemented for the json
      format. It really should be applied to all output when the http:cors
      setting is enabled (including any error responses generated by
      the http server libraries). The same philosophy should apply to
      disable_client_cache/0.

    2. The write_result/3 hook is not called when the format type is
      prolog due to clause ordering of output_result/3. The clause that
      calls the hook should be first (analogous to the event_to_json hook in
      event_term_to_json_data/3). A benefit is that attributed variables
      can by returned in response data via the hook.

Package pldoc

  • ADDED: Allow for [[Alias(Segments)]] to reference to files in markdown.

  • FIXED: Documentation search should find perfect matches on
    identifiers. Nicos Angelopoulos.

  • FIXED: Avoid duplicating documentation for PlDoc comment blocks that
    document multiple predicates.

Package swipl-win

  • DEBUG: Add debug messages to find the preferences path and track the
    font dialog.
2 Likes

How to upgrade to 8.1.2 (on Mac)?

brew tap likelion/tap
brew upgrade swipl
Error: likelion/tap/swipl 8.1.1 already installed

Thank you

You cannot upgrade a HEAD installation (see https://github.com/Homebrew/legacy-homebrew/issues/13197).

But normally just brew upgrade works for me or you can do a clean install:

brew uninstall swipl
brew update
brew install swipl --devel