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

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