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-ca_st_ok-1.om
| 1 | note sites: found by a one-token change of a tracked program (41 to 120 lines); reaches the omc error site in ca_st_ok (code 7) |
| 2 | om2 |
| 3 | note semhash fixture: the base unit every case is diffed against |
| 4 | const lim ulong 7 |
| 5 | global buf uchar 16 |
| 6 | struct pt px uint py uint end |
| 7 | layout lay 8 |
| 8 | field fa uchar at 0 little |
| 9 | field fb ushort at 1 little |
| 10 | end |
| 11 | |
| 12 | note reformatted: fn leaf a ulong b ulong to ulong |
| 13 | fn leaf a ulong b ulong to ulong |
| 14 | ret add a b |
| 15 | end |
| 16 | |
| 17 | note reformatted: fn mid x ulong to ulong |
| 18 | fn mid x ulong to ulong |
| 19 | y = leaf x 3 |
| 20 | ret mul y 2 |
| 21 | end |
| 22 | |
| 23 | note reformatted: fn top n ulong to ulong |
| 24 | fn top n ulong to ulong |
| 25 | r = mid n |
| 26 | ret add r 1 |
| 27 | end |
| 28 | |
| 29 | note reformatted: fn other s ulong to ulong |
| 30 | fn other s ulong to ulong |
| 31 | ret xor s 5 |
| 32 | end |
| 33 | |
| 34 | note reformatted: fn psub a ulong b ulong to ulong |
| 35 | fn psub a ulong b ulong to ulong |
| 36 | ret sub a b |
| 37 | end |
| 38 | |
| 39 | note reformatted: fn useconst v ulong to ulong |
| 40 | fn useconst v ulong to ulong |
| 41 | ret add v lim |
| 42 | end |
| 43 | |
| 44 | note reformatted: fn useglob i ulong to ulong |
| 45 | fn useglob i ulong to ulong |
| 46 | put buf 0 uchar i |
| 47 | ret len buf |
| 48 | end |
| 49 | |
| 50 | note reformatted: fn callargs u ulong to ulong |
| 51 | fn callargs u ulong to ulong |
| 52 | ret psub u 2 |
| 53 | end |
| 54 | |
| 55 | note reformatted: fn rdlay c view lay i ulong to ulong |
| 56 | fn rdlay c view lay i ulong to ulong |
| 57 | ret ulong get c i |
| 58 | end |
| 59 | |
| 60 | note reformatted: fn sumpt p view pt to ulong |
| 61 | fn sumpt p view pt to ulong |
| 62 | q = ulong get p px |
| 63 | ret add q ulong get p py |
| 64 | end |
| 65 | |
| 66 | note reformatted: fn iseven n ulong to bool |
| 67 | fn iseven n ulong to bool |
| 68 | if eq n 0 |
| 69 | ret true |
| 70 | end |
| 71 | ret isodd sub n 1 |
| 72 | end |
| 73 | |
| 74 | note reformatted: fn isodd n ulong to bool |
| 75 | fn isodd n ulong to bool |
| 76 | if eq n 0 |
| 77 | ret false |
| 78 | end |
| 79 | ret iseven sub n 1 |
| 80 | end |
| 81 | |
| 82 | note reformatted: fn main to int |
| 83 | fn main to int |
| 84 | c = new uchar 8 0 |
| 85 | put c 1 9 |
| 86 | p = new pt 3 4 |
| 87 | t = add top 1 other 2 |
| 88 | t = add t psub 9 4 |
| 89 | t = add t useconst 1 |
| 90 | t = add t useglob 2 |
| 91 | t = add t callargs 5 |
| 92 | t = add t rdlay c 1 |
| 93 | t = add t sumpt edit p |
| 94 | if iseven t |
| 95 | t = add t 64 |
| 96 | end |
| 97 | ret int rem t 251 |
| 98 | end |