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-rec-direct-plain.om

16 lines · 463 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note Control for inline-rec-direct.om with every inline removed: accepted, runs (section 4 line 97).
3note Contract section 4 line 94: an inline function must not be recursive (error 9). f calls itself.
4note Without inline (inline-rec-direct-plain.om) program-mode recursion is allowed (OMEGESE 9.2) and
5note prints 55.
6om2
7fn f n ulong to ulong
8if eq n 0
9ret 0
10end
11ret add n f sub n 1
12end
13fn main to int
14pu f 10
15ret 0
16end