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 / ng / front / cases / nom_abstract_op_order.om

24 lines · 566 bytes Raw Blame History
1note Nominal operator operands: xor of two constructor calls evaluates the left operand first. The trace
2note global records the order in decimal digits (left 1, right 2): 12. Exit is the trace.
3om2
4abstract dup32 ulong ops xor
5holds dup32 dup32
6global tr ulong 1
7fn dup32mk x uint to dup32
8ret seal dup32 or shl ulong x 32 ulong x
9end
10fn left to dup32
11put tr 0 add mul get tr 0 10 1
12ret dup32mk 3
13end
14fn right to dup32
15put tr 0 add mul get tr 0 10 2
16ret dup32mk 5
17end
18fn main to int
19v = xor left right
20if ne open v 0x0000000600000006
21ret 1
22end
23ret int get tr 0
24end