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 / si / harness / skills / omega-encoding / examples / trap_narrow.om
| 1 | note edge: narrowing a value that does not fit traps 5, so the program exits 105 |
| 2 | note the masked store on line 6 is fine (300 and 255 = 44); the unmasked store on line 7 traps |
| 3 | global b uchar 2 |
| 4 | fn main to int |
| 5 | x = uint 300 |
| 6 | put b 0 uchar and x 255 |
| 7 | put b 1 uchar x |
| 8 | ret int get b 0 |
| 9 | end |