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 / ce-sized-oob.om

13 lines · 446 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note Contract section 4 lines 105-106: after unrolling, get a4 i with i = 4 is a constant index outside
3note the 4-element SIZED array a4: error 21 at compile time (line 10, the get). Without unroll
4note (ce-sized-oob-rolled.om) the index is a run-time value and OM-1 traps 3 at run time instead.
5om2
6fn main to int
7a4 = new ulong 4 7
8s = ulong 0
9for i ulong 5 unroll
10s = add s get a4 i
11end
12ret int s
13end