datalog

Disjunctions in DataLog


So how are OR conditions emulated/invoked in Datalog-land ?

This is probably the most basic question ask-able about DataLog but well hello this is my first attempt at using it ;)


Solution

  • Got it now: it's a strange syntax: disjunction is created by having multiple rules with the same name

    myrecursive(X,Y) :- basecase1(Y,X). 
    myrecursive(X,Y) :- myrecursive(X,Z),myrecursive(Z,Y).
    

    This means that a descendant may satisfy either of those two rules.