Did you know ... Search Documentation:
News archive

7.6.0-rc1 available

0 upvotes 0 0 downvotes
Picture of user Jan Wielemaker.

Stable release version 7.6.0-rc has been uploaded. Please test and report issues to the mailinglist or GitHub.

Highlights for 7.6:

  • Support for mode-directed tabling, initiated by Fabrizio Riguzzi.
  • Speedup for delimited continuations and fix of the interface. Notably boosts tabling.
  • Support for multi-argument indexing, sponsored by Kyndi
  • Restore first-load semantics while reloading files. Implemented by Keri Harris.
  • Many additions to SSL interface. Support for OpenSSL 1.1, LibreSSL, access to many more cryptographic and TSL features by Markus Triska. Support for XML encription, signatures and SAML by Matt Lilley.
  • Many enhancements to concurrency: less locking, run global collectors in their own thread, fixed race conditions.
  • Perl Compatible Regular Expression (PCRE) package, supporting native C regex without xpce.
  • Better control of application startup using initialization/2.
  • Lots of additions and fixes.

Security Vulnerability in Pengines

0 upvotes 0 0 downvotes
Picture of user Anne Ogborn.

This weekend Vladislav Zorov reported a vulnerability in pengine sandboxing.

This vulnerability allows any user who can create a pengine to execute unconstrained prolog code, including process_create.

The vulnerability can be triggered simply by loading pengines.

This vulnerability was patched with commit

https://github.com/SWI-Prolog/swipl-devel/commit/a22442fc82fd468f02abb7a19958bb3007dc585b

We recommend all pengines users upgrade to this release or later.

Big thanks to Vladislav.

Playing with Prolog

1 upvotes 1 0 downvotes
Picture of user Anne Ogborn.

Sam Neaves and Anne Ogborn have started a new YouTube channel featuring recreational uses of Prolog.

The first video shows a pengine powered Lego robot built by Sam. Watch it on YouTube

Fast cars and Prolog

1 upvotes 1 0 downvotes
Picture of user Jan Wielemaker.

Now the dust has mostly settled for me, I thought people here might be interested in what we were using SWI-prolog for at Zerolight where I work. We wrote a configuration engine with it for really flash hypercars.

And I don't think I'd have been able to even remotely be finished on my part of the project now if it wasn't for Prolog and the support I got here.

Thanks :)

Steve (Stephen Coda)

SWI-Prolog Used For Satellite Anomaly Detection

1 upvotes 1 0 downvotes
Picture of user Anne Ogborn.

Simularity, Inc. has announced a new SWI-Prolog driven Anomaly Detection technology.

SWI-Prolog has helped create a new technology.

It's easy enough to detect differences between two satellite images of the same area.

It's much harder to eliminate differences in the images caused by 'normal' factors such as different lighting, satellite position, and clouds.

And until now it's been impossible to automatically distinguish between unimportant changes like normal movement of vehicles and change of season, and important changes like new construction or the appearance of vehicles in areas where they didn't previously appear.

Now Simularity has developed Simularity AI-ADS, a system that can distinguish important changes from unimportant ones, using AI techniques.

Simularity recently partnered with Taqnia Services, the technology development company owned by the investment arm of the Saudi Arabian government, to provide imagery analysis services in Saudi Arabia.

Peter Koning, VP of Sales for Simularity,says "SWI-Prolog was crucial for our success. We couldn't have done this in any language but Prolog, and SWI-Prolog gave us the performance and library support we needed"

SWI-Prolog 7.4.0 release candidate

0 upvotes 0 0 downvotes
Picture of user Jan Wielemaker.

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.

Huron Consulting Group uses SWI-Prolog to generate complex test data

1 upvotes 1 0 downvotes
Picture of user Anniepoo.

Donald Maffly will present "Logic Programming to Generate Complex and Meaningful Test Data" at the Pacific NorthWest Software Quality Conference on October 18.

Maffly's group at Huron has produced a system in SWI-Prolog that uses techniques based on reverse query processing to generate test data from SQL SELECT queries. Data generated in this manner structurally resembles real data, and allows application testers to land data on precise points called for in functional testing.

Paper Abstract

news/DonaldMafflyPhotoweb.jpg

Doxygen plugin (helper) for Prolog

0 upvotes 0 0 downvotes
Picture of user Jan Wielemaker.

I received an announcement from Dr Beco that he wrote a plugin (helper) for the documentation system Doxygen. See the Extensions page.

As we know, SWI-Prolog has its own PlDoc documentation system. Doxygen is a good alternative for multi-language projects that wish uniform documentation. Doxygen is better at generating stand alone documentation, while PlDoc is better for dynamic documentation served directly from a system under development.

Evolving Prolog at QCon

0 upvotes 0 0 downvotes
Picture of user Anne Ogborn.

Michael Hendricks is at QCon New York talking about "Evolving Prolog".

His talk abstract:

Prolog is a powerful, modern, general purpose language. Learn how we used genetic algorithms to evolve Prolog programs based on historic data from peer to peer lending markets. The resulting Prolog program outperforms 98% of similar investors.

New stable version: SWI-Prolog 7

0 upvotes 0 0 downvotes
Picture of user Jan Wielemaker.

SWI-Prolog 7.2.0 is available for download. SWI-Prolog version 7 is a major release, both for new functionality and because it is not fully compatible with version 6. First, the highlights for the new functionality:

SWI-Prolog 7 at a glance

  • The new dict type and syntax provides both time and space efficient name-value maps with a pleasant syntax:
    tag{key1:value1, key2:value2, ...}

    Fields can be accessed using functional notation, as in

    writeln(Dict.key1).
  • As a consequence, it was necessary to replace the list constructor .(H,T) by the (also in use by Mercury) '[|]'(H,T). That may seem drastic, but in practice affects only a few programs, notably doing functor(Term, F, A) on lists and then selecting further processing on F == '.', A == 2. To turn lists more into a special construct, [] is still the empty list, but no longer the same as '[]', i.e., [] is not at atom.
  • The syntax "..." is now mapped to strings. Strings are compatible with ECLiPSe (thanks to Joachim Schimpf for all the discussions). Traditional code-lists are constructed using .... The flags double_quotes and back_quotes control this behaviour.
  • Thanks to Torbjorn Lager, we have "Pengines", Prolog engines on the web. This provides a generic API to talk comfortably to a Prolog server from JavaScript and other Prolog instances. It enabled SWISH, SWI-Prolog in your browser (http://swish.swi-prolog.org) as well as http://lpn.swi-prolog.org (Learn Prolog Now! with embedded SWISH).
  • Markus Triska added clp(b), the boolean constraint solver, improved his clp(fd) and was before several enhancements to the toplevel dealing with constraints.
  • Thanks to Matt Lilley and Mike Elston, there is CQL, a DSL (Domain Specific Language) for dealing with SQL. CQL is developed in an environment where complex SQL databases are the norm and therefore supports a large subset of SQL and can deal with tables with thousands of columns and other stuff that the ocasional SQL user won't expect.
  • Matt Lilley improved networking support significantly, including much better support for SSL and general support for both HTTP and SOCKS proxy servers.
  • Many people have provided add-ons (packs) that rely on SWI-Prolog version 7. See http://www.swi-prolog.org/pack/list

There are no big changes to the Prolog engine. Notably SWISH has proved to be a great honeypot for finding ways to crash the system. Many of these have been fixed and notably stack overflow handling is now much more robust. Paulo Moura included an extensive portable test suite in Logtalk which pointed out various small errors. Some of these are still present, none deemed urgent.

Porting to SWI-Prolog 7

Quite a lot of programs will run unmodified. Notable programs that extensively use DCGs (grammar rules, -->) may not run unmodified. See

http://www.swi-prolog.org/pldoc/man?section=ext-dquotes-port

for dealing with this. The changes are typically rather straigthforward and not hard to debug.

The modified list notation does not often lead to portability issues, but portability issues are typically harder to spot. A good step is to run the following after loading your program:

?- explain(.).

This lists clauses in the program in which '.' appears. You can of course also search the sources, but this is relatively hard because the '.' is used in many contexts (end-of-term, =.., comments, etc).

As a work-around, you might be able to start SWI-Prolog as below. This restores the traditional list standard and disables the Dict.key functional notation. It may work well for you if you merely rely on the core Prolog engine. A growing number of the libraries depends on the new features and will thus become unusable in this mode.

swipl --traditional

What is next?

As for 7.2.x, I assume we will see some patches dealing with regression issues. The 7.3.x series are likely to concentrate on strengthening web functionality and using Prolog as data querying and transformation tool. Given contributed and demand driven development, it is hard to predict what will happen. You can influence the process, both by contributing and by providing funds, either directly or by seeking partnership in research projects.

Acknowledgements

Many people have made SWI-Prolog version 7 possible. Some are already mentioned above. I think Anne Ogborn deserves special attention for her work helping people, getting the Oregon State University Open Source Lab to host us.swi-prolog.org which provides a backup for the servers running at the VU University in Amsterdam and finally for advertising Prolog and Pengines in many places.

Enjoy --- Jan

SWI-Prolog Fields Team for Ludum Dare 32

1 upvotes 1 0 downvotes
Picture of user Anne Ogborn.

Ebrahim Azarisooreh, Douglas Miles, Grzegorz Jaskiewicz, Jessie Stein, and Anne Ogborn are going to field a SWI-Prolog team for the 32nd *Ludum Dare Jam* - a contest to see who can make the best game (as voted by the participants) in 72 hours.

At 6pm US Pacific time the contest organizers will announce a theme. The contestants will have 72 hours to create a game based on that theme.

If you're interested in participating, it's not too late. Contact Anne Ogborn at annie@swi-prolog.org

UCSD Students Contributing to SWI-Prolog

1 upvotes 1 0 downvotes
Picture of user Jan Wielemaker.

The University of California San Diego is sponsoring a group of nine computer science students to contribute to SWI-Prolog as part of an "Open Source Academy" class this semester. The students will spend the rest of the semester building a set of expert system shells, demo expert systems, and a tutorial to get programmers interested in SWI-Prolog through this avenue.

Boris Vassilev and Anne Ogborn are in San Diego mentoring the students in a code sprint this weekend, including teaching them basics of Prolog, the SWI-Prolog web framework, and introducing them to expert systems.

The program, supported by Facebook, is intended to give students experience working on a real world scale development team.

news/ucsd_2015_OSAcademy.jpeg

Call for help: Oauth 2.0 and OpenID Connect

2 upvotes 2 0 downvotes
Picture of user Jan Wielemaker.

After getting a message that Google will discontinue plain OpenID `login-with-google' and a little searching, I started realizing we have a serious problems wrt. these standards. Oauth (2.0) is needed for dealing with several APIs, while we need OpenID Connect, which is layered on top of oauth 2.0 for `login-with-XYZ'.

Long ago, I implemented OpenID 1.0, which I updated a little to provide the current login-with for swi-prolog.org. That was rather easy, but the new spec look overwhelming We probably have all the serialization and crypto stuff in place, but it needs to be combined according to the specs and wrapped into a couple of nice libraries.

So far, the only mention to a partial solution I've seen is by Michael Hendricks

This is an investigation to see what we have, what we need and who can help solving this. I've created a [topic in the SWi-Prolog Google group] (https://groups.google.com/forum/#!topic/swi-prolog/iAO4d9IdMko)

Thanks --- Jan

Learn Prolog Now! with embedded SWISH

0 upvotes 0 0 downvotes
Picture of user Jan Wielemaker.

I'm very pleased that Learn Prolog Now! and SWI-Prolog have joined forces. I have written a proxy server that rewrites LPN on the fly, adding a `run' button to source and queries that open an instance of SWISH embedded in the LPN page.

It is all still a bit clumsy. Patrick, Johan and Kristina have agreed to make the sources of LPN available under the CC-SA license. This allows us to improve the LPN text and examples and make sure the right sources and queries are sent to SWISH when clicking the run button.

Please have a look at http://lpn.swi-prolog.org. The header points to the GitHub repositories of LPN, the proxy server (of course in Prolog) and SWISH.

This is also a call to see who is willing to help and turn this into a great online resource.

Comments are of course welcome. General discussion can go here. If the subject is more a `todo' or bug, please use the issues page of the GitHub repositories.

SWI-Prolog's SemWeb libraries used in ISWC publication

0 upvotes 0 0 downvotes
Picture of user Wouter Beek.

On the 23th of October I will be presenting the paper "LOD Laundromat: A Uniform Way of Publishing Other People's Dirty Data" at this year's International Semantic Web Conference (ISWC).

The paper is about the LOD Laundromat, whose purpose is to clean and disseminate all Linked Open Data (LOD) in a standards-compliant way, in a single format and in a single location.

The LOD Washing Machine, which performs the data cleaning process, was written in SWI-Prolog 7 and makes use of the various Semweb libraries.

The LOD Laundromat has currently been able to distill over 13 billion triples from thousands of datasets. When loading so many datasets we came across many idiosyncrasies:

  • missing archive headers,
  • RDF/XML documents with multiple roots,
  • RDFa embedded in HTML without version declaration,
  • File extensions / HTTP Content-Type values that are not indicative of the serialization format used,
  • undefined RDF prefixes,
  • very many syntax errors (e.g., unescaped newlines in literals in N-Triples),
  • etc.

Both due to the scale and the occurrence of such corner cases we were able to detect several bugs/limitations/memory leaks in the Semweb libraries that would not have come up quickly during 'normal use' or by processing the limited set of W3C test cases.

I believe that with the LOD Laundromat we have shown that Semweb is now a very mature library collection. My thanks go to Jan and the other authors for making this project succeed!

Mike Elson and Matt Lilley contributed CQL: a high-level database interface

1 upvotes 1 0 downvotes
Picture of user Jan Wielemaker.

CQL is a powerful high level abstraction of SQL queries. It builds on top op ODBC and CHR. CQL supports a large set of SQL, including INSERT and UPDATE operations. Variables that are bound at entry of a query are automatically moved from the projection to the WHERE clause, which implies that predicates that embed CQL queries act both logically and efficient in all modes.

The library comes with an extensive set of examples.

SWISH meets clp(fd)

0 upvotes 0 0 downvotes
Picture of user Jan Wielemaker.

The SWISH web application (SWI-Shell or SWI for Sharing, depending on your taste), is maturing slowly. It is now capable of running clp(fd).

Open SWISH, select Sudoku (clp(fd)) from the Examples menu and enjoy!

Ann: SWI-Prolog 7.1.14

0 upvotes 0 0 downvotes
Picture of user Jan Wielemaker.

I have uploaded SWI-Prolog 7.1.14. Most of the changes fix possible crashes, notable in the semweb (RDF) library. Thanks to Wouter Beek for trying to download all data from the `Linked Open Data cloud' and processing them in threads using RDF transactions ... Other stuff:

  • Two patches for the Dict.key syntax (unbound key, Dict is a list)
  • Serious bug in variant_sha1/2, returning same hash for all `indirect' datatypes (float, big int, string).
  • Fixed portability to 32-bit platforms that have no support for 64-bit atomic operations (e.g., (some?) ARM).

Primary git repository moved to GitHub

1 upvotes 1 0 downvotes
Picture of user Jan Wielemaker.

The primary git repository has been moved from www.swi-prolog.org to github.com. That means that developers need to push to the github repository. The repos at www.swi-prolog.org are synchronized three times per day. What does this mean?

Update an existing working tree to GitHub

Use the commands below to update a working tree for the development branch. Use swipl.git for the stable series. If you have a GitHub account and setup ssh, you can also use github@github.com:SWI-Prolog/swipl-devel.git.

% git remote set-url origin https://github.com/SWI-Prolog/swipl-devel.git
% git submodule sync

Checkout old versions

The submodule locations have changed on April 22, 2014. If you want to check out an older version, use the repositories at www.swi-prolog.org. You can use the above commands to switch freely between both sources or use git remote add to add both of them.

The mailing list moved to Google groups

0 upvotes 0 0 downvotes
Picture of user Jan Wielemaker.

The SWI-Prolog mailinglist has been turned into a Google Group. The associated forum is embedded on this site. More details are here.

This action has been taken because DMARC policies enforced by Yahoo, but also used as indication of potential spam are not compatible with classical mailinglists that forward messages using From with the original poster. This caused many people to be unsubscribed due to bouncing mail as well as many people not receiving posts to the list due to spam filtering.

In addition, Google groups provide some useful extensions, such as a forum, tagging of messages, etc.

SWI-Prolog's source on GitHub

0 upvotes 0 0 downvotes
Picture of user Jan Wielemaker.

I'm moving the SWI-Prolog sources from www.swi-prolog.org to github. The new address is https://github.com/SWI-Prolog

GitHub provides a much richer and better infrastructure for cooperation. We also plan to replace bugzilla with the GitHub issue tracker.

At the moment, the version on GitHub is mirrored from www.swi-prolog.org three times per day. I plan to make GitHub the main location shortly.

If you have commit rights over all or part of the git modules, please send me your GitHub user name.

Pengines: Web Logic Programming Made Easy

0 upvotes 0 0 downvotes
Picture of user Jan Wielemaker.

Pengines is short for Prolog Engines. The pengines package greatly simplifies (1) developing JavaScript based web-applications that must talk to a Prolog server and (2) realise distributed programming in Prolog by providing RPC (Remote Procedure Calling) over HTTP.

See also
- Package page

New website

1 upvotes 1 0 downvotes
Picture of user Jan Wielemaker.

The SWI-Prolog website runs on SWI-Prolog for about 6 years. It grew out of a big mess the site was before then. The new PlDoc integrated the Prolog documentation from various sources. Unfortunately I didn't think carefully about the navigation and over the year the organization got worse and worse.

... Until Anne Ogborn was brave enough to analyse the site and traffic and come up with a new architecture. Jessica Chan, not even a Prolog user, did a great job in styling the new site such that doesn't look terribly flashy and stopped looking awfully geeky. All the poorly aligned geeky stuff that is still in some corners is not her fault. Wouter Beek wrote a new comment and news facility, exploring the usage of a proper REST interface. I rewrote the data storage to use the new dict datatype.

Thanks for all the cooperation!

See also
- Dog food
Back to fresh news items