v4 Capstone: Full Pipeline
- Validate lazy evaluation and loop cleanup through BC2 transport.
- Make internal loop state observable despite nil program results.
- Enforce semantic failure before runtime side effects.
1 / 6
let total=0;
for (let i=0; i<4; i=i+1) {
if (i==1) { continue; }
total=total+i;
}
if (total!=5) { 1/0; }
false && (1/0);
The loop adds 0, 2, and 3. Continue still executes post, so i advances past 1. The assertion observes total without exposing the VM's private environment. The last expression compiles both operands but skips its division at runtime; its boolean result is popped as an expression statement. Success returns nil, not total=5 and not the final false value.
A program with top-level break and a later 1/0 returns division-by-zero. Another returns the final expression’s boolean after false && (1/0);. Locate the wrong boundary in each implementation.
Create a nested-loop program with a returned closure capturing an outer binding. Add independent assertions for its loop total and closure result, then insert an undefined name in a skipped RHS and predict the new first failure.
Carry the single-program BC2 baseline into v5. The new risk will be relocating separately compiled artifacts, not reinterpreting existing boolean or loop semantics.