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 / s5s7 / f5-unroll-all.om
| 1 | note SPDX-License-Identifier: Apache-2.0 |
| 2 | note contract 5 fresh, lines 124-126 and 4 line 87: an unrolled loop writes elements 0..7 at constant |
| 3 | note indexes, so all N bits are definitely written and a non-constant get is accepted. |
| 4 | note stdout: s[5] = 6, then the sum 1+..+8 = 36 (oracle exp/f5-unroll-all.out). |
| 5 | om2 |
| 6 | fn f s edit uchar 8 fresh k ulong to ulong |
| 7 | for i ulong 8 unroll |
| 8 | put s i uchar add i 1 |
| 9 | end |
| 10 | t = ulong 0 |
| 11 | for j ulong 8 |
| 12 | t = add t ulong get s j |
| 13 | end |
| 14 | putd ulong get s k |
| 15 | ret t |
| 16 | end |
| 17 | fn main to int |
| 18 | a = new uchar 8 0 |
| 19 | putd f a 5 |
| 20 | ret 0 |
| 21 | end |