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.om

23 lines · 665 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note Contract section 4 lines 105-106: an index into a SIZED array that is a constant after unrolling
3note or folding is checked at compile time; inside the array it is accepted (no error 21) and runs.
4note a = 1 11 21 31 written with put a i, read back with get a i and the folded get a sub 3 i.
5note Twin ce-sized-rolled.om has the same stdout: oracle/s3s4/exp/ce-sized.out (python3).
6om2
7fn main to int
8a = new ulong 4 0
9for i ulong 4 unroll
10put a i add mul i 10 1
11end
12s = ulong 0
13for i ulong 4 unroll
14s = add mul s 100 get a i
15end
16pu s
17t = ulong 0
18for i ulong 4 unroll
19t = add mul t 100 get a sub 3 i
20end
21pu t
22ret 0
23end