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 / tools / gen / abstract / fixtures / abs-fixture.rec

33 lines · 1155 bytes Raw Blame History
1gen-record 1
2id abs-0123456789abcdef
3kind abstraction
4split corpus
5family gs1-2ea72f444887b374 gs1-ba9ca1a3efe1e1c9
6entry clampv
7params u32 u32 u32
8ret u32
9signature fn clampv x uint lo uint hi uint to uint
10desc Clamp x into lo..hi: lo when x < lo, hi when x > hi, else x.
11receipt 29abb914a9d61bcaf98faf8e387d29b83dec42b310b0fe1857b9ce465cc28b2d
12validity unverified
13ancestry fx_a ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb
14ancestry fx_b 3e23e8160039594a33894f6564e1b1348bbd7a0088d42c4acb73eeaed59c009d
15source tools/gen/abstract/fixtures/source.txt bac2644401bdcf656e47f30de59c684ff80d9fde59a6248da97fb448d5ce8776
16pre STATED+TESTED le lo hi
17post STATED+TESTED and ge res lo le res hi
18example 12 3 9 -> 9
19limit Needs lo <= hi; with lo > hi it returns lo or hi without ordering them.
20counter 5 9 3 -> 9
21fingerprint 0123456789abcdef01627ca9fbac32f5c8530fb1903cc4db02258717921a4881
22differs fx_a ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb
23differs fx_b 3e23e8160039594a33894f6564e1b1348bbd7a0088d42c4acb73eeaed59c009d
24body
25fn clampv x uint lo uint hi uint to uint
26if lt x lo
27ret lo
28end
29if gt x hi
30ret hi
31end
32ret x
33end