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 / seed / qualification / om2 / sec / s5s7 / f5-ifelse.om
| 1 | note SPDX-License-Identifier: Apache-2.0 |
| 2 | note contract 5 fresh, line 122: element 0 written in both arms of if/else is in the intersection at |
| 3 | note the join: accepted. stdout 11 then 22 (oracle exp/f5-ifelse.out). |
| 4 | om2 |
| 5 | fn f s edit uchar 8 fresh c ulong to ulong |
| 6 | if eq c 1 |
| 7 | put s 0 11 |
| 8 | else |
| 9 | put s 0 22 |
| 10 | end |
| 11 | ret ulong get s 0 |
| 12 | end |
| 13 | fn main to int |
| 14 | a = new uchar 8 0 |
| 15 | putd f a 1 |
| 16 | putd f a 2 |
| 17 | ret 0 |
| 18 | end |