void * thr2 (void * param) { int cond = nondet(0,1); while (cond == 1) { c1 = h; c = c1; } }
void main() { int x; do { if (nondet()) x--; } while (x>0); }
void traverse(PSLL_ENTRY head) { void* null = NULL; while(head != null) { if (nondet()) { /*bug*/ head = head->Flink ; } } }
int main(void) { smp_found_config = nondet(); native_smp_prepare_cpus(); return 0; }
int main () { int (*f) (); f = nondet () ? &one : &two; invoke (f); return 0; }
int main() { int v1 = nondet(); int v2 = nondet(); int v3 = nondet(); goto loc_4; loc_4: if (nondet_bool()) { goto loc_3; } goto end; loc_CP_0: if (nondet_bool()) { if (!( 1+v1+v3 <= -1+2*v2 )) goto end; v2 = -1+v2; goto loc_1; } if (nondet_bool()) { if (!( 1+2*v2 <= v1+v3 )) goto end; v2 = 1+v2; goto loc_2; } goto end; loc_1: if (nondet_bool()) { goto loc_CP_0; } goto end; loc_2: if (nondet_bool()) { goto loc_CP_0; } goto end; loc_3: if (nondet_bool()) { if (!( 0 <= v3 )) goto end; if (!( v3 <= 3 )) goto end; if (!( 0 <= v2 )) goto end; if (!( v2 <= 3 )) goto end; v1 = 2; goto loc_CP_0; } goto end; end: ; }
int main() { int v1 = nondet(); int v2 = nondet(); goto loc_4; loc_4: if (nondet_bool()) { goto loc_3; } goto end; loc_CP_0: if (nondet_bool()) { if (!( 1 <= v1 )) goto end; if (!( v2 <= 100 )) goto end; v2 = 11+v2; v1 = 1+v1; goto loc_1; } if (nondet_bool()) { if (!( 1 <= v1 )) goto end; if (!( 101 <= v2 )) goto end; v2 = -10+v2; v1 = -1+v1; goto loc_2; } goto end; loc_1: if (nondet_bool()) { goto loc_CP_0; } goto end; loc_2: if (nondet_bool()) { goto loc_CP_0; } goto end; loc_3: if (nondet_bool()) { v2 = nondet(); v1 = 1; goto loc_CP_0; } goto end; end: ; }
void start(int x, int y) { while (x>y) { if (nondet()>0) y=y+1; else x=x-1; } }
void main() { PSLL_ENTRY head; head = SLL_create(nondet()); reverse_div(&head); SLL_destroy(head); }
void main(){ int i, p, q; int n; n = nondet(); q = nondet(); p = q; i = 0; for(; i < n; i++){ p++; } csolve_assert(p == q+i); return; }
int body() { dobreak = nondet(); while(1) { if (dobreak > 0) break; A = 1; A = 0; n = nondet(); while(1) { if (!(n>0)) break; /* ((n___old2 > loc_n)&&(loc_n>=0)) */ n--; } R = 1; R=0; dobreak = nondet(); } while(1) { dummy=dummy; } L_return: return 0; }
/* * Danger invariant: * x_0 = y_0 = nondet_0 = 0 * D(nondet0, x, y) = x == y * R(nondet0, x, y) = -x * nondet(x, y) = 1 */ int main(void) { unsigned int x, y; x = 0; y = 1; while (x < (1000003 & WORDMASK)) { if (nondet()) { x++; } if (nondet()) { y++; } } assert(x == y); }
int main(){ int n; n = nondet(); bar(n); return 0; }
/* Returns some null-terminated string. */ char *__VERIFIER_nondet_String(void) { int length = nondet(); if (length < 1) { length = 1; } char *nondetString = (char *) malloc(length * sizeof(char)); nondetString[length - 1] = '\0'; return nondetString; }
int body() { dobreak = nondet(); while(1) { if (dobreak > 0) break; A = 1; A = 0; n = nondet(); assume(n>0); while(1) { if (!(n>0)) break; // should loop forever here n = n + 0; } R = 1; R = 0; dobreak = nondet(); } while(1) { dummy=dummy; } L_return: return 0; }
// Setweight function allow only subset to out! bitvector setWeight( bitvector node) { bitvector edge; edge = 0b0; for(unsigned int k=0; k<M; k++){ if ((node & (0b1 << k)) == (0b1 << k)) { edge = (edge | (nondet() << k)); } } return edge; }
void rank2(int m) { int x=m; int y=m; while(x>=2) { x--; y = y+x; while(y>=x && nondet()>0) y--; x--; y = y-x; } }
int main() { int v1 = nondet(); int v2 = nondet(); int v3 = nondet(); goto loc_4; loc_4: if (nondet_bool()) { goto loc_3; } goto end; loc_CP_0: if (nondet_bool()) { v1 = v1+v2; v2 = -2+v2; goto loc_1; } if (nondet_bool()) { v1 = v1+v3; v2 = 1+v2; v3 = -2+v3; goto loc_2; } goto end; loc_1: if (nondet_bool()) { goto loc_CP_0; } goto end; loc_2: if (nondet_bool()) { goto loc_CP_0; } goto end; loc_3: if (nondet_bool()) { if (!( 0 <= v1 )) goto end; goto loc_CP_0; } goto end; end: ; }
void main() { PSLL_ENTRY head, tail; tail = (PSLL_ENTRY)malloc(sizeof(SLL_ENTRY)); head = SLL_create_seg(nondet(), tail); tail->Flink = head; CSLL_remove(head, 42); CSLL_destroy(head); }
int main() { int v1 = nondet(); int v2 = nondet(); goto loc_2; loc_2: if (nondet_bool()) { goto loc_0; } goto end; loc_0: if (nondet_bool()) { v1 = nondet(); v2 = v1; goto loc_1; } goto end; loc_1: end: ; }
void SLL_destroy_seg(PSLL_ENTRY x, PSLL_ENTRY y) { PSLL_ENTRY t; while(x != y) { t = x; if (nondet()) { /*bug*/ x = x->Flink; free(t); } } }
void * thr1 (void * param) { int cond = nondet(0,1); int h1; while (cond == 1) { if (h < 5) { h1 = h; h = h1+1; } } }
int main(void) { G_ReadLen=nondet(); while( G_ReadLen % sizeof( ULONG ) ) { G_ReadLen++; } return 0; }
void main() { PSLL_ENTRY x = SLL_create(nondet()); print_list(x); printf_s("\n"); filter(&x, 1); print_list(x); SLL_destroy(x); }
int main() { int v1 = nondet(); int v2 = nondet(); int v3 = nondet(); goto loc_4; loc_4: if (nondet_bool()) { goto loc_0; } goto end; loc_CP_1: if (nondet_bool()) { if (!( 1+v1 <= v2 )) goto end; goto loc_CP_2; } goto end; loc_CP_2: if (nondet_bool()) { if (!( v3 <= v2 )) goto end; v1 = 1+v1; goto loc_CP_1; } if (nondet_bool()) { if (!( 1+v2 <= v3 )) goto end; v2 = 1+v2; goto loc_3; } goto end; loc_0: if (nondet_bool()) { goto loc_CP_1; } goto end; loc_3: if (nondet_bool()) { goto loc_CP_2; } goto end; end: ; }
void main(){ int x,y,b; b = nondet(); if (b){ x = 10; y = 10; } else { x = 20; y = 20; } assert (x == y); }
void main(void) { PSLL_ENTRY head, x; head = SLL_create(nondet()); x = head; while (x != NULL) { x = head->Flink; } SLL_destroy(head); }
void reverse(PSLL_ENTRY *l) { PSLL_ENTRY c = *l, r = NULL; while(c != NULL) { PSLL_ENTRY t; t = c; if (nondet()) c = c->Flink; t->Flink = r; r = t; } *l = r; }
int main () { int *x = (int *) malloc (sizeof (int)); *x = nondet (); int *y = (int *) malloc (sizeof (int)); *y = nondet (); int **p = (int **) malloc (sizeof (int *)); *p = x; int **q = (int **) malloc (sizeof (int *)); *q = y; if (nondet ()) { p = q; } csolve_assert (**p == **q); return 0; }
void pch_udc_svc_cfg_interrupt(struct pch_udc_dev *dev) { int i; spin_lock(&dev->lock); for (i = 0; i < 8; i++) { nondet(); } spin_lock(&dev->lock); }