## miden::core::stark::utils
| Procedure | Description |
| ----------- | ------------- |
| compute_lde_generator | Compute the LDE domain generator from the log2 of its size.<br /><br />Input: [log2(domain_size), ..]<br />Output: [domain_gen, ..]<br />Cycles: 63<br /> |
| validate_inputs | Validates the inputs to the recursive verifier.<br /><br />Checks log(trace_length) from the stack and security parameters from memory.<br />The security parameters must already be stored in memory before calling this<br />procedure (done by the specific verifier's load_security_params).<br /><br />Input: [log(trace_length), ...]<br />Output: [log(trace_length), ...]<br /> |
| bit_reverse_len_parallel | Reverse the lowest `bits` bits of `index` using parallel bit-swap.<br />`pow2_shift` must equal 2^(32 - bits); the caller pre-computes it once.<br /><br />The algorithm has two parts:<br /><br />1) Left-shift: multiply index by pow2_shift = 2^(32-bits) to place the `bits`<br />meaningful bits into the top of a 32-bit word. Since index < 2^bits, the<br />product is always < 2^32 so u32wrapping_mul is exact.<br /><br />2) Full 32-bit reversal via 5 parallel swap steps. Each step k (for k=1,2,4,8,16)<br />swaps every adjacent group of k bits. A mask isolates the even-positioned<br />groups; the odd-positioned groups are the complement. Shifting each half by<br />k positions and combining swaps all groups simultaneously. After all 5 steps,<br />bit position i has moved to position 31-i, which (because of the initial<br />left-shift) is exactly position (bits-1-i) of the original -- i.e., the<br />reversed index. No final shift is needed.<br /><br />The two halves never overlap, so XOR = OR = ADD; we use XOR (1 cycle vs 3 for<br />u32wrapping_add).<br /><br />Input: [index, pow2_shift, ...]<br />Output: [rev_index, ...]<br />Cycles: 78<br /> |
| set_up_auxiliary_inputs_ace | Sets up the stark-vars region of the ACE circuit input layout.<br /><br />The stark-vars block is 10 EF slots (5 words) laid out as:<br /><br />Word 0 (slots 0-1): alpha, z^N (EF: composition challenge, trace-length power)<br />Word 1 (slots 2-3): z_k, is_first (EF: periodic eval point, first-row selector)<br />Word 2 (slots 4-5): is_last, is_transition (EF: last-row selector, transition selector)<br />Word 3 (slots 6-7): gamma, weight0 (EF: batching challenge; base as EF: barycentric weight)<br />Word 4 (slots 8-9): f, s0 (base as EF: chunk shift ratio h^N, first shift)<br /><br />Input: [max_cycle_len_log, ...]<br />Output: [...]<br /> |
| execute_constraint_evaluation_check | Executes the constraints evaluation check.<br /><br />Inputs: [...]<br />Outputs: [...]<br /><br />Invocation: exec<br /> |
| observe_aux_trace | Observes the auxiliary trace: draws aux randomness, reseeds with the aux trace commitment,<br />and absorbs aux trace boundary values into the transcript.<br /><br />For AIRs without an auxiliary trace, the implementation should be a no-op.<br /><br />Inputs: [...]<br />Outputs: [...]<br /><br />Invocation: exec<br /> |
| store_dynamically_executed_procedures | Stores digests of dynamically executed procedures.<br /><br />Input: [D0, D1, D2, D3, D4, ...]<br />Output: [...]<br /> |