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 / cflow / pl-frhigh.om
| 1 | note for test at the latch on a ulong counter (type 5, the largest unsigned type) above 2^63 (B.LO, not |
| 2 | note B.LT): the first pass sets i to 2^64 - 2, the latch adds 1 and 2^64 - 1 is not below 3, so 1 pass |
| 3 | note (exit 1); a signed latch test reads -1 and runs -1, 0, 1, 2 too (exit 5). |
| 4 | om2 |
| 5 | fn main to int |
| 6 | n = long 0 |
| 7 | for i ulong 3 |
| 8 | if eq n 0 |
| 9 | i = ulong 18446744073709551614 |
| 10 | end |
| 11 | n = add n 1 |
| 12 | end |
| 13 | ret int n |
| 14 | end |