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 / security673 / relational / paired.om

62 lines · 1004 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note Concatenate after compare32.om. Test assertions are outside scanned primitive.
3text ok "PASS L2 native: all32 positions x256 values x255 mismatches, paired complements, two-position and all32 flips\n"
4fn main to int
5a = new uchar 32 0
6b = new uchar 32 0
7if ne compare32 a b 1
8ret 11
9end
10for p ulong 32
11for v ulong 256
12put a p uchar v
13put b p uchar v
14if ne compare32 a b 1
15ret 12
16end
17for k ulong 255
18put a p uchar v
19put b p xor uchar v uchar add k 1
20if ne compare32 a b 0
21ret 13
22end
23put a p xor uchar v 255
24put b p xor get b p 255
25if ne compare32 a b 0
26ret 14
27end
28end
29end
30put a p 0
31put b p 0
32end
33for k ulong 255
34for j ulong 32
35put a j 0
36put b j 0
37end
38put b 0 uchar add k 1
39put b 1 uchar add k 1
40if ne compare32 a b 0
41ret 16
42end
43for j ulong 32
44put b j uchar add k 1
45end
46if ne compare32 a b 0
47ret 17
48end
49for j ulong 32
50put a j 255
51put b j xor get b j 255
52end
53if ne compare32 a b 0
54ret 18
55end
56end
57n = write 1 ok 0 len ok
58if ne n long len ok
59ret 15
60end
61ret 0
62end