The heirs, stratified
ancestor(X, Y) :- parent(X, Y).
ancestor(X, Y) :- parent(X, Z), ancestor(Z, Y).
descendant(X, Y) :- ancestor(Y, X).
criminal("kate").
living_descendant(X) :-
descendant(X, "basil"), not deceased(X).
eligible_heir(X) :-
living_descendant(X), not criminal(X).
Both negations point down a level, so conditions 1 and 2 hold: Datamog evaluates level 0, then level 1.
Positive recursion (ancestor) stays within a level.