Files
rose-ash/lib/datalog/scoreboard.md
giles 66aa003461
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 23s
datalog: anonymous _ in negation is existential, not unbound
The canonical Datalog idiom for "no X has any Y":

  orphan(X) :- person(X), not(parent(X, _)).

was rejected by the safety check with "negation refers to unbound
variable(s) (\"_anon1\")". The parser renames each anonymous `_`
to a fresh `_anon*` symbol so multiple `_` occurrences don't unify
with each other, and the negation safety walk then demanded all
free vars in the negated lit be bound by an earlier positive body
lit — including the renamed anonymous vars.

Anonymous vars in a negation are existentially quantified within
the negation, not requirements from outside. Added dl-non-anon-vars
to strip `_anon*` names from the `needed` set before the binding
check in dl-process-neg!. Real vars (like `X` in the orphan idiom)
still must be bound by an earlier positive body lit, just as before.

2 new regression tests (orphan idiom + multi-anon "solo" pattern);
conformance 273/273.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 08:49:20 +00:00

421 B

datalog scoreboard

273 / 273 passing (0 failure(s)).

Suite Passed Total Status
tokenize 31 31 ok
parse 23 23 ok
unify 29 29 ok
eval 42 42 ok
builtins 26 26 ok
semi_naive 8 8 ok
negation 12 12 ok
aggregates 23 23 ok
api 22 22 ok
magic 36 36 ok
demo 21 21 ok