Ann: SWI-Prolog 9.3.23

Dear SWI-Prolog user,

I’m happy to announce version 9.3.23. Highlights:

  • All libraries are now by default compiled to .qlf files. This greatly speeds up loading (large) libraries such as clpfd (125 → 7ms) or chr (384 → 33ms), as well as the facilities using a lot of libraries such as help/1 (600 → 270ms). The libraries are compiled with optimization enabled, debug/3 and assertion/1 stripped and library(apply_macros) to compile e.g., maplist/2-, forall/2, etc. For debugging you may not want this. In that case run

    swipl -Dsource ...
    

    Or :- set_prolog_flag(source, true). before loading the
    libraries.

  • The .qlf infrastructure has been improved in several ways.
    Notably, generated .qlf files track included files as well
    as imported files that define global term or goal expansion.
    The swipl qlf ... app reflects this with several extensions
    to the commands.

  • The WASM HTML infrastructure has changed. DOM manipulation is
    now based on html//1 and the old Tau-Prolog library(dom) is moved
    to the Tau dialect emulation. To use it, first call

    :- expects_dialect(tau).
    
  • Tries have been extended to support attributed variables, both
    in the keys and associated values. This is a first step
    towards supporting tabled constraints.

  • Grammar rules have been synced a bit more to the upcoming ISO
    standard. As a result, SWI-Prolog no longer supports partial
    terminals
    , e.g. p :- [a|More], q. The DCG compiler reports
    an instantiation error when trying to compile a partial terminal.

  • Ubuntu PPA for 25.04 (Plucky Puffin) is included. PPAs for
    Focal Fossa (20.04) and Bionic Beaver (18.04) have been removed
    due to unsupported Python version. Please report if you have need
    for these versions. We can consider dropping Janus or work around
    the Python incompatibilities.

    Enjoy — Jan

P.s. If you are used to build incrementally from source, you may need to cleanup first to avoid build issues and get all new features enabled. Either remove the build directory or, if you want to keep things, run from the build directory, ../scripts/clean-build

SWI-Prolog Changelog since version 9.3.22

  • ADDED: Support attvars in trie_gen_compiled/2,3 This patch also
    fixes an issue in trie_gen_compiled/3 that caused unintended variable
    sharing between the key and value.

  • FIXED: Allow building with installed .QLF files when the VM changes.
    A VM mismatch raised a fatal error during boot. This is now relaxed
    to a normal exception.

  • ADDED: Partial support for attributed variables in tries. This first
    step deals with inserting and generating. Trie compilation is not
    yet supported (crashes on unexpected key in the trie).

  • FIXED: swipl qlf app: report incompatible .qlf files

  • BUILD: Provide additional .qlf dependencies.

  • FIXED: swipl qlf app: dependency warnings and clean subcommand

  • FIXED: trie_gen_compiled/3: crash if value is cyclic or contains
    attributes.

  • INSTALL: Enable compiling .qlf files by default.

  • ENHANCED: swipl qlf app - info:
    - by default list all info - list:
    - add -u (--update) to only list out-of-data .qlf files
    - Produce machine format if output is not a terminal.

  • ENHANCED: Add macro expansion dependencies to .qlf files.

  • ADDED: swipl qlf info to accept multiple files.

  • ENHANCED: source_file_property/2 performance Speedup
    source_file_property(File, load_context(…)).

  • ENHANCED: Distinguish different file dependencies in .qlf files.

  • ENHANCED: qlf file record included files These are also shown by

    swipl qlf info -s <file.qlf>
    
  • ENHANCED: Record included files in .qlf files with path translation.

  • FIXED: source_file_property/2 to work without sources.

  • FIXED: qlf_make/0 for out-of-date computation for aggregate .qlf files.

  • FIXED: Allow for discontiguous autoload/1 and autoload/2 directives.

  • FIXED: dicts_to_compounds/4 if dicts have non-atom tags.

  • DOC: Singleton section was outdated. After comment by Jan Burse.

  • PORT: Deal with dropped support for partial literals in phrase/2,3

  • MODIFIED: ISO: phrase/2,3: do not allow for partial lists as terminal

  • FIXED: WASM: Missing (chr) dependency caused build to fail.

  • WASM: Added table for mapping HTML attribute names to DOM attributes.

  • FIXED: prolog_load_context/2 for file to work correctly for .qlf.

  • FIXED: Only emit hyperlinks if hyperlink_term is true.

  • ADDED: Start a new library(dom) based on html//1

  • MODIFIED: WASM: Move library(dom) to the dialect tau. We plan on an
    alternative library(dom). As a consequence, we move the Tau emulation
    library to the newly added Tau support in SWI-Prolog’s dialect support.

  • FIXED: library(dom) set_attr/3: allow for atoms as values.

  • BUILD: Support cmake < 3.20

Package cpp

  • FIX: pointer to local stack

  • ENHANCED: improved C++ exception hierarchy Changed the exceptions
    thrown by PlEngine and PlFrame so that they’re safe to use outside the
    try…catch context; and provided a way to make all other exceptions
    safe outside a Prolog frame.

Package http

  • PORT: Avoid partial lists in DCG rules (ISO compliance)

  • ENHANCED: Cleaner handling of HTML elements without content.

  • REUSE: Separate declarations in library(http/html_write) into
    library(http/html_decl)

  • ADDED: term//2 from library(http/term_html): emit(:Closure) option.

Package xpce

  • PORT: Do not install Xserver.pl on Windows versions.

  • COMPAT: Handle changes to ‘$qlf_sources’/2

  • FIXED: Allow reloading pce_editor.pl when using .qlf files.

  • PORT: Avoid partial lists in DCGs

2 Likes