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 / apps / aienos-site / om / omega-reference / vendor / examples / contract_ensures.om

13 lines · 265 bytes Raw Blame History
1note contract_ensures: a false postcondition traps 10, exit 110; the bug here is the + 2
2om2
3text before "before\n"
4fn inc x uint to uint
5requires lt x 100
6ensures eq result add x 1
7ret add x 2
8end
9fn main to int
10k = write 1 before 0 len before
11h = inc 5
12ret 0
13end