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 / tests / one_layer / omegese / trial2 / dev05.omegese
| 1 | fn checked_mul a i16 b i16 to i16 |
| 2 | p = mul a b |
| 3 | if lt p short 32767 |
| 4 | if ge p short -32768 |
| 5 | ret p |
| 6 | else |
| 7 | trap 1 |
| 8 | end |
| 9 | else |
| 10 | trap 1 |
| 11 | end |
| 12 | end |