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 / security673 / relational / evidence / gate2 / 32.src
| 1 | note SPDX-License-Identifier: Apache-2.0 |
| 2 | note Existing qualification gate supplies timeout, exit and output assertions. |
| 3 | fn main to int |
| 4 | b = new uchar 4096 0 |
| 5 | cnt = sub ulong argcnt 1 |
| 6 | if or eq cnt 0 gt cnt 63 |
| 7 | ret 90 |
| 8 | end |
| 9 | put b 0 uchar cnt |
| 10 | p = ulong 2 |
| 11 | for i ulong cnt |
| 12 | n = argread add i 1 b add p 2 sub 4096 add p 2 |
| 13 | if or lt n 0 gt n 4090 |
| 14 | ret 91 |
| 15 | end |
| 16 | put b p uchar and ulong n 255 |
| 17 | put b add p 1 uchar shr ulong n 8 |
| 18 | p = add add p 2 ulong n |
| 19 | end |
| 20 | r = execprog b 0 p |
| 21 | ret 127 |
| 22 | end |