Using logic programming for theory representation and scientific inference


Did you know ... | Search Documentation: |
![]() | News archive |
SWI-Prolog will be sponsoring an online day of hacking and talks this coming sunday in celebration of World Logic Day.
We're organizing at the last moment.
We'll post updates on the discourse and on twitter as things progress.
So far we're doing a code jam to build a Mereology reasoner.
After almost a year development a new stable version has been made available.
SWI-Prolog 8.2 notably brings many of the advanced tabling support of XSB to SWI-Prolog: Well Founded Semantics, restraints, incremental tabling and shared tabling. It also makes rational numbers primary citizens. Using Google's tcmalloc reduces the memory footprint drastically on some multi-threaded workloads.
See announcement on Discourse for details.
DataChemist, the developer of TerminusDB sponsored a brand new development machine to replace my nearly 8 year old desktop. Equipped with AMD 3950X CPU, 64Gb memory, 1TB M2 SSD and 512Gb sata SSD. This speeds up the daily work and notably intensive tasks such as distribution generation, and testing other configurations and platforms. It also provides better options for testing multi core utilization.
Thanks!
DataChemist, a Dutch-Irish company, is making a versioning, graph oriented database in SWI-Prolog.
They've just put out a white paper about the design.
The scary malware warnings some visitors have seen when downloading our Windows installer have been cleared up, at least for now. Our installers were never infected, it was a false detection.
Annie
tactics.be invited Anne Ogborn to give a two day SWI-Prolog training at a lodge in the Ardenne forest.
Very interested, excited group of great engineers. They worked from zero to a fairly solid understanding of the SLD resolution algorithm.
Great to see more corporate interest in SWI-Prolog.
Anne Ogborn will be giving an introductory workshop in SWI-Prolog and a talk on the SimGen engine at Code Mesh London Nov. 7-8.
https://codesync.global/speaker/anne-ogborn/
https://codesync.global/speaker/anne-ogborn/#448simgen-a-new-simulation-language
A Prolog team is forming to compete in Ludum Dare 44.
Ludum Dare is a large international game making competition. Teams create a game in 72 hours, based on a theme announced at the start.
The upcoming jam runs friday April 26 6pm through monday the 29th at 6.
Team Prolog also wants their entry to advance integration of Prolog with the Large Knowledge Collider.
To get involved, ping aindilis on ##prolog on freenode.net or email anne@swi-prolog.org
There will be a totally fabulous Intro to SWI-Prolog Saturday, March 30, 2019 at Queerious Labs 223B 9th St, SF, CA, 94103
At 4:30pm (2 hr class)
Free event. All genders welcome.
José A. Riaza has completed his masters thesis, "Tuning of fuzzy logic programs through satisfiability modulo theories". The work was done atop SWI-Prolog.
The thesis is available online here.
The FLOPER system used in the thesis is available at http://edu.swi-prolog.org:55555/
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.
library(json)
.In late September 2018, Sam Neaves defended his thesis titled "Explorations in Logic Programming for Bioinformatics". The thesis was submitted to King's College, London.
The thesis provides excellent background material to biology for logic programmers as well as logic programming for biologists. Sam's detailed research includes machine learning of rules and activation patterns of pathways, as well as the visionary Pengine API to Reactome [1,2].
Wouter Beek successfully defended his thesis "The ‘K’ in ‘Semantic Web’ stands for ‘Knowledge’" at the VU. He earned cum laude PhD, which happens to only about 5% of the computer science PhDs in the Netherlands!
Wouter's work depends to a large extend on the SWI-Prolog semantic web infrastructure. He contributed with many bug reports and patiently explained all the subtle things about the relevant W3C standards to me. In addition he developed the semweb/rdf11
library, providing a much cleaner API to deal with RDF than the original semweb/rdf_db
. Wouter's contributions made the SWI-Prolog semantic web libraries robust and standard compliant. It is now to use them for expressing knowledge!
Wouter, congratulations and thanks for the (still ongoing) collaboration!
Raivo Laanemets ported SWI-Prolog to WebAssembly using Emscripten. This is still mostly a proof-of-concept that needs further integration in the browser infrastructure. The prototype does proof that SWI-Prolog can run in WASM.
See his repo
We're offering an 8 week course in SWI-Prolog.
It will cover not only the usual material of a basic Prolog course, but as much of the SWI-Prolog system as we can fit in what looks like it's going to be 8 very intensive weeks.
Starts June 8. The textbook will be Clocksin and Mellish, Programming in Prolog, using the ISO standard, 5th ed.
The versions 7.6.2 (stable) and 7.7.3 (development) have been released. It is advised to upgrade to this version as it notably fixes an interaction between atom garbage collection and findall/3 (and derived predicates such as bagof/3, setof/3 and parts of library(aggregate). The error can result in a crash, but far worse, it can cause findall/3 to omit answers. The bugs years old but until recently only affected multi-threaded applications. Currently it also affects single-threaded applications unless the system is compiled to disable thread support completely.
This version also re-establishes portability to 32-bit platforms that do not have 64-bit atomic instructions such as the 32-bit versions of mips, powerpc, some arm chips, etc.
Version 7.6.1 has been released. Highlights:
Stable release version 7.6.0-rc has been uploaded. Please test and report issues to the mailinglist or GitHub.
Highlights for 7.6:
Grzegorz Jaskiewicz of the Warsaw University of Technology has written a Prolog bot that plays the popular first person shooter game Counterstrike.
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
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)
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"
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.
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:
poll()
system call.clp(fd)
, clp(b)
and simplex.libary(pure_input)
can now handle streams that cannot be repositioned.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.
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.
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.
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:
tag{key1:value1, key2:value2, ...}
Fields can be accessed using functional notation, as in
writeln(Dict.key1).
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 flags
double_quotes and back_quotes control this behaviour.clp(b)
, the boolean constraint solver, improved
his clp(fd)
and was before several enhancements to the toplevel
dealing with constraints.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.
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
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.
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
The EYE reasoner, written in SWI-Prolog, has been featured in the May/June 2015 issue of IEEE Software.
Drawing Conclusions from Linked Data on the Web: The EYE Reasoner Ruben Verborgh and Jos De Roo
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
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.
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
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.
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:
Content-Type
values that are not indicative of the serialization format used,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!
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.
I have submitted a showcase implementation for Todo-Backend: a shared example to showcase backend tech stacks. You can enjoy the result from their site or at:
clp(fd)
library, contributed a boolean constraint library, library(clpb)
. Enjoy!As of version 7.1.19, SWI-Prolog provides support for websockets. Websockets provide a simple message based protocol on top of TCP/IP that can be initiated using HTTP. This allows e.g., JavaScript to get a bi-directional link to a Prolog server.
The SWI Prolog Manual 7.1 in book form is now available worldwide. See
This print-on-demand version of the manual was prepared by Thom Fruehwirth, based on the current version of the development version. Notably, it documents the SWI-Prolog version 7 extensions.
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:
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?
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
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 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.
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.
On January 29, Markus Triska successfully defended his PhD thesis titled Correctness Considerations in CLP(FD) Systems. This is a must-read if you wish to understand library(clpfd), implement constraint systems in general or if you are interested in writing declarative and robust Prolog code.
Congratulations Markus!
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.
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!