Files
rose-ash/lib/datalog
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
..