mk: graph reachability via patho — classic miniKanren
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 24s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 24s
Defines a small graph as a fact list, edgeo for fact lookup, and patho
that recursively constructs paths. Direct-edge clause yields (x y);
otherwise traverse one edge to z, recurse for z->y, prepend x.
Enumerates all paths between two nodes, including alternates through
shortcut edges:
(run* q (patho :a :d q))
-> ((:a :b :c :d) (:a :c :d)) ; both routes
6 new tests, 316/316 cumulative.
This commit is contained in:
@@ -173,6 +173,11 @@ _(none yet)_
|
||||
|
||||
_Newest first._
|
||||
|
||||
- **2026-05-08** — **Graph reachability via patho**: classic miniKanren
|
||||
graph search. `edgeo` looks up edges in a fact list via `membero`; `patho`
|
||||
recursively builds paths via direct-edge OR (one edge + recurse + cons).
|
||||
Enumerates all paths between two nodes, including alternates through
|
||||
shortcuts. 6 new tests, 316/316 cumulative.
|
||||
- **2026-05-08** — **everyo / someo (predicate-style relations)**:
|
||||
`(everyo rel l)` — every element of l satisfies rel; `(someo rel l)` —
|
||||
some element does. Both compose with intarith for numeric tests:
|
||||
|
||||
Reference in New Issue
Block a user