News for hackers. Stuff that matters.
Re:Is Datalog a good language for authorization? by aafldkjfaljkdpr on Sunday February 20, 2022 @08:23AM (#30405478)
Interesting post will spend a little time reading it late,in the meantime a quick Q, this

D = P(x,y) ← Q(x,z) % z is not shared with head(D)

throws me a bit, isn't it equivalent (as z is unused) to

D = P(x,y) ← Q(x)

which makes me wonder what y is doing. Would that leave y unbound, and if so is that why it's disallowed?

TIA

Re:Is Datalog a good language for authorization? by YeGoblynQueenne on Sunday February 20, 2022 @09:12AM (#30405826)
Yes, sorry, the example is not as simple as Einstein would have advised. Yours is simpler. The rule is that every variable in the head must share with the body, so that the head can be ground as the body is ground. I make it more clear in the rest of the comment above, at least I hope :)