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