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 / s0s2 / s2hex / dec-places.om
| 1 | note SPDX-License-Identifier: Apache-2.0 |
| 2 | note OM-1 twin of s2hex/hex-places.om with decimal literals (pinned check of the oracle values). |
| 3 | text msg "hex\n" |
| 4 | fn twice a ulong to ulong |
| 5 | ret mul a 2 |
| 6 | end |
| 7 | fn main to int |
| 8 | a = new uchar 4 0 |
| 9 | put a 1 104 |
| 10 | put a 3 10 |
| 11 | s = ulong 0 |
| 12 | for i ulong 5 |
| 13 | s = add s i |
| 14 | end |
| 15 | putu s |
| 16 | putu twice 21 |
| 17 | putu ulong get a 1 |
| 18 | if eq s 10 |
| 19 | putu 2748 |
| 20 | end |
| 21 | x = int 16 |
| 22 | y = sub x 32 |
| 23 | if lt y 0 |
| 24 | putu ulong neg y |
| 25 | end |
| 26 | r = write 1 msg 0 len msg |
| 27 | ret int get a 3 |
| 28 | end |