# gnucobol-rs-exec

Procedure Division **control-flow combinators** with cobc-faithful iteration semantics — the part of an
executor that is byte-deterministic and provable. `no_std`.

gnucobol-rs is deliberately *not* a Procedure Division executor; the `GNURUST.PROCEDURE.FLOW.ATLAS.1` court
*observed* what each control statement does, and this crate encodes those observed semantics as combinators,
pinned in tests to the court's counts (`PERFORM 3 TIMES` → 3, `PERFORM VARYING 1 BY 1 UNTIL > 4` → body 4×,
index ends at 5).

```rust
let mut n = 0;
gnucobol_rs_exec::perform_times(3, || n += 1);
assert_eq!(n, 3);
assert_eq!(gnucobol_rs_exec::perform_varying(1, 1, 4, |_| {}), 5); // index ends past the bound
```

Provides `perform_times`, `perform_until` (TEST BEFORE), `perform_until_after` (TEST AFTER),
`perform_varying` (returns the cobc end-value), and `evaluate` (first true `WHEN`). Condition evaluation
(`IF` / `EVALUATE` / `LEVEL-88`) is supplied by the caller — typically composing the oracle-proven
`gnucobol-rs` core — keeping these combinators pure and `no_std`.

## License
LGPL-3.0-or-later — a faithful derivative of GnuCOBOL/libcob (FSF copyright retained). See COPYING.LESSER (+ COPYING).
