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 / om1 / t-sum.om

29 lines · 524 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note OM-1 twin of v6-sum.om: the same sums over sized views of length 10 and 3.
3note Expected stdout oracle/s5s7/exp/v6-sum.out (python3).
4fn s10 v view uchar 10 to ulong
5x = ulong 0
6for i ulong len v
7x = add x ulong get v i
8end
9ret x
10end
11fn s3 v view uchar 3 to ulong
12x = ulong 0
13for i ulong len v
14x = add x ulong get v i
15end
16ret x
17end
18fn main to int
19a = new uchar 10 0
20for i ulong 10
21put a i uchar mul i 7
22end
23b = new uchar 3 5
24putd len a
25putd s10 a
26putd len b
27putd s3 b
28ret 0
29end