int main(void) 
{ int z ;
  int a ;

  {
#line 8
  z = 0;
#line 9
  if (z == 0) {

  } else {
    {
#line 9
    __blast_assert();
    }
  }
#line 10
  a = z;
#line 11
  if (a == 0) {

  } else {
    {
#line 11
    __blast_assert();
    }
  }
#line 12
  return (0);
}
}
int main(void) 
{ int i ;

  {
#line 18
  i = 0;
  {
#line 19
  while (1) {
    while_continue: /* CIL Label */ ;
#line 19
    if (i < 5) {

    } else {
#line 19
      goto while_break;
    }
#line 20
    i = i + 1;
#line 22
    if (i != 3) {

    } else {
      {
#line 22
      __blast_assert();
      }
    }
  }
  while_break: /* CIL Label */ ;
  }
#line 27
  return (0);
}
}
void *__getMemory(int size ) 
{ int tmp ;

  {
#line 17
  if (size > 0) {

  } else {
    {
#line 17
    __blast_assert();
    }
  }
  {
#line 18
  guard_malloc_counter = guard_malloc_counter + 1;
#line 19
  tmp = __VERIFIER_nondet_int();
  }
#line 19
  if (tmp) {

  } else {
#line 20
    return ((void *)0);
  }
#line 21
  return (guard_malloc_counter);
}
}
예제 #4
0
파일: main.c 프로젝트: AnnaTrost/cbmc
void list_add(struct list_head *news, struct list_head *head) {
  if(news!=((void *)0)) {
   ((news!=elem) ? (0) : __blast_assert ());
   if(__VERIFIER_nondet_int())
         elem = news;
  }
}
int main(void) 
{ struct Toplev good ;

  {
#line 20
  good.a = 1;
#line 20
  good.x.b = 2;
#line 20
  good.x.y.c = 3;
#line 21
  good.x.y.c = 4;
#line 22
  if (good.x.y.c == 4) {

  } else {
    {
#line 22
    __blast_assert();
    }
  }
#line 23
  return (0);
}
}
void g(void *pointer ) 
{ int i ;
  unsigned int __cil_tmp3 ;
  unsigned int __cil_tmp4 ;

  {
#line 37
  i = 0;
  {
#line 37
  while (1) {
    while_continue: /* CIL Label */ ;
#line 37
    if (i < 2) {

    } else {
#line 37
      goto while_break;
    }
    {
#line 38
    __cil_tmp3 = (unsigned int )pointer;
#line 38
    __cil_tmp4 = (unsigned int )pp[i];
#line 38
    if (__cil_tmp4 == __cil_tmp3) {
#line 40
      if (pstate[i] == 1) {

      } else {
        {
#line 40
        __blast_assert();
        }
      }
#line 41
      pstate[i] = 2;
    } else {

    }
    }
#line 37
    i = i + 1;
  }
  while_break: /* CIL Label */ ;
  }
#line 44
  return;
}
}
int main(void) 
{ union A x ;

  {
  x.list = 0;
  if (x.l2 == 0) {

  } else {
    {
    __blast_assert();
    }
  }
  return (0);
}
}
int main(void) 
{ int z ;
  int a ;

  {
  z = 0;
  if (z == 0) {

  } else {
    {
    __blast_assert();
    }
  }
  a = z;
  if (a == 0) {

  } else {
    {
    __blast_assert();
    }
  }
  return (0);
}
}
void check_final_state(void) 
{ 

  {
#line 26
  if (ldv_mutex == 1) {

  } else {
    {
#line 26
    __blast_assert();
    }
  }
#line 27
  return;
}
}
ssize_t l_read(int fd , char *cbuf , size_t count ) 
{ int tmp ;

  {
  if (globalState == 1) {

  } else {
    {
    __blast_assert();
    }
  }
  {
  tmp = read(fd, cbuf, count);
  }
  return ((ssize_t )tmp);
}
}
예제 #11
0
void check_error(int b ) 
{ 

  {
#line 11
  if (b) {

  } else {
    {
#line 11
    __blast_assert();
    }
  }
#line 12
  return;
}
}
int main(void) 
{ Stuff good ;
  Stuff bad ;

  {
  good.a = 1;
  good.b = 2;
  bad = good;
  if (bad.b == 2) {

  } else {
    {
    __blast_assert();
    }
  }
  return (0);
}
}
int main(void)
{   union A x ;

    {
#line 18
        x.list = 0;
#line 22
        if (x.list == 0) {

        } else {
            {
#line 22
                __blast_assert();
            }
        }
#line 24
        return (0);
    }
}
void mutex_lock(void) 
{ 

  {
#line 14
  if (ldv_mutex == 1) {

  } else {
    {
#line 14
    __blast_assert();
    }
  }
#line 15
  ldv_mutex = 2;
#line 16
  return;
}
}
void mutex_unlock(void) 
{ 

  {
#line 20
  if (ldv_mutex == 2) {

  } else {
    {
#line 20
    __blast_assert();
    }
  }
#line 21
  ldv_mutex = 1;
#line 22
  return;
}
}
예제 #16
0
int main(void) 
{ struct Innermost im ;
  struct Inner inner ;
  struct Toplev good ;
  struct Innermost *__cil_tmp4 ;
  struct Innermost *__cil_tmp5 ;
  int __cil_tmp6 ;

  {
#line 19
  im.c = 3;
#line 20
  inner.b = 2;
#line 20
  inner.y = & im;
#line 21
  good.a = 1;
#line 21
  good.x = & inner;
#line 22
  __cil_tmp4 = (good.x)->y;
#line 22
  __cil_tmp4->c = 4;
  {
#line 23
  __cil_tmp5 = (good.x)->y;
#line 23
  __cil_tmp6 = __cil_tmp5->c;
#line 23
  if (__cil_tmp6 == 4) {

  } else {
    {
#line 23
    __blast_assert();
    }
  }
  }
#line 24
  return (0);
}
}
int main(void) 
{ union X var ;
  unsigned int __cil_tmp2 ;

  {
  var.z = 0x1.4p+4;
  var.y = 10;
  {
  __cil_tmp2 = (unsigned int )var.y;
  if (__cil_tmp2 == 10U) {

  } else {
    {
    __blast_assert();
    }
  }
  }
  return (0);
}
}
void foo(int a ) 
{ unsigned int __cil_tmp2 ;

  {
  {
#line 18
  __cil_tmp2 = (unsigned int )globalSize;
#line 18
  if (4U == __cil_tmp2) {

  } else {
    {
#line 18
    __blast_assert();
    }
  }
  }
#line 19
  return;
}
}
예제 #19
0
ssize_t l_read(int fd , char *cbuf , size_t count ) 
{ int tmp ;

  {
#line 21
  if (globalState == 1) {

  } else {
    {
#line 21
    __blast_assert();
    }
  }
  {
#line 22
  tmp = read(fd, cbuf, count);
  }
#line 22
  return ((ssize_t )tmp);
}
}
int main(void) 
{ struct l_struct_2E_X llvm_cbe_var ;
  double *__cil_tmp2 ;
  unsigned int *__cil_tmp3 ;
  double *__cil_tmp4 ;
  unsigned int *__cil_tmp5 ;
  unsigned int __cil_tmp6 ;

  {
#line 32
  llvm_cbe_var.field0 = 0x1.4p+4;
#line 33
  __cil_tmp2 = & llvm_cbe_var.field0;
#line 33
  __cil_tmp3 = (unsigned int *)__cil_tmp2;
#line 33
  *__cil_tmp3 = 10U;
  {
#line 34
  __cil_tmp4 = & llvm_cbe_var.field0;
#line 34
  __cil_tmp5 = (unsigned int *)__cil_tmp4;
#line 34
  __cil_tmp6 = *__cil_tmp5;
#line 34
  if (__cil_tmp6 == 10U) {

  } else {
    {
#line 34
    __blast_assert();
    }
  }
  }
#line 36
  return (0);
}
}
void check_final_state(void)
{
 ((ldv_mutex == 1) ? 0 : __blast_assert());
}
void mutex_unlock(void)
{
 ((ldv_mutex == 2) ? 0 : __blast_assert());
 ldv_mutex = 1;
}
void mutex_lock(void)
{
  ((ldv_mutex == 1) ? 0 : __blast_assert());
  ldv_mutex = 2;
}