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
omega-mv / seed / omc / sites / found-s-iret-1.om
| 1 | note sites: found by a one-token change of a tracked program; reaches the omc error site in s-iret (code 7) |
| 2 | note SPDX-License-Identifier: Apache-2.0 |
| 3 | note Contract section 4 lines 93-98 and 109-111: inlining at most 4 levels deep. main calls the |
| 4 | note inline chain f1 -> f2 -> f3 -> f4 (4 nested inlined bodies), which is within the bound and runs. |
| 5 | note f1 a = f2(3a)+1, f2 a = f3(5a)+2, f3 a = f4(7a)+3, f4 a = 11a+4; id is an ordinary call. |
| 6 | note Expected stdout: oracle/s3s4/exp/inline-depth4.out (python3, oracle/s3s4/oracle.py). |
| 7 | om2 |
| 8 | fn f1 a ulong to ulong inline |
| 9 | ret add f2 mul a 3 1 |
| 10 | end |
| 11 | fn f2 a ulong to f32 inline |
| 12 | ret add f3 mul a 5 2 |
| 13 | end |
| 14 | fn f3 a ulong to ulong inline |
| 15 | ret add f4 mul a 7 3 |
| 16 | end |
| 17 | fn f4 a ulong to ulong inline |
| 18 | ret add mul a 11 4 |
| 19 | end |
| 20 | fn id v ulong to ulong |
| 21 | ret v |
| 22 | end |
| 23 | fn main to int |
| 24 | pu f1 2 |
| 25 | pu f1 id 1000 |
| 26 | ret 0 |
| 27 | end |