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