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 / tools / exp445 / arms / examples / halve_or_dec_steps / program.omegese
| 1 | fn halve_or_dec_steps n uint to uint |
| 2 | k = uint 0 |
| 3 | while gt n 1 bound 64 |
| 4 | if eq rem n 2 0 |
| 5 | n = div n 2 |
| 6 | else |
| 7 | n = sub n 1 |
| 8 | end |
| 9 | k = add k 1 |
| 10 | end |
| 11 | ret k |
| 12 | end |