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-nest-64x2.om
| 1 | note SPDX-License-Identifier: Apache-2.0 |
| 2 | note Contract section 4 lines 87-92, 110 and erratum E7: the 64-copy limit is per unrolled loop, so an unroll 2 |
| 3 | note nested in an unroll 64 (128 copies of the inner body) is accepted; the total is bounded only by the |
| 4 | note 65536-word limit. Removing unroll (twin unroll-nest-64x2-rolled.om) changes nothing. |
| 5 | note Expected stdout: oracle/s3s4/exp/unroll-nest-64x2.out (python3, oracle/s3s4/oracle.py). |
| 6 | om2 |
| 7 | fn main to int |
| 8 | f = ulong 1 |
| 9 | c = ulong 0 |
| 10 | for i ulong 64 unroll |
| 11 | for j ulong 2 unroll |
| 12 | f = add mul f 31 add mul i 2 j |
| 13 | c = add c 1 |
| 14 | end |
| 15 | end |
| 16 | pu f |
| 17 | pu c |
| 18 | ret 0 |
| 19 | end |