You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 805a81b
Browse filesBrowse the repository at this point in the historyBrowse files
refactor: lift reach() into commons, fixing it for all four languages
The frontier fix belonged in the language-independent code, not in Go's
copy. _reach was byte-identical in the python, java, typescript and go local
backends -- four copies of a graph algorithm over an adjacency of strings,
which is the same argument that lifted shortest_walks in leg 2.5b. Four
copies were four places to drift, and that is precisely how one bug came to
live in all of them.
commons.graphs.reach now owns the walk and the reason for its shape; each
backend's _reach is a one-liner over it, keeping only `direction` -- which
half of the cached adjacency to read -- as a backend concern.
So the fix now covers Python, Java and TypeScript too, where the same
unbounded walk was non-terminating on a sufficiently connected graph and
depth=None is likewise the default on paths_between, flows_to_call,
flows_to_argument and taint.
Tests move to the shared suite beside call_reaches, the other lifted graph
helper: a diamond chain where 55 nodes carry 262,144 paths pins expansion
counting (1,048,573 frontier expansions before, 55 now), plus depth
monotonicity, the fixed point, a cycle, an unknown seed, and that no backend
keeps a copy. 2030 pass; the one failure predates the branch.
Refs #436
0 commit comments