omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / seed / qualification / om2 / sec / s3s4 / unroll-break-nested.om
| 1 | note SPDX-License-Identifier: Apache-2.0 |
| 2 | note Contract section 4 line 90 and erratum E7: a break whose innermost loop is a ROLLED loop nested in an |
| 3 | note unrolled body is allowed and leaves the rolled loop. Each of the 4 copies adds 1 once: exit 4. |
| 4 | note Twins unroll-break-nested-rolled.om / -om1.om, same expectation (oracle/s3s4/exp). |
| 5 | om2 |
| 6 | fn main to int |
| 7 | s = ulong 0 |
| 8 | for i ulong 4 unroll |
| 9 | for j ulong 3 |
| 10 | if eq j 1 |
| 11 | break |
| 12 | end |
| 13 | s = add s 1 |
| 14 | end |
| 15 | end |
| 16 | ret int s |
| 17 | end |