Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Real bug: the worklist used (set! queue (rest queue)) to pop the head, which left queue bound to a fresh empty list as soon as the last item was popped. Subsequent (append! queue ...) was a no-op on the empty list — so when the head's rewrite generated new (rel, adn) pairs to enqueue, they vanished. Multi-relation programs (e.g. shortest -> path -> edge, or chained derived relations) only had their head's rules rewritten; downstream rules silently dropped. Fix: use an index-based loop (idx 0 → len queue), with append! adding to the same list. Items added after the current pointer are picked up in subsequent iterations. 2 new regression tests: - 4-level chain (a → r1 → r2 → r3 → r4) under magic returns 2 - shortest-path demo via magic equals dl-query (1 result)
421 B
421 B
datalog scoreboard
239 / 239 passing (0 failure(s)).
| Suite | Passed | Total | Status |
|---|---|---|---|
| tokenize | 26 | 26 | ok |
| parse | 20 | 20 | ok |
| unify | 28 | 28 | ok |
| eval | 32 | 32 | ok |
| builtins | 23 | 23 | ok |
| semi_naive | 8 | 8 | ok |
| negation | 10 | 10 | ok |
| aggregates | 20 | 20 | ok |
| api | 20 | 20 | ok |
| magic | 31 | 31 | ok |
| demo | 21 | 21 | ok |