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 / omc / sites / found-harray-1.om
| 1 | note sites: found by a one-token change of a tracked program; reaches the omc error site in harray (code 7) |
| 2 | note files: create, stat and remove one file in the current directory. |
| 3 | text nm "effects.tmp" |
| 4 | fn main to int |
| 5 | fd = int fopen nm 0 len nm 578 384 |
| 6 | if lt fd 0 |
| 7 | ret 1 |
| 8 | end |
| 9 | w = write fd nm 0 len nm |
| 10 | st = new long 128 0 |
| 11 | r = fstat fd st 0 128 |
| 12 | c = fclose fd |
| 13 | u = unlink nm 0 len nm |
| 14 | if or ne r 0 ne u 0 |
| 15 | ret 2 |
| 16 | end |
| 17 | ret 0 |
| 18 | end |