Skip to main content

verify_equivalent

Function verify_equivalent 

Source
pub fn verify_equivalent(
    baseline_tasm: &[String],
    candidate_tasm: &[String],
    seed: u64,
) -> bool
Expand description

Verify that candidate TASM produces the same stack as baseline TASM. Tests with 40 stacks (32 random + 8 structured) — all must pass. A single concrete test case is trivially gamed by the neural optimizer; diverse stacks catch wrong operand order, off-by-one dup/swap depth, missing operations, and false positives on complex blocks. Conservative: rejects candidates when baseline can’t be simulated.