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 / sec / s3s4 / ce-sized-oob-rolled.om
| 1 | note SPDX-License-Identifier: Apache-2.0 |
| 2 | note TWIN of ce-sized-oob.om with unroll removed (OM-2 unit). |
| 3 | note Contract section 4 lines 105-106: after unrolling, get a4 i with i = 4 is a constant index outside |
| 4 | note the 4-element SIZED array a4: error 21 at compile time (line 10, the get). Without unroll |
| 5 | note (ce-sized-oob-rolled.om) the index is a run-time value and OM-1 traps 3 at run time instead. |
| 6 | om2 |
| 7 | fn main to int |
| 8 | a4 = new ulong 4 7 |
| 9 | s = ulong 0 |
| 10 | for i ulong 5 |
| 11 | s = add s get a4 i |
| 12 | end |
| 13 | ret int s |
| 14 | end |