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 / s5s7 / f5-loop.om
| 1 | note SPDX-License-Identifier: Apache-2.0 |
| 2 | note contract 5 fresh, line 123: a rolled loop contributes nothing (no induction), so the constant |
| 3 | note get after a loop that writes every element is error 27. |
| 4 | om2 |
| 5 | fn f s edit uchar 8 fresh to ulong |
| 6 | for i ulong 8 |
| 7 | put s i 27 |
| 8 | end |
| 9 | ret ulong get s 0 |
| 10 | end |
| 11 | fn main to int |
| 12 | a = new uchar 8 0 |
| 13 | putd f a |
| 14 | ret 0 |
| 15 | end |