Files
rose-ash/lib/datalog/scoreboard.md
giles 9e380fd96e
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 37s
datalog: aggregate validates that agg-var appears in goal
`count(N, Y, p(X))` silently returned `N = 1` because `Y` was never
bound by the goal — every match contributed the same unbound symbol
which dl-val-member? deduped to a single entry. Similarly:

  sum(S, Y, p(X))    => raises "expected number, got symbol"
  findall(L, Y, p(X)) => L = (Y)  (a list containing the unbound symbol)
  count(N, Y, p(X))   => N = 1    (silent garbage)

Added a third validator in dl-eval-aggregate: the agg-var must
syntactically appear among the goal's variables. Error names the
variable and the goal and explains why the result would be
meaningless.

1 new test; conformance 263/263.

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

18 lines
421 B
Markdown

# datalog scoreboard
**263 / 263 passing** (0 failure(s)).
| Suite | Passed | Total | Status |
|-------|--------|-------|--------|
| tokenize | 30 | 30 | ok |
| parse | 22 | 22 | ok |
| unify | 29 | 29 | ok |
| eval | 39 | 39 | ok |
| builtins | 23 | 23 | ok |
| semi_naive | 8 | 8 | ok |
| negation | 10 | 10 | ok |
| aggregates | 23 | 23 | ok |
| api | 22 | 22 | ok |
| magic | 36 | 36 | ok |
| demo | 21 | 21 | ok |