Files
rose-ash/lib/datalog/scoreboard.json
giles 285cd530eb
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 39s
datalog: reject body lits with reserved names
Nested `not(not(P))` silently misparsed: outer `not(...)` is
recognised as negation, but the inner `not(banned(X))` was parsed
as a positive call to a relation called `not`. With no `not`
relation present, the inner match was empty, the outer negation
succeeded vacuously, and `vip(X) :- u(X), not(not(banned(X))).`
collapsed to `vip(X) :- u(X).` — a silent double-negation = identity
fallacy.

Fix in `dl-rule-check-safety`: the positive-literal branch and
`dl-process-neg!` both reject any body literal whose relation
name is in `dl-reserved-rel-names`. Error message names the
relation and points the user at stratified negation through an
intermediate relation.

1 regression test; conformance 260/260.

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

21 lines
775 B
JSON

{
"lang": "datalog",
"total_passed": 260,
"total_failed": 0,
"total": 260,
"suites": [
{"name":"tokenize","passed":30,"failed":0,"total":30},
{"name":"parse","passed":22,"failed":0,"total":22},
{"name":"unify","passed":29,"failed":0,"total":29},
{"name":"eval","passed":39,"failed":0,"total":39},
{"name":"builtins","passed":23,"failed":0,"total":23},
{"name":"semi_naive","passed":8,"failed":0,"total":8},
{"name":"negation","passed":10,"failed":0,"total":10},
{"name":"aggregates","passed":22,"failed":0,"total":22},
{"name":"api","passed":20,"failed":0,"total":20},
{"name":"magic","passed":36,"failed":0,"total":36},
{"name":"demo","passed":21,"failed":0,"total":21}
],
"generated": "2026-05-11T07:40:56+00:00"
}