示例#1
0
void * thr2 (void * param)
{
  int cond = nondet(0,1);
  while (cond == 1) {
    c1 = h;
    c = c1;
  }
}
示例#2
0
文件: n-14.c 项目: ArtisticCoding/T2
void main()
{
    int x;

    do {
       if (nondet()) x--;
    } while (x>0);
}
示例#3
0
void traverse(PSLL_ENTRY head) {
  void* null = NULL;
  while(head != null) {
    if (nondet()) { /*bug*/
      head = head->Flink ;
    }
  }
}
示例#4
0
文件: 472a.c 项目: models-team/eba
int main(void)
{

  smp_found_config = nondet();
  native_smp_prepare_cpus();

  return 0;
}
示例#5
0
int main () {
    int (*f) ();

    f = nondet () ? &one : &two;
    invoke (f);

    return 0;
}
示例#6
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:
;
}
示例#7
0
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:
;
}
示例#8
0
void start(int x, int y)
{
  while (x>y) {
    if (nondet()>0)
      y=y+1;
    else
      x=x-1;
  }
}
示例#9
0
void main() {
  PSLL_ENTRY head;

  head = SLL_create(nondet());

  reverse_div(&head);

  SLL_destroy(head);
}
示例#10
0
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;
}
示例#11
0
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;  
}
示例#12
0
文件: loop42.c 项目: blexim/synth
/*
 * 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);
}
示例#13
0
文件: ll5.c 项目: 8l/csolve
int main(){
  int n; 
  
  n = nondet();
  
  bar(n);
  
  return 0;
}
示例#14
0
文件: svcomp34.c 项目: blexim/synth
/* 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;
}
示例#15
0
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;
    }
示例#17
0
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;
}
}
示例#18
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()) {
  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:
;
}
示例#19
0
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);
}
示例#20
0
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:
;
}
示例#21
0
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);
    }
  }
}
示例#22
0
void * thr1 (void * param)
{
  int cond = nondet(0,1);
  int h1;
  while (cond == 1) {
    if (h < 5) {
      h1 = h;
      h = h1+1;
    }
  }
}
示例#23
0
int main(void)
{

  G_ReadLen=nondet();

  while( G_ReadLen % sizeof( ULONG ) ) {
      G_ReadLen++;
  }

  return 0;
}
示例#24
0
void main() {
  PSLL_ENTRY x = SLL_create(nondet());

  print_list(x); printf_s("\n");

  filter(&x, 1);

  print_list(x);

  SLL_destroy(x);
}
示例#25
0
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:
;
}
示例#26
0
文件: join.c 项目: 8l/csolve
void main(){
  int x,y,b;
  b = nondet();
  if (b){
    x = 10;
    y = 10;
  } else {
    x = 20;
    y = 20;
  }
  assert (x == y);
}
示例#27
0
void main(void) {
	PSLL_ENTRY head, x;

	head = SLL_create(nondet());
	x = head;

	while (x != NULL) {
		x = head->Flink;
	}

	SLL_destroy(head);
}
示例#28
0
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;
}
示例#29
0
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;
}
示例#30
0
文件: pch_udc.c 项目: models-team/eba
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);
}