source: CIVL/examples/focus/nestedFor.cvl@ bb03188

main test-branch
Last change on this file since bb03188 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: 386 bytes
RevLine 
[01c5b2ce]1#include<assert.h>
2
3#pragma CIVL ACSL
4$input int M;
5$assume(0 < M);
6$input int N = 1;
7$input float A[M][N], B[M][N];
8
9int main() {
10 double C[M][N];
11 //@ focus I;
12 for (int i = 0; i < M; i++) {
13 //@ focus J;
14 for (int j = 0; j < N; j++) {
15 C[i][j] = A[i][j]+B[i][j];
16 }
17 }
18
19 //@ focus I J;
20 $assert($forall(int i:0..M-1;int j:0..N-1) C[i][j] == A[i][j]+B[i][j]);
21}
Note: See TracBrowser for help on using the repository browser.