コード例 #1
0
ファイル: confuse_cl5.c プロジェクト: hbgit/LTGit
int main(){
  int x=0;
  int y=0;
  int z=0;
  int w=0;
    
  //ERROR  -----> {w>=0 && NONDET==0 && x==0 && y==0 && 10*w==z} 
  //ERROR  -----> {w>=0 && NONDET==0 && x==0 && y==0 && 10*w==z}  
  //wh -----> {z>=0 && x==0 && y==0 && 10*w==z}
  //wh -----> {z>=0 && x==0 && y==0 && 10*w==z}  
  
  //
  __ESBMC_assume(w>=0 && __VERIFIER_nondet_int()==0 && x==0 && y==0 && 10*w==z);
  __ESBMC_assume(z>=0 && x==0 && y==0 && 10*w==z);

  while ( __VERIFIER_nondet_int() ){
    if ( __VERIFIER_nondet_int() ) {
      x++; y = y+100;
    } else if  ( __VERIFIER_nondet_int() ) {
      if( x >= 4)
	{ x=x+1; y=y+1;}
    } else if  ( y >10*w)
      if (z>=100*x )
      y = -y;
    w=w+1; 
    z=z+10;
  }
  if ( x >=4 )
    assert(y>2);
}
コード例 #2
0
ファイル: main.c プロジェクト: ssvlab/esbmc-gpu
void thr() {
  __ESBMC_assume(g>0);
  __ESBMC_assume(g1==0);
  while (g1 < g) {
    g1 = g1 + 1;
  }
}
コード例 #3
0
ファイル: main.c プロジェクト: ssvlab/esbmc-gpu
int func(){
  char *memoryArea = malloc(10); //return_value_malloc$1
  __ESBMC_assume(memoryArea);
  char *newArea = malloc(10); //return_value_malloc$2
  __ESBMC_assume(newArea);
  memoryArea = newArea; 
  free(memoryArea);
}
コード例 #4
0
ファイル: main.c プロジェクト: ssvlab/esbmc-gpu
int main()
{
  int *p, *q;
  
  q=p=malloc(sizeof(int));
  __ESBMC_assume(p);
  
  *p=2;

  p=malloc(sizeof(int));
  __ESBMC_assume(p);
  
  *p=3;
  
  assert(*q==2);
  assert(*p==3);
}
コード例 #5
0
ファイル: main.c プロジェクト: ssvlab/esbmc-gpu
main()
{
  char string_A[MAX], string_B[MAX];
  int i, j, nc_A, nc_B, achou=0;
  
  
  for(i=0; i<MAX; i++)
    string_A[i]=nondet_char();    
  __ESBMC_assume(string_A[MAX-1]=='\0');

  for(i=0; i<MAX; i++)
    string_B[i]=nondet_char();    
  __ESBMC_assume(string_B[MAX-1]=='\0');

  // captura o número de caracteres de da string A
  nc_A = 0;
  while(string_A[nc_A]!='\0')
    nc_A++;
  // captura o número de caracteres de da string B
  nc_B = 0;
  while(string_B[nc_B]!='\0')
    nc_B++;

  __ESBMC_assume(nc_B >= nc_A);
  
  
  i=j=0;
  while((i<nc_A) && (j<nc_B))
  {
    if(string_A[i] == string_B[j]) 
    {
       i++;
       j++;
    }   
    else
    {
       i = i-j+1;
       j = 0;
    }   
  } 
  achou = (j>nc_B-1);
  
  assert(achou == 0 || achou == 1);

}
コード例 #6
0
ファイル: bluetooth_driver.c プロジェクト: esbmc/esbmc
void* BCSP_PnpStop(void* arg)
{
  DEVICE_EXTENSION *e;
  e = (DEVICE_EXTENSION *) arg; 

  e->stoppingFlag = TRUE;
  BCSP_IoDecrement(e);
  __ESBMC_assume(e->stoppingEvent);
  //release allocated resource
  stopped = TRUE;
}
コード例 #7
0
ファイル: confuse.c プロジェクト: hbgit/LTGit
int main(){
  int x=0;
  int y=0;
  int z=0;
  int w=0;
    
  __ESBMC_assume(w>=x && x>=0 && __VERIFIER_nondet_int()==0 && 100*x==y && 10*w==z);  
  
  if ( x >=4 )
    assert(y>2);
}
コード例 #8
0
ファイル: main.c プロジェクト: ssvlab/esbmc-gpu
int main()
{
  int *p=malloc(sizeof(int));
  __ESBMC_assume(p);
  int *q=p;
  int i;
  
  if(i==4711) free(q);

  // should fail if i==4711
  *p=1;
}
コード例 #9
0
ファイル: main.c プロジェクト: ssvlab/esbmc-gpu
int main()
{
  item *curr, *head;

  head = NULL;

  curr = (item *)malloc(sizeof(item));
  __ESBMC_assume(curr);
  curr->val = 1;
  curr->next  = head;
  head = curr;

  curr = (item *)malloc(sizeof(item));
  __ESBMC_assume(curr);
  curr->val = 2;
  curr->next  = head;
  head = curr;

  assert(head->val==1);

}
コード例 #10
0
ファイル: main.c プロジェクト: ssvlab/esbmc-gpu
int main(void) {
  item *curr, *head, *ret;
  int i;

  head = NULL;

  curr = (item *)malloc(sizeof(item));
  __ESBMC_assume(curr);
  curr->next  = head;

  while(curr) {
    curr = curr->next;
  }

	return 0;
}
コード例 #11
0
ファイル: main.c プロジェクト: ssvlab/esbmc-gpu
int main()
{
  int my_i, iabs;
  double my_d, dabs;
  
  assert(abs(-1)==1);
  assert(abs(1)==1);
  assert(fabs(1.0)==1);
  assert(fabs(-1.0)==1);
  
  iabs=(my_i<0)?-my_i:my_i;
  assert(abs(my_i)==iabs);

  __ESBMC_assume(!isnan(my_d));
 
  dabs=(my_d<0)?-my_d:my_d;
  assert(fabs(my_d)==dabs);
}
コード例 #12
0
ファイル: wcett.c プロジェクト: lc19890306/assembler
int main() {
  initialize();
  Path<int> p_1(5), p_2(5), p_3(5);

  createPath(p_1);
  createPath(p_2);
  createPath(p_3);

  float res_0, res_1, res_2, res_3;
  res_0 = weight(p_1);
  res_1 = weight(p_2);
  res_2 = weight(p_1+p_3);
  res_3 = weight(p_2+p_3);

  __ESBMC_assume(res_0 >= res_1);
  __ESBMC_assert(res_2 >= res_3, "Right-isotonicity violated!");


  return 0;
}
コード例 #13
0
ファイル: main.c プロジェクト: ssvlab/esbmc-gpu
main()
{
  int flag;
  int *ref = NULL;
  int x = 0;
  st1.x = 0;

  __ESBMC_assume( flag == 1 );

  if( flag )
    ref = &st1.x;
  else
    ref = &x;

  f1(ref);

  //f1(&st1.x);  /* uncomment this - and everithing works OK. */

  assert( st1.x == 1234 );  /* <-- fails, this is the problem. */
  //assert( ref == &st1.x );  /* this one is OK. */
  //assert( st1.x == 0 );     /* this one fails - OK. */
  //assert( x == 12345 );     /* fails - OK */
}
コード例 #14
0
ファイル: ori_confuse_cl2.c プロジェクト: hbgit/LTGit
int main(){
  int x=0;
  int y=0;
  int z=0;
  int w=0;
  
  __ESBMC_assume(y==0 && x==0 && z==10*w && w>=0);

  while ( __VERIFIER_nondet_int() ){
    if ( __VERIFIER_nondet_int() ) {
      x++; y = y+100;
    } else if  ( __VERIFIER_nondet_int() ) {
      if( x >= 4)
	{ x=x+1; y=y+1;}
    } else if  ( y >10*w)
      if (z>=100*x )
      y = -y;
    w=w+1; 
    z=z+10;
  }
  if ( x >=4 )
    assert(y>2);
}
コード例 #15
0
ファイル: confuse.c プロジェクト: hbgit/LTGit
int main(){
  int x=0;
  int y=0;
  int z=0;
  int w=0;
  //pc(main-1-10): [y-x>=0,x-w=<0,y-100*x=<0]
  __ESBMC_assume( y-x>=0 && x-w<=0 && y-100*x<=0 ); //bound = 100

  while ( __VERIFIER_nondet_int() ){
    if ( __VERIFIER_nondet_int() ) {
      x++; y = y+100;
    } else if  ( __VERIFIER_nondet_int() ) {
      if( x >= 4)
	{ x=x+1; y=y+1;}
    } else if  ( y >10*w)
      if (z>=100*x )
      y = -y;
    w=w+1; 
    z=z+10;
  }
    
  if ( x >=4 )
    assert(y>2);
}
コード例 #16
0
ファイル: inv_paper_ex_pagai.c プロジェクト: hbgit/depthk
void main(){
	int x = 0 ;
	int t = 0 ;
	int phase = 0 ;

/* reachable */
/* invariant:
	-3*phase-t+2*x = 0
	100-phase-t >= 0
	1-phase >= 0
	-phase+t >= 0
	phase >= 0
	*/
	__ESBMC_assume( -3*phase-t+2*x == 0 );
	__ESBMC_assume( 100-phase-t >= 0 );
	__ESBMC_assume( 1-phase >= 0 );
	__ESBMC_assume( -phase+t >= 0 );
	__ESBMC_assume( phase >= 0 );	
	while ( t < 100) {
		if( phase == 0 )
			// safe
			x = x + 2;
		if( phase == 1 )
			// safe
			x = x - 1;
			// safe
			phase = 1 - phase;
			// safe
			t++;
	}

	/* invariant:
	-50+x = 0
	*/
	__ESBMC_assume( -50+x == 0 );	
	assert( x <= 100 );	
}
コード例 #17
0
ファイル: main.c プロジェクト: ssvlab/esbmc-gpu
void main(){
  func();
  char *test = malloc(20); //return_value_malloc$1
  __ESBMC_assume(test);
  free(test);
}
コード例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, 0.0, 1.0},
{-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0}};


  for(i=0; i<MAXn; i++) {
    x[i] = nondet_bool();
  }

  //s(1-x)
  for(i=0; i<MAXn; i++) {
    softcost += s[i]*(1-x[i]);
  }

  //Ex
  aux = 0;
  for(i=0; i<MAXe; i++) {
    for(j=0; j<MAXn; j++) {
      aux += E[i][j]*x[j];
    }
    tmp[i] = aux;
    aux = 0;
  }

  //c*|EX|
  for(i=0; i<MAXe; i++) {
    comcost += c[i]*__ESBMC_abs(tmp[i]);
  }

  __ESBMC_assume((softcost+comcost) <= 20);

  //função objetivo
  int fobj = 0;
  for (i = 0; i<MAXn; i++) {
	  fobj += x[i] * h[i];
  }

  __ESBMC_assume(fobj <= valordeh);

  assert(fobj < valordeh);
  return 0;
}