source:
CIVL/examples/arithmetic/multiplicationInLoopCondition.cvl
| Last change on this file was b689afd, checked in by , 4 weeks ago | |
|---|---|
|
|
| File size: 276 bytes | |
| Rev | Line | |
|---|---|---|
| [289a368] | 1 | $input int N; |
| 2 | $input int M; | |
| [3ff27cf] | 3 | $assume(N > 0 && N < 3); |
| 4 | $assume(M > 0 && M < 3); | |
| [289a368] | 5 | |
| 6 | void main() { | |
| 7 | int k = M*N; | |
| 8 | int a[k]; | |
| 9 | ||
| 10 | for (int i = 0; i < k; i++) { | |
| 11 | a[i] = i; | |
| [b4371ee] | 12 | if(i == 35) // the upper bound of i should be at least 33 to trigger the exception. |
| [289a368] | 13 | break; |
| 14 | } | |
| 15 | } |
Note:
See TracBrowser
for help on using the repository browser.
