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-frneg.om
| 1 | note for test at the latch on a signed counter that the body makes negative (B.LT, not B.LO): the first pass |
| 2 | note sets i to -5, so i = 0, -4 .. 2 runs 8 passes (exit 8); an unsigned latch test leaves after 1 pass |
| 3 | om2 |
| 4 | fn main to int |
| 5 | n = long 0 |
| 6 | for i long 3 |
| 7 | if eq n 0 |
| 8 | i = sub i 5 |
| 9 | end |
| 10 | n = add n 1 |
| 11 | end |
| 12 | ret int n |
| 13 | end |