interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / seed / qualification / om2 / sec / s5s7 / f5-unroll-all.om

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