source: CIVL/examples/focus/sv-benchmarks-main-c-array-industry-pattern/c/array-industry-pattern/original/array_range_init.c

main
Last change on this file 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: 403 bytes
Line 
1extern void abort(void);
2#include <assert.h>
3void reach_error() { assert(0); }
4void __VERIFIER_assert(int cond) { if(!(cond)) { ERROR: {reach_error();abort();} } }
5#define SIZE 100000
6
7signed int a[SIZE];
8
9int main()
10{
11 int i;
12 for(i = 0; i < SIZE; i++)
13 {
14 if(i>=0 && i<=10000)
15 a[i] = 10;
16 else
17 a[i] = 0;
18 }
19
20
21 for(i = 0; i < SIZE; i++)
22 {
23 __VERIFIER_assert(a[i] == 10);
24
25 }
26
27 return 0;
28}
29
30
Note: See TracBrowser for help on using the repository browser.