Prolog and Datalog

Well, with the ongoing developments to tabling this is changing. SWI-Prolog will in due time provide a modifiable set of facts and rules that provide well founded semantics for negation, guaranteed termination for a large class of programs (a superset of Datalog), automatic consistency maintenance and shared access from multiple threads.

Actually, most of that is working in the current git version as a proof of concept. Lots of work is still needed on robustness, user experience and scalability.

XSB is doing most of this stuff already single threaded and their facilities have some impact in the semantic web world for their reasoning facilities. SWI-Prolog has impact for threading, interfaces and being easy to use. Hopefully this will all be combined. With Web Prolog it can also be distributed over nodes :slight_smile:

3 Likes

Hi Jan,

That’s great.

I am wondering, how does this play into evolving Prolog standards. Are today’s Prolog implementation evolving in the XSB / SWI direction …

Dan

[Moved this out of the Web Prolog topic]

Not that I’m aware of. Quite a couple of systems implement the core of tabling, providing termination guarantees associated with the technique as well as caching. XSB adds well founded semantics (= an interpretation of negation) and incremental tabling (= automatically invalidate and re-evaluate tables in a changing world). (Thread) shared tabling is supported in XSB as a compilation option, but according to Theresa and David not very mature. The YAP people have published on shared tabling, but except for the low-level data structures I’m not sure what it does.

Otherwise Prolog systems evolve in many different directions. I guess each with their own motivation. You should ask around in their communities. SWI-Prolog’s directions are explained here. The XSB stuff is not included there, but fits in the overall story. Tabled execution brings some of the well recognised features of Datalog to Prolog which can hardly be a bad move. The overall goal of SWI-Prolog is to be stable, scalable and provide all features that have proven their value and for which we have the resources to include them.

1 Like

Likely. The OpenRuleBnech project compared (notably) tabled Prolog to Datalog engines. I don’t know whether the tests deal with well founded semantics. Anyway, if you want to understand this stuff fully, check the papers on XSB by (notably) Theresa Swift and of course the logic literature on well founded semantics.