Stratification is how Datalog makes not safe. The relations are sorted into layers, and a layer is computed completely before the next one starts. A rule may only ask what is not in a relation from an earlier layer, one that is already finished.
That rules out a relation that depends on its own absence:
bondy
relation A(name: String) :- Node(name: name), not B(name: name)
relation B(name: String) :- Node(name: name), not A(name: name)Each new A removes a reason for a B and each B a reason for an A, so there is no stable answer. Bondy's compiler rejects this program as unstratifiable and names the cycle.