source: CIVL/examples/languageFeatures/quantifiers.cvl@ 90dd7d7

1.23 2.0 main test-branch
Last change on this file since 90dd7d7 was 7a41dce, checked in by Tim Zirkel <zirkeltk@…>, 12 years ago

Added BoundVariableExpression and implementation. Changed handling of quantifiers to no longer add anything to the scope. Added test file for quantifiers.

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

  • Property mode set to 100644
File size: 341 bytes
Line 
1#include<civlc.h>
2$input double b[10];
3
4void main() {
5 int a[5];
6
7 for (int i = 0; i < 5; i++) {
8 a[i] = i;
9 }
10 $assert $forall {int i | i >= 0 && i < 5} a[i] >= 0;
11 $assert $exists {int k | k >= 0 && k < 5} a[k] > 3;
12 $assume $forall {int j | j >= 0 && j < 10} b[j] >= 2;
13 $assert $forall {int m | m >= 3 && m <= 5} b[m] > 1;
14}
Note: See TracBrowser for help on using the repository browser.