After about 18 months SWI-Prolog is almost ready for its next stable version. This release is a milestone in many respects. It provides many new features and is much more stable and scalable. Possibly the best news is that much of this was not achieved by me.
Towards 7.4.0 and beyond
Up till now, SWI-Prolog stable releases were merely a snapshot of the development version. As a stable release is the trigger for many users to update there were typically a few iterations that both fixed bugs and added the usual upgrade issues. 7.4.0 will be different:
- We will have 7.4.0-rcX releases. These will fix reported issues, and only introduce changes if really necessary.
- As the release settles, 7.4.1 will be the first offical 7.4.x release.
- Crashes and security issues fixed in the new 7.5.x series will be backported by Keri Harris and me and released as 7.4.x. Functional changes with even slightest risc breaking compatibility will be avoided.
Highlights
Internals
- Lock free tables. This contribution by Keri Harris avoids a number of (rare) race conditions that existed in older versions and greatly improved scalability on multi-core hardware. His novel implementation of handling the atom table was published at ICLP, New York.
- Safe recompilation of running code allows for hot update or hot insertion of de bug code into running Prolog applications, notably servers. Sponsored by SecuritEase.
- The two above eliminate the need for non-portable thread manipulation and (on Unix) signal handling. As the current system no longer needs to `control' the process it is way easier to embed, fixing several issues with e.g., JPL.
New core functionality
- Thanks to the PhD work of Benoit Desouter supervised by Tom Schrijvers and Bart Demoen, we have `delimited continuation' and tabling. Although the performance of tabled execution is not state-of-the-art this can still be a life saver for some applications.
- Thanks to the involvement of Paul Tarau and Kyndi inc. we now have lightweight `engines'. Similar to delimited continuation this provides an implementation for coroutining.
- Avoid limiting the number of open files on systems that provide the
poll()
system call. - Handle floating point NaN and Infinity, compatible with ECLiPSe. This is particularly useful for interfacing with systems that support these IEEE float extensions.
Libraries
- Markus implemented lots of enhancements to the constraint libraries
clp(fd)
,clp(b)
and simplex. - Kyndi inc. and Paulo Moura contributed library(yall), Yet Another Lambda Language.
- library(pure_input) used to be limited to files (more specifically for streams that can be repositioned). This limitation is lifted using a combination of non-backtrackable assignment and different constraints. A reimplementation was needed for legal reasons (see below).
- The same was used to implement library(lazy_lists), providing lazy access to many sequences and the infra structure to add your own.
- library(nb_set) is reimplemeted using non-backtrackable hash tables. It has better defined semantics and much better performance.
- A new library(dicts) provides many high level operations, notably on lists of dicts.
Environment
- Stack traces for dealing with uncaught exceptions are now by default enabled.
- Command line editing on Unix was moved to a package (readline) for better modularity and simplifying legal issues. This also allowed for integrating the competing BSD libedit command line editor, which is now the default. You can add new edit commands in Prolog!
Packages
- With a lot of help from Wouter Beek, library(semweb/rdf11) provides a new API for querying and modifying RDF graphs. This API is much more intuitive than the old API, notably when it comes to handling literals. The new API is layered on top of the old and both may be used in a single application to manage the same RDF graph.
- With help from Matt Lilley and Markus Triska, there are a lot of changes to the HTTP framework. Matt reimplemented HTTP proxy handling, I merged the two competing HTTP client libraries and Markus improved handling HTTPS a lot, notably the Unix daemon library, leading to the next topic ...
- Markus Triska and Matt Lilley extended and improved the SSL binding a lot. Markus added support for OpenSSL 1.1, extended certificate handling including server side SNI processing. He rationalised a lot of the high level interfaces which now also cover some of the cryptographic routines. Matt started that and dealt with XML signatures and encryption.
- Paul Singleton and I updated JPL. The new interface is faster and should be fully thread-safe. Together with the above mentioned improved support for embedding this paves the road for a proper and stable Java interface.
Legal
- With help from Kyndi inc. paying for adminstrative help, SWI-Prolog has been
re-licensed to the BDS-2 (or "Simplified BSD") license. This implies we
have a single license for all code and SWI-Prolog can safely be used in
situations were the (L)GPL posed legal issues. Some code had to be
reimplemented to make this change possible. I'd like to thank Keri Harris
for taking care of some low level C routines. As a pleasant side effect the
libary(pure_input)
can now handle streams that cannot be repositioned.