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
omega-mv / seed / omc / sites / found-newname-1.om
| 1 | note sites: found by a one-token change of a tracked program; reaches the omc error site in newname (code 10) |
| 2 | note S3 abstract: an inlined exact constructor, values passed through a function, a uint-based abstract |
| 3 | note type with no invariant, xor/rotr/rotl/and/or where listed. Exit 0 when every opened value is right. |
| 4 | om2 |
| 5 | abstract dup32 ulong ops rotr rotl xor |
| 6 | holds dup32 dup32 |
| 7 | abstract x uint ops and or |
| 8 | fn dup32mk x uint to dup32 inline |
| 9 | ret seal dup32 or shl ulong x 32 ulong x |
| 10 | end |
| 11 | fn tagmk x uint to tag |
| 12 | ret seal tag x |
| 13 | end |
| 14 | fn pass d dup32 n ulong to dup32 |
| 15 | ret rotl rotr d n 3 |
| 16 | end |
| 17 | fn main to int |
| 18 | d = dup32mk 0x80000001 |
| 19 | e = pass d 8 |
| 20 | if ne open e 0x0c0000000c000000 |
| 21 | ret 1 |
| 22 | end |
| 23 | if ne open xor e d 0x8c0000018c000001 |
| 24 | ret 2 |
| 25 | end |
| 26 | t = or tagmk 12 tagmk 3 |
| 27 | u = and t tagmk 5 |
| 28 | if ne open u 5 |
| 29 | ret 3 |
| 30 | end |
| 31 | ret 0 |
| 32 | end |