Skip to main content

compile_budget_membrane

Function compile_budget_membrane 

Source
pub fn compile_budget_membrane(
    dims: usize,
    budget_width: Width,
    evidence_width: Width,
) -> Result<AdmissionProgram, ProgramError>
Expand description

Compile the budget membrane: admit iff every dimension passes the two-phase check D_d ≤ L_d ∧ L_d ≤ A_d ∧ G_d ≤ E_d ∧ Q_d ⊆ C_d. Reads 7·dims input lanes in canonical order: limit, available, derived-min (each budget_width), guarantee-required, guarantee-available (each 2-bit), evidence-required, evidence-available (each evidence_width).

§Errors

ProgramError only on u32 node-index overflow, which a membrane never hits.