aienos.com
Source of www.aienos.com, served from my own hardware
Brought by drakestapleton
aienos.com / om / omega-reference / vendor / examples / contract_ensures.om
| 1 | note contract_ensures: a false postcondition traps 10, exit 110; the bug here is the + 2 |
| 2 | om2 |
| 3 | text before "before\n" |
| 4 | fn inc x uint to uint |
| 5 | requires lt x 100 |
| 6 | ensures eq result add x 1 |
| 7 | ret add x 2 |
| 8 | end |
| 9 | fn main to int |
| 10 | k = write 1 before 0 len before |
| 11 | h = inc 5 |
| 12 | ret 0 |
| 13 | end |