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 / tests / one_layer / generalization / corpus / specs / clamp.spec
| 1 | desc limit an unsigned 32-bit x to lo..hi: below lo gives lo, above hi gives hi, otherwise x |
| 2 | pre le lo hi |
| 3 | post and and ge res lo le res hi or eq res x or eq res lo eq res hi |
| 4 | example 12 3 9 -> 9 |
| 5 | limit needs lo <= hi; with lo > hi the result is outside lo..hi (lo when x < lo, else hi when x > hi) |
| 6 | limit unsigned 32-bit values only |
| 7 | counter 5 9 3 -> 9 |
| 8 | counter 50 9 3 -> 3 |