source: CIVL/examples/contracts/extendQuant.c@ 9a12c0f

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since 9a12c0f was bfafee3, checked in by Manchun Zheng <zmanchun@…>, 10 years ago

added more tests

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

  • Property mode set to 100644
File size: 294 bytes
Line 
1//#include<mpi.h>
2#include<civlc.cvh>
3
4/*@
5 @ ensures \result == 2*x;
6 @*/
7$atomic_f int g(int x){
8 return 2*x;
9}
10
11/*@
12 @ requires x==0 && y==3;
13 @ ensures \result==\sum(x,y, \lambda int i; 2*i);
14 @*/
15int f(int x, int y){
16 int r=0;
17
18 for(int i=x; i<=y; i++)
19 r+=i*2;
20 return r;
21}
Note: See TracBrowser for help on using the repository browser.