interplane.Get Omega
Read in your language

omega-harness

Agent skills for operating, encoding and communicating in Omega (.om) and the AIEN repositories

Brought by drakestapleton

branch main Branches Tags History

omega-harness / examples / contracts_ok.om

15 lines · 271 bytes Raw Blame History
1note contracts_ok: requires and ensures form a function's prefix; invariant opens a loop body
2om2
3fn step x uint to uint
4requires lt x 10
5ensures eq result add x 1
6ret add x 1
7end
8fn main to int
9i = uint 0
10while lt i 3
11invariant le i 3
12i = step i
13end
14ret int sub i 3
15end