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 / candidates / s4 / mutants / part-order.from
| 1 | note arrpart (OM-2, spec 6): `part A o k` as argument pi of function f (index + 1); md 57 / 58 when `view` / |
| 2 | note `edit` was written before it. A is a name (a global is error 19, a fresh array 27); o, then k, are |
| 3 | note ulong values. Checks, in this order: o <= len A (CMP Xo, Xlen; B.HI trap 3), then k <= len A - o (SUB, |
| 4 | note CMP, B.HI trap 3); the wrapped o + k is never formed. The part is a view of A + o * size with count k: |
| 5 | note an edit when A is writable (local or edit) and no `view` was written, else a view. It goes only to an |
| 6 | note unsized parameter (error 7). Out as arrarg; rt is A, so for error 19 the part counts as its base. |
| 7 | fn arrpart f ulong pi ulong md ulong to void |
| 8 | p = add mul sub f 1 6 pi |
| 9 | e = arrname |
| 10 | i = sub e 1 |
| 11 | k = ulong get nm_kind i |
| 12 | if ge k 6 |
| 13 | fail 7 |
| 14 | end |
| 15 | if eq k 4 |
| 16 | fail 19 |
| 17 | end |
| 18 | fz_arg e |
| 19 | if eq get fn_pk p 3 |
| 20 | if eq md 57 |
| 21 | fail 20 |
| 22 | end |
| 23 | if and ne k 1 ne k 3 |
| 24 | fail 20 |
| 25 | end |
| 26 | else |
| 27 | if eq md 58 |
| 28 | fail 7 |
| 29 | end |
| 30 | end |
| 31 | if ne ulong get nm_type i ulong get fn_pt p |
| 32 | fail 7 |
| 33 | end |
| 34 | if ne get fn_pl p 0 |
| 35 | fail 7 |
| 36 | end |
| 37 | rdval 0 5 255 0 |
| 38 | if ne get rt 0 5 |
| 39 | fail 7 |
| 40 | end |
| 41 | ro = matreg get rk 0 get rv 0 5 |
| 42 | rdval 0 5 255 0 |
| 43 | if ne get rt 0 5 |
| 44 | fail 7 |
| 45 | end |
| 46 | rn = matreg get rk 0 get rv 0 5 |
| 47 | d = partck i ro rn |
| 48 | ux = add mul get depth 0 6 pi |
| 49 | put ul_k ux 1 |
| 50 | put ul_v ux rn |
| 51 | put rt 0 e |
| 52 | put rk 0 5 |
| 53 | put rv 0 d |
| 54 | end |