interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / seed / qualification / om2 / sec / s3s4 / unroll-growth.om

34 lines · 1026 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note Contract section 4: two nested unroll 64 loops make 4096 copies of a 12-statement body of unsigned
3note ops on run-time values (each statement at least two instructions, so at least 98304 words). Each
4note loop alone is within the 64-copy bound. Through omc f4fa7951 the 65536-word bound of a function
5note refused it (error 14, obligation=growth); since 2026-11-11 a function has no word bound (OMEGESE
6note 9.6), so it compiles and gives exactly the rolled twin's output (unroll-growth-rolled).
7note Twin unroll-growth-diag.om checks the om2 diag record.
8om2
9fn grow a ulong to ulong
10x = a
11s = add a 1
12t = add a 2
13u = add a 3
14for i ulong 64 unroll
15for j ulong 64 unroll
16x = add mul x 3 add s add i j
17s = xor s shr x 7
18t = add t mul s x
19u = xor u shl t 3
20x = add x mul u 5
21s = add s xor x t
22t = xor t shr s 11
23u = add u mul t 9
24x = xor x add u s
25s = mul s add x 1
26t = add t xor u 13
27u = xor u add s t
28end
29end
30ret xor xor x s xor t u
31end
32fn main to int
33ret int and grow 5 255
34end