main
test-branch
| Line | |
|---|
| 1 | void main() {
|
|---|
| 2 | int a[5];
|
|---|
| 3 | for (int i = 0; i < 5; i++) {
|
|---|
| 4 | a[i] = i;
|
|---|
| 5 | }
|
|---|
| 6 | $assert(!!!$exists (int k:0..4) a[k]<0);
|
|---|
| 7 | $assert($exists (int k:0..4) a[k]==2);
|
|---|
| 8 | $assert(3!=5 && $exists (int k:0..4) a[k]==2);
|
|---|
| 9 | $assert($exists (int i,j) a[i]==2 && a[j]==3); // OK
|
|---|
| 10 | $assert($exists (int i:0..4; int j:0..4) a[i]==2 && a[j]==3); // OK
|
|---|
| 11 | // note the following syntax is not supported. a little non-intuitive:
|
|---|
| 12 | //$assert($exists (int i,j:0..4) a[i]==2 && a[j]==3);
|
|---|
| 13 | // this is also "not yet implemented":
|
|---|
| 14 | //$assert($exists (int i,j:($domain){0..4,0..4}) a[i]==2 && a[j]==3);
|
|---|
| 15 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.