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 / equiv / wide.unit.om

36 lines · 1014 bytes Raw Blame History
1note irequiv fixture (issue 826): a 32-bit domain, beyond the exhaustive limit.
2note pop32 and pop32s (SWAR) can only be compared by sampling, which is not a proof;
3note pop32t is a mutant that drops the top bit. spin never returns within the
4note interpreter's fuel (16777216 instructions), so its result is INCONCLUSIVE.
5note spin runs 1000000 x 20 = 20000000 iterations as two loops: IR mode refuses a
6note for count above 1000000 (error 8), the C oracle's range (#857).
7fn pop32 x uint to uint
8c = uint 0
9for i uint 32
10c = add c and x 1
11x = shr x 1
12end
13ret c
14end
15fn pop32s x uint to uint
16x = sub x and shr x 1 1431655765
17x = add and x 858993459 and shr x 2 858993459
18x = and add x shr x 4 252645135
19ret shr mul x 16843009 24
20end
21fn pop32t x uint to uint
22x = and x 2147483647
23x = sub x and shr x 1 1431655765
24x = add and x 858993459 and shr x 2 858993459
25x = and add x shr x 4 252645135
26ret shr mul x 16843009 24
27end
28fn spin x uchar to uchar
29y = x
30for i uint 1000000
31for j uint 20
32y = add y 1
33end
34end
35ret y
36end