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-depth5.om
| 1 | note SPDX-License-Identifier: Apache-2.0 |
| 2 | note Contract section 4 lines 109-111 and erratum E7: the call site in main (not inlined) is depth 1, so |
| 3 | note the chain f1 -> ... -> f5 reaches a 5th level: error 14 (obligation=growth). |
| 4 | note |
| 5 | om2 |
| 6 | fn f1 a ulong to ulong inline |
| 7 | ret add f2 mul a 3 1 |
| 8 | end |
| 9 | fn f2 a ulong to ulong inline |
| 10 | ret add f3 mul a 5 2 |
| 11 | end |
| 12 | fn f3 a ulong to ulong inline |
| 13 | ret add f4 mul a 7 3 |
| 14 | end |
| 15 | fn f4 a ulong to ulong inline |
| 16 | ret add f5 mul a 11 4 |
| 17 | end |
| 18 | fn f5 a ulong to ulong inline |
| 19 | ret add mul a 13 5 |
| 20 | end |
| 21 | fn id v ulong to ulong |
| 22 | ret v |
| 23 | end |
| 24 | fn main to int |
| 25 | pu f1 2 |
| 26 | pu f1 id 1000 |
| 27 | ret 0 |
| 28 | end |