Did you know ... Search Documentation:

SWI-Prolog 9 has arrived

0 upvotes 0 0 downvotes
Picture of user Jan Wielemaker.

On November 24, 2022, SWI-Prolog 9 has been released. By incrementing the major version we consolidate a development cycle of about three and a half year. More than half of this development was carried out in SWI-Prolog Solutions b.v. The highlights are below. The complete list of changes is long. The 8.x series adds and improves a lot of functionality while providing good backward compatibility.

  • Mature and feature-rich tabling support including well founded semantics, incremental tabling, monotonic tabling and shared tabling.
  • Single sided unification [SSU](/pldoc/man?section=ssu) and zero-cost runtime determinism checking. See also $/0, $/1 and det/1.
  • Database transactions see transaction/1 and snapshot/1.
  • A new C++ interface that covers the whole foreign API and provides much better type safety.
  • Linux versions are by default linked to tcmalloc. This provides more information and control and reduces the footprint of multi-threaded 7x7 servers considerably compared to the default ptmalloc.
  • Interfaces to Redis and STOMP message passing systems.
  • A port to WASM WebAssembly allows running SWI-Prolog in the browser. The high level bi-directional interfaces to JavaScript allows for inspecting and modifying the browser DOM.
  • A completely new GNU-Emacs package called sweep. Sweep embeds Prolog, which allows for semantic highlighting and much more.
  • A bundled replacement for GMP, providing unbounded integers and rational numbers based on LibBF under a permissive license. Currently significantly slower on notably larger rational numbers.

Thanks to all those who contributed code, documentation, feedback, bug reports, etc. Without you this release would not have been possible.

SWEEP: A SWI-Prolog mode for GNU-Emacs based on semantic analysis by Prolog

0 upvotes 0 0 downvotes
Picture of user Jan Wielemaker.

Good editing support for Prolog is hard due to the lack of keywords, types and homoiconicity (code is data). This was the motivation for the built-in PceEmacs clone that is written in Prolog and allows for direct interaction with the editor buffer from Prolog: reading, writing and controlling syntax highlighting.

Eshel Yaron wrote sweep which embeds SWI-Prolog as a module in GNU-Emacs, providing similar possibilities. The required foreign extension module is part of the binary distributions for SWI-Prolog in recent development releases and will be part of SWI-Prolog 9.x that will be released soon.

The mode is under active development. In its current state it is already much better than any previous Emacs mode for Prolog. It still lacks a few features wrt. PceEmacs, but it also comes with a lot of goodies compared to PceEmacs.

See also
- https://eshelyaron.com/sweep.html