Did you know ... Search Documentation:
SWI-Prolog 8.0 available for download
0 upvotes 0 0 downvotes
Picture of user Jan Wielemaker.

The SWI-Prolog 8.0 major release marks mostly a milestone for the internals, stability, deployment options and maintainability of the system. Many of the enhancements have been made possible with support from Kyndi, both financially and by providing use cases.

Stabilility enhancements are best illustrated by statistics on https://swish.swi-prolog.org. The public SWISH server is sensitive because most of the time it serves a couple of hundred students that run programs with all sorts of bugs. When SWISH came online it crashed once every couple of days, about a year ago it often managed a week uptime. Now it is more often restarted to activate updates than that it crashes.

All of this was only possible due to bug reports, suggestions, fixes and additions by many of you.

Below is first a summary of changes, followed by the full list since 7.6.4. Unfortunately several patches appear twice in the log due to git log handling of merges.

Summary of changes:

  • Development and building of SWI-Prolog
    • CMake based build
      • Allows building multiple versions (configurations, platforms) from the same (read-only) source tree.
      • Run full version from build tree or after installation
      • Better cross-compilation support, notably to platforms for which there is no emulator by assigning a native friend Prolog.
      • CTest for testing
      • CPack for packaging for Linux, MacOS and Windows
      • New ports to WebAssembly (Raivo Laanemets) and Android Termux (erlanger)
    • Reduced required development tools. Building now only requires CMake and a supported C compiler. Required scripting for the build is done using CMake, C and Prolog.
    • No separately distributed configure and documentation files.
      • HTML docs are generated during the build.
      • Plain-text manual (help/1, apropos/1) renders HTML using Prolog.
  • Language aspects
    • Added mode-directed tabling. Provided mostly by Fabrizio Riguzzi.
    • Enhanced clause indexing
      • Combine multiple arguments if there is no single selective index.
      • Index recursively on the arguments of compound terms with the same name/arity. Among others, this greatly enhances selecting from DCG rules that start with a terminal (p --> "text", ...)
    • Moved global garbage collectors (atoms, clauses) to a new thread "gc", enhancing real-time behaviour.
  • Deployment enhancements
    • Saved states (qsave_program, swipl -c) use ZIP format
      • No longer requires swipl-rc (dropped from distribution). Use standard zip/unzip instead for examining and modifying the state.
      • Less than half the size.
      • Files in the state can be accessed using open/4 and anything derived from it as res://path/to/file-in-zip. This allows for storing e.g., the entire development system in a state and thus have a single file application. Of course, this also applies for most applications.
    • Added library(obfuscate) that safely renames local predicate names to meaningless symbols.
    • Much improved maintenance for QLF (quick load) files, including automatic rebuild if the source file has changed or the QLF format has changed.
    • Avoid concurrency issues about incomplete .qlf and index files by moving them in place after they are complete.
    • Use a single stack limit rather than 3 limits (global, local and trail). The limit is inherited to child threads and can be controlled both from the command line and from Prolog.
    • Cleanup command line option processing, preferring long options such as --no-signals and removing old options such as -G5m and +tty
    • A YAML reading and writing library allows for reading and writing this popular configuration file format. The Prolog data structures are compatible with library(json).
    • Enhanced support for running the Windows version under Wine to support cross-platform development targetting Windows.
    • Support the MUSL C library that is popular on embedded Linux systems and Docker images that minimize on size.
  • Development enhancements
    • Integrated manual
      • Plain text manuals now always reflect the running version.
      • Plain text manuals also cover installed packages
      • Better search in apropos/1, also used on the website.
    • Tools
      • Many ehancements to syntax highlighting library, cross-referencing, etc.
      • Improved breakpoint management.
    • listing/0,1,2 now by default reuse the original variable names and provide an option to extract the original source which is notably practical for multifile predicates.
  • Stability
    • Many fixes to exception handling
      • Avoid that exceptions are silently ignored in C code and thus abort or timeout is ignored.
      • More sensible handling of exceptions while exceptions are being processed.
    • Many fixes to concurrent clause garbage collection. Notably with help from Keri Harris.
    • Two large rewrites of library(socket). Keri Harris got rid of using a separate thread for dealing with Windows sockets, replacing them with Windows events and socket handles are now "blobs", providing save reuse of handles. Exceptions provide (platform specific) reliable error identifiers.
  • Library enhancements and additions
    • The socket library has much enhanced support for UDP messages, including UDP multicast.
    • Many enhancements to library(udp_broadcast)
    • HTTP
      • Added library(http/http_dyn_workers) to realise a dynamically resizing worker pool.
      • Much enhanced support for paths that include a REST parameter, based on Raivo Laanemets arouter approach.
      • Support a request rewriting pipeline that allows for decoupling authentication, authorization and input parameter processing.
      • Added library(http/http_server) to get a standard setup with a single use_module.
      • Fully hookable HTTP error pages. Default now sends JSON if the Accept header indicates such.
    • library(csv): deal with an optional header and more consistent API. Nicos Angelopoulos.
    • Improved performance for reading and writing JSON.
    • JPL: cleanup the API and portability. Mostly by Sebastian Sardina and Paul Singleton.
    • Pengines: notably output handling and improve cleanup in the case of timeouts, aborts and errors.
    • Semweb: better support for rdf11, several standard compliancy fixes, notably spotted and in part fixed by Wouter Beek.
    • SSL: support ALPN (required for HTTP/2) by James Cash, fixed timeout handling with http server libraries and support TLS 1.3 by Markus Triska.
Back to fresh news items