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 / omc / om2 / s3 / a-ok.om

31 lines · 695 bytes Raw Blame History
1note S3 abstract: an inlined exact constructor, values passed through a function, a uint-based abstract
2note type with no invariant, xor/rotr/rotl/and/or where listed. Exit 0 when every opened value is right.
3om2
4abstract dup32 ulong ops rotr rotl xor
5holds dup32 dup32
6abstract tag uint ops and or
7fn dup32mk x uint to dup32 inline
8ret seal dup32 or shl ulong x 32 ulong x
9end
10fn tagmk x uint to tag
11ret seal tag x
12end
13fn pass d dup32 n ulong to dup32
14ret rotl rotr d n 3
15end
16fn main to int
17d = dup32mk 0x80000001
18e = pass d 8
19if ne open e 0x0c0000000c000000
20ret 1
21end
22if ne open xor e d 0x8c0000018c000001
23ret 2
24end
25t = or tagmk 12 tagmk 3
26u = and t tagmk 5
27if ne open u 5
28ret 3
29end
30ret 0
31end