source:
CIVL/examples/focus/simpleFor.cvl
| Last change on this file was 6d5b8a3, checked in by , 8 months ago | |
|---|---|
|
|
| File size: 247 bytes | |
| Rev | Line | |
|---|---|---|
| [01c5b2ce] | 1 | #pragma CIVL ACSL |
| 2 | $input int N; | |
| 3 | $assume(0 < N); | |
| 4 | int a[N]; | |
| 5 | ||
| 6 | int main() { | |
| [6d5b8a3] | 7 | /*@ loop assigns a[0..N-1]; |
| 8 | @ focus F | a[F]; | |
| [01c5b2ce] | 9 | @*/ |
| 10 | for (int i = 0; i < N; i++) { | |
| [6d5b8a3] | 11 | a[i] = 0; |
| [01c5b2ce] | 12 | } |
| [f7b746f] | 13 | |
| [01c5b2ce] | 14 | |
| [6d5b8a3] | 15 | //@ focus F; |
| 16 | $assert($forall(int i:0..N-1) a[i] == 0); | |
| [01c5b2ce] | 17 | } |
Note:
See TracBrowser
for help on using the repository browser.
