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

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