source: CIVL/examples/focus/sv-benchmarks-main-c-array-industry-pattern/c/array-industry-pattern/original/array_monotonic.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: 462 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
7int __VERIFIER_nondet_int();
8int main()
9{
10 int i;
11 int a[SIZE];
12 int b[SIZE];
13 for(i = 0; i < SIZE; i = i + 2)
14 {
15 a[i] = __VERIFIER_nondet_int();
16 if(a[i] == 10)
17 b[i] = 20;
18 }
19
20 for(i = 0; i < SIZE; i = i + 2)
21 {
22 if(a[i] == 10)
23 __VERIFIER_assert(b[i] == 20);
24 }
25}
26
Note: See TracBrowser for help on using the repository browser.