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 / s3s4 / unroll-nest.om

23 lines · 708 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note Contract section 4 lines 87-92 and 105: nested unrolled loops, 8 x 8 = 64 copies of the inner body
3note with i and j bound to constants; the folded index add mul i 8 j into the 64-element array m is a
4note constant in range (no error 21). Removing unroll (twin unroll-nest-rolled.om) changes nothing.
5note Expected stdout: oracle/s3s4/exp/unroll-nest.out (python3, oracle/s3s4/oracle.py).
6om2
7fn main to int
8m = new ulong 64 0
9f = ulong 14695981039346656037
10for i ulong 8 unroll
11for j ulong 8 unroll
12f = mul xor f add mul i 8 j 1099511628211
13put m add mul i 8 j add mul i 1000 j
14end
15end
16pu f
17g = ulong 0
18for k ulong 64
19g = add mul g 3 get m k
20end
21pu g
22ret 0
23end