/** * `while` boolean-condition loop runtime semantics. * * Operational semantics: * 1. Evaluate the STRICT-BOOLEAN condition at the loop head. A non-boolean * condition is out of domain (decision D1: `while` is strict-boolean, NOT * `if`-style portable-truthy — fixpoint re-evaluation amplifies NaN / * type-flip divergence, so an actual boolean is required). * 2. False -> the loop completes normally. * 3. True -> run the body in the SAME environment (so a body `assign n += 1` * persists and the loop can terminate). Then: * - body `break` -> consumed; loop completes normally and exits. * - body `continue` -> ends the iteration; re-evaluate the condition. * - body `return`/`throw` -> propagate as the loop completion. * - body normal -> repeat. * 4. Iterations are observed ONLY through the repeated body events (decision * D3: `while` emits NO new trace op; `iter-next` stays collection-only). * * Termination: the reference enforces an iteration ceiling. Exceeding it is a * reference/harness error (a non-terminating fixture is a test bug), NOT a * `{kind:"throw"}` completion. * * Portability domain: the condition is a strict-boolean expression over the * shared portable-scalar evaluator (comparisons, equality, `!`/`&&`/`||` whose * result is a boolean). Truthy / numeric / string conditions and Python * `while ... else` are excluded. */ import { type NodeContract } from './index.js'; export declare const whileContract: NodeContract; /** Idempotent registration. Test cleanup that clears the registry must re-call. */ export declare function registerWhileContract(): void; /** Reset registration flag — only for test cleanup that clears the registry. */ export declare function _resetWhileContractForTest(): void;