Files
rose-ash/lib/datalog/scoreboard.md
giles dcae125955
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 28s
datalog: aggregate arg validators (259/259)
Bug: dl-eval-aggregate accepted non-variable agg-vars and non-
literal goals silently, producing weird/incorrect counts:
- `count(N, 5, p(X))` would compute count over the single
  constant 5 (always 1), ignoring p entirely.
- `count(N, X, 42)` would crash with "unknown body-literal
  shape" at saturation time rather than at rule-add time.

Fix: dl-eval-aggregate now validates up front that the second
arg is a variable (the value to aggregate) and the third arg is
a positive literal (the goal). Errors are descriptive and
include the offending argument.

2 new aggregate tests.
2026-05-11 07:26:48 +00:00

421 B

datalog scoreboard

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

Suite Passed Total Status
tokenize 30 30 ok
parse 22 22 ok
unify 29 29 ok
eval 38 38 ok
builtins 23 23 ok
semi_naive 8 8 ok
negation 10 10 ok
aggregates 22 22 ok
api 20 20 ok
magic 36 36 ok
demo 21 21 ok