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 / inline-depth6.om

31 lines · 705 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note Contract section 4 lines 109-111: inlining at most 4 levels deep, beyond that error 14
3note (obligation=growth). main calls the inline chain f1 -> ... -> f6: 6 nested inlined bodies,
4note beyond 4 (erratum E7: the call site in main is depth 1).
5om2
6fn f1 a ulong to ulong inline
7ret add f2 mul a 3 1
8end
9fn f2 a ulong to ulong inline
10ret add f3 mul a 5 2
11end
12fn f3 a ulong to ulong inline
13ret add f4 mul a 7 3
14end
15fn f4 a ulong to ulong inline
16ret add f5 mul a 11 4
17end
18fn f5 a ulong to ulong inline
19ret add f6 mul a 13 5
20end
21fn f6 a ulong to ulong inline
22ret add mul a 17 6
23end
24fn id v ulong to ulong
25ret v
26end
27fn main to int
28pu f1 2
29pu f1 id 1000
30ret 0
31end