Files
rose-ash/lib
giles 9a16f27075
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 27s
datalog: dl-walk handles circular substitutions without infinite loop (257/257)
Bug: dl-walk would infinite-loop on a circular substitution
(e.g. A→B and B→A simultaneously). The walk endlessly chased
the cycle. This couldn't be produced through dl-unify (which has
cycle-safe behavior via existing bindings), but raw dl-bind calls
or external manipulation of the subst dict could create it.

Fix: dl-walk now threads a visited-names list through the
recursion. If a variable name is already in the list, the walk
stops and returns the current term unchanged. Normal chained
walks are unaffected (A→B→C→42 still resolves to 42).

1 new unify test verifies circular substitutions don't hang.
2026-05-11 07:20:20 +00:00
..