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 / contracts / parity.omegese
| 1 | fn check x int to int |
| 2 | if not ge x 0 |
| 3 | trap 9 |
| 4 | end |
| 5 | i = int 0 |
| 6 | if not le i 10 |
| 7 | trap 10 |
| 8 | end |
| 9 | while lt i x bound 20 |
| 10 | i = add i 1 |
| 11 | if not le i 10 |
| 12 | trap 10 |
| 13 | end |
| 14 | end |
| 15 | if not le i 10 |
| 16 | trap 10 |
| 17 | end |
| 18 | ret i |
| 19 | end |