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 / bench / inference_cost / tasks / task03 / reference.om
| 1 | fn popcount_u32 x uint to uint |
| 2 | c = uint 0 |
| 3 | v = x |
| 4 | while gt v 0 |
| 5 | c = add c (and v 1) |
| 6 | v = shr v 1 |
| 7 | end |
| 8 | ret c |
| 9 | end |