reachability

std.linalg.reachability · Level L2

Which vertices each vertex can reach in a finite directed graph, given as a 0/1 adjacency matrix: Rᵢⱼ = 1 when there is a path from i to j, of any length including 0. A Scan of reach_step, n steps from the identity. The reference runs a breadth-first search from every vertex.

Rᵢⱼ = [a path i → ⋯ → j exists]

Signature

reachability(A: f64[n, n]) → f64[n, n]

Structure

The function as NOVA stores it: one box per input, operation and output, and arrows that carry values. A double border marks another library function this one runs — called once, or by Scan once per element; select it to open that function.

Af64[n, n]Iotaeye_rIotaeye_cReduceSumrowsEqualeyeIotaksScan·reach_stepRsSlicelastReduceSumRRf64[n, n]
  • input
  • operation
  • constant
  • call
  • output

Verification

  • Signature proven by NOVA’s shape solver, for every size.
  • Equal to the reference breadth-first search from every vertex in exact rational arithmetic, on all 40 test cases.
  • All 748 float64 results are exact: the error is zero.
  • Interpreter and NumPy backend return bit-identical results.
  • At float32 too: the 40 test cases rounded to float32, and 40 of them exact, with zero error.
Accuracy in detail
correctly rounded (the float64 nearest the exact value)
100%
bit-equal to the NumPy formula in float64
100%
largest error, in units in the last place
0

Identity

sha256:d29772af65862dca5256876fa0d43e91fd61681b22643dec2ad61a11edbb00d0

The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.

Control handle

Symbol
Ω:std.linalg.reachability · Ω:reachability
Pins
sha256:d3693677123fa8e8f46a80c1fa94bb5256a2a02b869bb3438c4eba6040e326dethis graph and the 1 it reaches through calls
Evidence
sha256:9ffea49b4f697bca7d775a531c45b28a885c2e4a6a3a2cc330f12a61c83d8a60the hash of its verification record
Needs
no capability: a pure function

Through NOVA’s control layer, the symbol launches this function only while the program still matches what it pins: a change to this graph, or to any graph it reaches, needs a migration first.

ΣEML 2026

Efficient New Language — a high-density semantic overlay for humans and AI agents.

This site’s demos run on the real EML toolchain, in your browser.

© 2026 EveMissLab (一言諾科技有限公司) / Neo.K. All rights reserved.