datalog: magic regression tests from bug-hunt round (242/242)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 48s

Bug-hunt round probed magic-sets against many edge cases. No new
bugs surfaced. Added regression tests for two patterns that
exercise the worklist post-fix:

- 3-stratum program (a → c via not-b → d via not-banned).
  Distinct rule heads at three strata; magic must rewrite each.
- Aggregate-derived chain (count(src) → cnt → active threshold).
  Magic correctly handles multi-step aggregate dependencies.

Magic-sets is robust against: 3-stratum negation, aggregate
chains, mutual recursion, all-bound goals, multi-arity rules,
diagonal queries, EDB-only goals, and rules whose body has
identical positive lits.
This commit is contained in:
2026-05-09 13:11:47 +00:00
parent a4ef271459
commit d437727f1d
3 changed files with 34 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
# datalog scoreboard
**240 / 240 passing** (0 failure(s)).
**242 / 242 passing** (0 failure(s)).
| Suite | Passed | Total | Status |
|-------|--------|-------|--------|
@@ -13,5 +13,5 @@
| negation | 10 | 10 | ok |
| aggregates | 20 | 20 | ok |
| api | 20 | 20 | ok |
| magic | 32 | 32 | ok |
| magic | 34 | 34 | ok |
| demo | 21 | 21 | ok |