Expand description
unroll_scan: materialize a bounded crate::Op::Scan into real
primitive nodes on demand. Used as (a) the FKC/Spec-B numeric oracle and
(b) the fallback lowering for a backend without a scan kernel. NOT
registered as anyone’s .decompose — Op::Scan is a bare primitive that
stays terminal in the base map.
Structs§
- Scan
Layout - The parsed input layout of an
Op::Scannode — the fields the early-exit step driver needs, extracted from the trailing-input encoding. - Scan
Step - One materialized scan step: the post-step carry, the emitted
y, and the (optional) realizedstoppredicate node for this step.
Functions§
- build_
scan_ step - Materialize one step of a scan at step index
twith the givencarryNodeId. Slices eachxs[i]at[t, t+1)(squeezed), clonesbody_new_carry/body_y/pred_exitwith a single shared substitution map so that apred_exitreferencingbody_new_carryresolves to this step’s new carry (no double-clone). Returns the post-step carry,y, and the optionalstoppredicate node. - parse_
scan_ layout - Parse an
Op::Scannode’s trailing-input layout. Mirrors the parse inunroll_scan, including theearly_exit-aware trailing count, but yields a struct the step driver can drive one step at a time. Returns a typedErrfor a non-Op::Scannode or a malformed (too-short) input layout. - unroll_
scan - Unroll
stepsiterations of theOp::Scanatscan_idinto primitives.