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 / ng / front / cases / fuel_while.om
| 1 | note fuel_while: a while with no bound has fuel 1000000 (front.om fe_lwhile, omc S_WHILE): the 1000000th |
| 2 | note pass ends with i = 1000000 and the next head traps 4 (exit 104); a lowering with one pass more |
| 3 | note writes the line below first, so stdout differs. |
| 4 | text hit "pass 1000001\n" |
| 5 | fn main to int |
| 6 | i = ulong 0 |
| 7 | while lt i 2000000 |
| 8 | i = add i 1 |
| 9 | if eq i 1000001 |
| 10 | k = write 1 hit 0 len hit |
| 11 | end |
| 12 | end |
| 13 | ret int and i 255 |
| 14 | end |