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

27 lines · 823 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note OM-1 TWIN of inline-depth4.om for the pinned compiler 734f0a39: same stdout.
3note Contract section 4 lines 93-98 and 109-111: inlining at most 4 levels deep. main calls the
4note inline chain f1 -> f2 -> f3 -> f4 (4 nested inlined bodies), which is within the bound and runs.
5note f1 a = f2(3a)+1, f2 a = f3(5a)+2, f3 a = f4(7a)+3, f4 a = 11a+4; id is an ordinary call.
6note Expected stdout: oracle/s3s4/exp/inline-depth4.out (python3, oracle/s3s4/oracle.py).
7note OM-1 unit: this line replaces the om2 line
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 mul a 11 4
19end
20fn id v ulong to ulong
21ret v
22end
23fn main to int
24pu f1 2
25pu f1 id 1000
26ret 0
27end