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 / tri_kind / program.omegese
| 1 | fn tri_kind a ushort b ushort c ushort to uchar |
| 2 | x = uint a |
| 3 | y = uint b |
| 4 | z = uint c |
| 5 | if or or le add x y z le add x z y le add y z x |
| 6 | ret 0 |
| 7 | else |
| 8 | if and eq a b eq b c |
| 9 | ret 1 |
| 10 | else |
| 11 | if or or eq a b eq b c eq a c |
| 12 | ret 2 |
| 13 | end |
| 14 | end |
| 15 | end |
| 16 | ret 3 |
| 17 | end |