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 / selftest / cat-note.om
| 1 | note harness control: cat.om with a leading note line (notes add no code) |
| 2 | note Harness self-test program (correct): copy standard input to standard output unchanged. |
| 3 | fn main to int |
| 4 | b = new uchar 4096 0 |
| 5 | go = true |
| 6 | while go |
| 7 | r = read 0 b 0 4096 |
| 8 | if lt r 0 |
| 9 | ret 91 |
| 10 | end |
| 11 | if eq r 0 |
| 12 | go = false |
| 13 | else |
| 14 | w = write 1 b 0 ulong r |
| 15 | if ne w r |
| 16 | ret 92 |
| 17 | end |
| 18 | end |
| 19 | end |
| 20 | ret 0 |
| 21 | end |