source:
CIVL/mods/dev.civl.abc/examples/contract/loopInvariant.c
| Last change on this file was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 200 bytes | |
| Line | |
|---|---|
| 1 | /** |
| 2 | * This is example 2.27 from ACSL reference 1.9. |
| 3 | */ |
| 4 | #pragma CIVL ACSL |
| 5 | int main(){ |
| 6 | int x=0; |
| 7 | int y = 10; |
| 8 | |
| 9 | /*@ loop invariant 0 <= x && x < 11; |
| 10 | @*/ |
| 11 | while(y > 0){ |
| 12 | x++; |
| 13 | y--; |
| 14 | } |
| 15 | } |
Note:
See TracBrowser
for help on using the repository browser.
