cyk
std.seq.cyk · Level L3Whether a grammar in Chomsky normal form derives a word, as 1 or 0, by the CYK recognizer, and the table X[A, i, j] of which nonterminals derive which parts w[i:j]. The grammar is k nonterminals, terminal rules Tm[A, σ] for A → σ, binary rules A → B C listed as RA, RB, RC, and a start symbol. The table is closed under the binary rules by L steps of cyk_step, each one batched product per rule. A word of length L ≥ 1; CYK decides membership, unlike a bounded search, whose failure would prove nothing.
Signature
cyk(Tm: f64[k, s], RA: i64[q], RB: i64[q], RC: i64[q], start: i64[], word: i64[L]) → f64[], f64[k, L+1, L+1]
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.
- input
- operation
- constant
- call
- output
Verification
- Signature proven by NOVA’s shape solver, for every size.
- Equal to the reference
the textbook CYK table by span length, in Pythonin exact rational arithmetic, on all 40 test cases. - All 3,534 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.
- 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:0e0a4e7669f1a6ec91d73937351b3e4f5f0156276922ffb61d0611a7db2ef6f1The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.seq.cyk · Ω:cyk
- Pins
sha256:6a71d62c34befc41064219e0decc3f46bed769536c556184305084656aa7ce62this graph and the 1 it reaches through calls- Evidence
sha256:8c4b93594a2a665445fa4e5cc131daadb2c42d4550a9588364b3ccdde37722bcthe 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.