datalog: indexed dl-find-bindings + chain-15 differential (Phase 5c, 153/153)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 59s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 59s
dl-find-bindings now uses dl-fb-aux lits db subst i n (indexed iteration via nth) instead of recursive (rest lits). Eliminates O(N²) list-copy per body of length N. chain-15 saturation 25s → 16s; chain-25 finishes in 33s real (vs. timeout previously). Bumped semi_naive tests to chain-10 differential + chain-15 semi-only count (was chain-5/chain-5). Blocker entry refreshed.
This commit is contained in:
@@ -120,18 +120,18 @@
|
||||
(dl-sn-counts-agree?
|
||||
(dl-sn-counts "p(a). p(b). q(X) :- p(X), =(X, a)."))
|
||||
true)
|
||||
;; Chain length 5 — small but enough to exercise multiple
|
||||
;; semi-naive iterations against a recursive rule.
|
||||
;; Chain length 10 — exercises multiple semi-naive iterations
|
||||
;; against the recursive ancestor rule.
|
||||
(dl-sn-test!
|
||||
"chain-5 ancestor counts match"
|
||||
(dl-sn-counts-agree? (dl-sn-counts (dl-sn-chain-source 5)))
|
||||
"chain-10 ancestor counts match"
|
||||
(dl-sn-counts-agree? (dl-sn-counts (dl-sn-chain-source 10)))
|
||||
true)
|
||||
(dl-sn-test!
|
||||
"chain-5 ancestor count value"
|
||||
"chain-15 ancestor count value (semi only)"
|
||||
(let
|
||||
((db (dl-program (dl-sn-chain-source 5))))
|
||||
((db (dl-program (dl-sn-chain-source 15))))
|
||||
(do (dl-saturate! db) (len (dl-relation db "ancestor"))))
|
||||
15)
|
||||
120)
|
||||
(dl-sn-test!
|
||||
"query through semi saturate"
|
||||
(let
|
||||
|
||||
Reference in New Issue
Block a user