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 / checker2 / lrat / p09_roundtrip.osc
| 1 | // prove: rt |
| 2 | // expect: holds |
| 3 | // widening then narrowing a byte is the identity and never traps CAST. |
| 4 | fn rt(x: u8) -> u8 ensures result == x { |
| 5 | let y: i16 = x as i16; |
| 6 | return y as u8; |
| 7 | } |