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-depth5.om

28 lines · 591 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note Contract section 4 lines 109-111 and erratum E7: the call site in main (not inlined) is depth 1, so
3note the chain f1 -> ... -> f5 reaches a 5th level: error 14 (obligation=growth).
4note
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 mul a 13 5
20end
21fn id v ulong to ulong
22ret v
23end
24fn main to int
25pu f1 2
26pu f1 id 1000
27ret 0
28end