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 / evidence / gate2 / 4.src

40 lines · 703 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note Frozen source set{0,1} independent of secret; universal same-choice coupling.
3text ok "PASS L8 finite: inclusion4/4, faulty same-choice pairs2/2 differ, correct pairs2/2 equal\n"
4fn allowed s ulong choice ulong to ulong
5ret choice
6end
7fn faulty s ulong choice ulong to ulong
8ret s
9end
10fn main to int
11inc = ulong 0
12bad = ulong 0
13for s ulong 2
14for c ulong 2
15r = faulty s c
16if or eq r allowed s 0 eq r allowed s 1
17inc = add inc 1
18end
19end
20end
21for c ulong 2
22if ne allowed 0 c allowed 1 c
23ret 81
24end
25if ne faulty 0 c faulty 1 c
26bad = add bad 1
27end
28end
29if ne inc 4
30ret 82
31end
32if ne bad 2
33ret 83
34end
35n = write 1 ok 0 len ok
36if ne n long len ok
37ret 84
38end
39ret 0
40end