I’m staring a fork of the What’s is up with the cut? thread here, since possibly the main difference between Prolog and Datalog is Datalog forbids cuts.
My guess is implementation: Datalog is pitched as a direct competitor to SQL, which means it is primarily intended for permanent as opposed to dynamic storage. (This is generally a very vague topic, since SWI Prolog has SWI-Prolog -- persistent/1 while there’s SQLite which I’m a bit concerned many users don’t realise is a teaching tool, not a proper SQL database).
Since Datalog is described as a subset of Prolog, I’ve never bothered learning it properly, simply assuming that if I don’t use cuts, nested compounds, and I’m not sure what else, I can simply use Prolog.
However, things like magic sets indicate that under the hood, Datalog is not supposed to be just a stripped down Prolog.
At least one implementation of Datalog, DES, is promoted in this group, but I’ve no experience with any of them. So one question I have is, are there are open source versions of Datalog which offer any advantages to using SWI Prolog with persistence or its ODBC interface to Postges or whatever?