source: CIVL/examples/arithmetic/mean.cvl@ 6a4e2e0

1.23 2.0 main test-branch
Last change on this file since 6a4e2e0 was 8fa5a7b, checked in by Tim Zirkel <zirkeltk@…>, 13 years ago

moved untested/unused examples to experimental folder

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

  • Property mode set to 100644
File size: 292 bytes
Line 
1$input int N_BOUND;
2#pragma TASS input {N>0 && N<=N_BOUND}
3$input int N;
4#pragma TASS input
5double a[N];
6#pragma TASS output
7double s;
8
9void main() {
10 int i=0;
11 double x=0.0;
12
13 $assume
14#pragma TASS joint invariant LOOP true;
15 while (i < N) {
16 x = x + a[i];
17 i = i + 1;
18 }
19 s = x/N;
20}
21
Note: See TracBrowser for help on using the repository browser.