source: CIVL/examples/languageFeatures/quantifiers2.cvl

main
Last change on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 578 bytes
RevLine 
[b9bfd33f]1void 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.