コード例 #1
0
void main(void) {
        int ldv_s_misc_fops_file_operations = 0;
 my_init();
        while(__VERIFIER_nondet_int()) {

                switch(__VERIFIER_nondet_int()) {

                        case 0: {
                                if(ldv_s_misc_fops_file_operations==0) {
                                misc_open();
                                ldv_s_misc_fops_file_operations++;
                                }
                        }
   break;

                        case 1: {
                                if(ldv_s_misc_fops_file_operations==1) {
                                misc_read();
                                ldv_s_misc_fops_file_operations++;
                                }
                        }
                        break;

                        case 2: {
                                if(ldv_s_misc_fops_file_operations==2) {
                                misc_llseek();
                                ldv_s_misc_fops_file_operations++;
                                }
                        }
                        break;

                        case 3: {
                                if(ldv_s_misc_fops_file_operations==3) {
                                misc_release();
                                ldv_s_misc_fops_file_operations=0;
                                }
                        }
                        break;

                        default: break;
                }
        }
        check_final_state();
 return;
}
int main(void) 
{ int ldv_s_misc_fops_file_operations ;
  int tmp ;
  int tmp___0 ;

  {
  {
#line 72
  ldv_s_misc_fops_file_operations = 0;
#line 73
  my_init();
  }
  {
#line 74
  while (1) {
    while_0_continue: /* CIL Label */ ;
    {
#line 74
    tmp___0 = __VERIFIER_nondet_int();
    }
#line 74
    if (tmp___0) {

    } else {
      goto while_0_break;
    }
    {
#line 76
    tmp = __VERIFIER_nondet_int();
    }
#line 78
    if (tmp == 0) {
      goto switch_1_0;
    } else {
#line 86
      if (tmp == 1) {
        goto switch_1_1;
      } else {
#line 94
        if (tmp == 2) {
          goto switch_1_2;
        } else {
#line 102
          if (tmp == 3) {
            goto switch_1_3;
          } else {
            {
            goto switch_1_default;
#line 76
            if (0) {
              switch_1_0: /* CIL Label */ 
#line 79
              if (ldv_s_misc_fops_file_operations == 0) {
                {
#line 80
                misc_open();
#line 81
                ldv_s_misc_fops_file_operations = ldv_s_misc_fops_file_operations + 1;
                }
              } else {

              }
              goto switch_1_break;
              switch_1_1: /* CIL Label */ 
#line 87
              if (ldv_s_misc_fops_file_operations == 1) {
                {
#line 88
                misc_read();
#line 89
                ldv_s_misc_fops_file_operations = ldv_s_misc_fops_file_operations + 1;
                }
              } else {

              }
              goto switch_1_break;
              switch_1_2: /* CIL Label */ 
#line 95
              if (ldv_s_misc_fops_file_operations == 2) {
                {
#line 96
                misc_llseek();
#line 97
                ldv_s_misc_fops_file_operations = ldv_s_misc_fops_file_operations + 1;
                }
              } else {

              }
              goto switch_1_break;
              switch_1_3: /* CIL Label */ 
#line 103
              if (ldv_s_misc_fops_file_operations == 3) {
                {
#line 104
                misc_release();
#line 105
                ldv_s_misc_fops_file_operations = 0;
                }
              } else {

              }
              goto switch_1_break;
              switch_1_default: /* CIL Label */ ;
              goto switch_1_break;
            } else {
              switch_1_break: /* CIL Label */ ;
            }
            }
          }
        }
      }
    }
  }
  while_0_break: /* CIL Label */ ;
  }
  {
#line 113
  check_final_state();
  }
#line 114
  return 0;
}
}