datalog: aggregate arg validators (259/259)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 28s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 28s
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.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# datalog scoreboard
|
||||
|
||||
**257 / 257 passing** (0 failure(s)).
|
||||
**259 / 259 passing** (0 failure(s)).
|
||||
|
||||
| Suite | Passed | Total | Status |
|
||||
|-------|--------|-------|--------|
|
||||
@@ -11,7 +11,7 @@
|
||||
| builtins | 23 | 23 | ok |
|
||||
| semi_naive | 8 | 8 | ok |
|
||||
| negation | 10 | 10 | ok |
|
||||
| aggregates | 20 | 20 | ok |
|
||||
| aggregates | 22 | 22 | ok |
|
||||
| api | 20 | 20 | ok |
|
||||
| magic | 36 | 36 | ok |
|
||||
| demo | 21 | 21 | ok |
|
||||
|
||||
Reference in New Issue
Block a user