| ▲ | AlotOfReading 17 hours ago | |
They're not different in any fundamental way, except for function symbols. Cut is obviously irrelevant, so let's talk about the semantics and execution. There's only two important aspects there: infinite recursion and top down/bottom up. Infinite recursion is pretty easy to deal with. We just use tabling (and tabled prolog is still a prolog). Once we've done that, top down and bottom up are equivalent in the absence of function symbols. Then all we have to sort out is the negation semantics. Datalogs typically require restricted negation, so they get 2-valued negation. Prologs don't usually restrict negation, so they usually assume 3-valued WFS. Neither one of these is required though. WFS datalog exists, as do prologs with restricted negation. Unification is a bit different, but not that important here. It's more important to note that a datalog program will compute the same results in prolog and thus, my previous statement that datalog is essentially prolog without function symbols. | ||
| ▲ | wduquette 16 hours ago | parent [-] | |
Unless, as you note, you've implemented restricted negation, which as you say, is typical. That said, the old joke is true: when you've seen one Datalog, you've seen one Datalog. | ||