source: CIVL/examples/experimental/sequential/test.c@ a6d2043

1.23 2.0 main test-branch
Last change on this file since a6d2043 was 631a953, checked in by Ziqing Luo <ziqing@…>, 10 years ago

add one example for contract system development

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

  • Property mode set to 100644
File size: 361 bytes
Line 
1#include <civlc.cvh>
2
3int dummy() {
4 return 1;
5}
6
7int incr(int *x)
8 $requires {*x == 0}
9{
10 int ret = dummy();
11 return ret;
12}
13
14int main() {
15 /* This is a dummy main function, this main function will be
16 ignored, when CIVL is in the Contract System Mode. Functions have
17 to be called in order to not be pruned. */
18 incr((void *)-1);
19 return 0;
20}
Note: See TracBrowser for help on using the repository browser.