Beispiel #1
0
void main(void) 
{ int main_status ;
  int main_irp ;
  int main_irp_choice ;
  int main_devobj ;
  int main_tmp_ndt_1 ;
  int main_tmp_ndt_2 ;
  int main_tmp_ndt_3 ;
  int main_tmp_ndt_4 ;
  int main_tmp_ndt_5 ;
  int TRACER_returning ;

  {
  TRACER_returning = 0;
  safety = 0;
  routine = 0;
  pirp = main_irp;
  _BLAST_init();
  if (main_status >= 0) {
    myStatus = 0;
    if ((main_irp_choice >= 0) && (main_irp_choice <= 0)) {
      myStatus = -1073741637;
    }
    stub_driver_init();
    main_tmp_ndt_1 = __VERIFIER_nondet_int();
    if ((main_tmp_ndt_1 >= 0) && (main_tmp_ndt_1 <= 0)) {
      main_status = DiskPerfCreate(main_devobj, pirp);
    } else {
      main_tmp_ndt_2 = __VERIFIER_nondet_int();
      if ((main_tmp_ndt_2 >= 2) && (main_tmp_ndt_2 <= 2)) {
        main_status = DiskPerfDeviceControl(main_devobj, pirp);
      } else {
        main_tmp_ndt_3 = __VERIFIER_nondet_int();
        if ((main_tmp_ndt_3 >= 3) && (main_tmp_ndt_3 <= 3)) {
          main_status = DiskPerfDispatchPnp(main_devobj, pirp);
        } else {
          main_tmp_ndt_4 = __VERIFIER_nondet_int();
          if ((main_tmp_ndt_4 >= 4) && (main_tmp_ndt_4 <= 4)) {
            main_status = DiskPerfDispatchPower(main_devobj, pirp);
          } else {
            main_tmp_ndt_5 = __VERIFIER_nondet_int();
            if ((main_tmp_ndt_5 >= 12) && (main_tmp_ndt_5 <= 12)) {
              main_status = DiskPerfShutdownFlush(main_devobj, pirp);
            } else {
              TRACER_returning = 1;
            }
          }
        }
      }
    }
  }
  if (TRACER_returning <= 0) {
    if ((s > UNLOADED) || (s < UNLOADED)) {
      if ((main_status > -1) || (main_status < -1)) {
        if ((s > SKIP2) || (s < SKIP2)) {
          if ((s > IPC) || (s < IPC)) {
            safety = safety + (s - DC);
          }
          if ((s > DC) || (s < DC)) {
            safety = safety + (main_status - lowerDriverReturn);
          }
        } else {
          safety = safety + (main_status - lowerDriverReturn);
        }
      }
    }
  }
  if (safety != 0) goto ERROR; return; ERROR:;
  return;
}
}
int main(void) 
{ int d = __VERIFIER_nondet_int() ;
  int status = __VERIFIER_nondet_int() ;
  int we_should_unload = __VERIFIER_nondet_int() ;
  int irp = __VERIFIER_nondet_int() ;
  int pirp__IoStatus__Status ;
  int irp_choice = __VERIFIER_nondet_int() ;
  int devobj = __VERIFIER_nondet_int() ;
  int __cil_tmp9 ;

 s  = 0;
 UNLOADED  = 0;
 NP  = 0;
 DC  = 0;
 SKIP1  = 0;
 SKIP2  = 0;
 MPR1  = 0;
 MPR3  = 0;
 IPC  = 0;
 pended  = 0;
 compFptr  = 0;
 compRegistered  = 0;
 lowerDriverReturn  = 0;
 setEventCalled  = 0;
 customIrp  = 0;
 myStatus  = 0;
 routine  = 0;
 pirp  = 0;
 Executive  = 0;
 KernelMode  = 0;

  {
  {
#line 644
  pirp = irp;
#line 645
  _BLAST_init();
  }
#line 647
  if (status >= 0) {
#line 648
    s = NP;
#line 649
    customIrp = 0;
#line 650
    setEventCalled = customIrp;
#line 651
    lowerDriverReturn = setEventCalled;
#line 652
    compRegistered = lowerDriverReturn;
#line 653
    compFptr = compRegistered;
#line 654
    pended = compFptr;
#line 655
    pirp__IoStatus__Status = 0;
#line 656
    myStatus = 0;
#line 657
    if (irp_choice == 0) {
#line 658
      pirp__IoStatus__Status = -1073741637;
#line 659
      myStatus = -1073741637;
    }
    {
#line 664
    stub_driver_init();
    }
    {
#line 666
    if (status < 0) {
#line 667
      return (-1);
    }
    }
#line 671
    int tmp_ndt_1;
    tmp_ndt_1 = __VERIFIER_nondet_int();
    if (tmp_ndt_1 == 0) {
      goto switch_2_0;
    } else {
#line 674
      int tmp_ndt_2;
      tmp_ndt_2 = __VERIFIER_nondet_int();
      if (tmp_ndt_2 == 2) {
        goto switch_2_2;
      } else {
#line 677
        int tmp_ndt_3;
        tmp_ndt_3 = __VERIFIER_nondet_int();
        if (tmp_ndt_3 == 3) {
          goto switch_2_3;
        } else {
#line 680
	  int tmp_ndt_4;
	  tmp_ndt_4 = __VERIFIER_nondet_int();
          if (tmp_ndt_4 == 4) {
            goto switch_2_4;
          } else {
#line 683
	    int tmp_ndt_5;
	    tmp_ndt_5 = __VERIFIER_nondet_int();
            if (tmp_ndt_5 == 12) {
              goto switch_2_12;
            } else {
              goto switch_2_default;
#line 688
              if (0) {
                switch_2_0: 
                {
#line 691
                status = DiskPerfCreate(devobj, pirp);
                }
                goto switch_2_break;
                switch_2_2: 
                {
#line 696
                status = DiskPerfDeviceControl(devobj, pirp);
                }
                goto switch_2_break;
                switch_2_3: 
                {
#line 701
                status = DiskPerfDispatchPnp(devobj, pirp);
                }
                goto switch_2_break;
                switch_2_4: 
                {
#line 706
                status = DiskPerfDispatchPower(devobj, pirp);
                }
                goto switch_2_break;
                switch_2_12: 
                {
#line 711
                status = DiskPerfShutdownFlush(devobj, pirp);
                }
                goto switch_2_break;
                switch_2_default: ;
#line 715
                return (-1);
              } else {
                switch_2_break: ;
              }
            }
          }
        }
      }
    }
#line 725
    if (we_should_unload) {
      {
#line 727
      DiskPerfUnload(d);
      }
    }
  }
#line 735
  if (pended == 1) {
#line 736
    if (s == NP) {
#line 737
      s = NP;
    } else {
      goto _L___2;
    }
  } else {
    _L___2: 
#line 743
    if (pended == 1) {
#line 744
      if (s == MPR3) {
#line 745
        s = MPR3;
      } else {
        goto _L___1;
      }
    } else {
      _L___1: 
#line 751
      if (s != UNLOADED) {
#line 754
        if (status != -1) {
#line 757
          if (s != SKIP2) {
#line 758
            if (s != IPC) {
#line 759
              if (s != DC) {
                {
#line 761
                errorFn();
                }
              } else {
                goto _L___0;
              }
            } else {
              goto _L___0;
            }
          } else {
            _L___0: 
#line 771
            if (pended == 1) {
#line 772
              if (status != 259) {
                {
#line 774
                errorFn();
                }
              }
            } else {
#line 780
              if (s == DC) {
#line 781
                if (status == 259) {
                  {
#line 783
                  errorFn();
                  }
                }
              } else {
#line 789
                if (status != lowerDriverReturn) {
                  {
#line 791
                  errorFn();
                  }
                }
              }
            }
          }
        }
      }
    }
  }
#line 803
  return (status);
}
}
int main(void) 
{ int d = __VERIFIER_nondet_int() ;
  int status = __VERIFIER_nondet_int() ;
  int we_should_unload = __VERIFIER_nondet_int() ;
  int irp = __VERIFIER_nondet_int() ;
  int pirp__IoStatus__Status ;
  int irp_choice = __VERIFIER_nondet_int() ;
  int devobj = __VERIFIER_nondet_int() ;
  int __cil_tmp9 ;

 s  = 0;
 UNLOADED  = 0;
 NP  = 0;
 DC  = 0;
 SKIP1  = 0;
 SKIP2  = 0;
 MPR1  = 0;
 MPR3  = 0;
 IPC  = 0;
 pended  = 0;
 compFptr  = 0;
 compRegistered  = 0;
 lowerDriverReturn  = 0;
 setEventCalled  = 0;
 customIrp  = 0;
 myStatus  = 0;
 routine  = 0;
 pirp  = 0;
 Executive  = 0;
 KernelMode  = 0;

  {
  {
  pirp = irp;
  _BLAST_init();
  }
  if (status >= 0) {
    s = NP;
    customIrp = 0;
    setEventCalled = customIrp;
    lowerDriverReturn = setEventCalled;
    compRegistered = lowerDriverReturn;
    compFptr = compRegistered;
    pended = compFptr;
    pirp__IoStatus__Status = 0;
    myStatus = 0;
    if (irp_choice == 0) {
      pirp__IoStatus__Status = -1073741637;
      myStatus = -1073741637;
    }
    {
    stub_driver_init();
    }
    {
    if (status < 0) {
      return (-1);
    }
    }
    int tmp_ndt_1;
    tmp_ndt_1 = __VERIFIER_nondet_int();
    if (tmp_ndt_1 == 0) {
      goto switch_2_0;
    } else {
      int tmp_ndt_2;
      tmp_ndt_2 = __VERIFIER_nondet_int();
      if (tmp_ndt_2 == 2) {
        goto switch_2_2;
      } else {
        int tmp_ndt_3;
        tmp_ndt_3 = __VERIFIER_nondet_int();
        if (tmp_ndt_3 == 3) {
          goto switch_2_3;
        } else {
	  int tmp_ndt_4;
	  tmp_ndt_4 = __VERIFIER_nondet_int();
          if (tmp_ndt_4 == 4) {
            goto switch_2_4;
          } else {
	    int tmp_ndt_5;
	    tmp_ndt_5 = __VERIFIER_nondet_int();
            if (tmp_ndt_5 == 12) {
              goto switch_2_12;
            } else {
              goto switch_2_default;
              if (0) {
                switch_2_0: 
                {
                status = DiskPerfCreate(devobj, pirp);
                }
                goto switch_2_break;
                switch_2_2: 
                {
                status = DiskPerfDeviceControl(devobj, pirp);
                }
                goto switch_2_break;
                switch_2_3: 
                {
                status = DiskPerfDispatchPnp(devobj, pirp);
                }
                goto switch_2_break;
                switch_2_4: 
                {
                status = DiskPerfDispatchPower(devobj, pirp);
                }
                goto switch_2_break;
                switch_2_12: 
                {
                status = DiskPerfShutdownFlush(devobj, pirp);
                }
                goto switch_2_break;
                switch_2_default: ;
                return (-1);
              } else {
                switch_2_break: ;
              }
            }
          }
        }
      }
    }
    if (we_should_unload) {
      {
      DiskPerfUnload(d);
      }
    }
  }
  if (pended == 1) {
    if (s == NP) {
      s = NP;
    } else {
      goto _L___2;
    }
  } else {
    _L___2: 
    if (pended == 1) {
      if (s == MPR3) {
        s = MPR3;
      } else {
        goto _L___1;
      }
    } else {
      _L___1: 
      if (s != UNLOADED) {
        if (status != -1) {
          if (s != SKIP2) {
            if (s != IPC) {
              if (s != DC) {
                {
                errorFn();
                }
              } else {
                goto _L___0;
              }
            } else {
              goto _L___0;
            }
          } else {
            _L___0: 
            if (pended == 1) {
              if (status != 259) {
                {
                errorFn();
                }
              }
            } else {
              if (s == DC) {
                if (status == 259) {
                  {
                  errorFn();
                  }
                }
              } else {
                if (status != lowerDriverReturn) {
                  {
                  errorFn();
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  return (status);
}
}
Beispiel #4
0
void main(void) 
{ int main_d ;
  int main_status ;
  int main_we_should_unload ;
  int main_irp ;
  int main_pirp__IoStatus__Status ;
  int main_irp_choice ;
  int main_devobj ;
  int main_tmp_ndt_1 ;
  int main_tmp_ndt_2 ;
  int main_tmp_ndt_3 ;
  int main_tmp_ndt_4 ;
  int main_tmp_ndt_5 ;
  int retres13 ;
  int TRACER_returning ;

  {
    TRACER_returning = 0;
    safety = 0;
    s = 0;
    UNLOADED = 0;
    NP = 0;
    DC = 0;
    SKIP1 = 0;
    SKIP2 = 0;
    MPR1 = 0;
    MPR3 = 0;
    IPC = 0;
    pended = 0;
    compFptr = 0;
    compRegistered = 0;
    lowerDriverReturn = 0;
    setEventCalled = 0;
    customIrp = 0;
    myStatus = 0;
    routine = 0;
    pirp = 0;
    Executive = 0;
    KernelMode = 0;
    pirp = main_irp;
    _BLAST_init();
    if (main_status >= 0) {
      s = NP;
      customIrp = 0;
      setEventCalled = customIrp;
      lowerDriverReturn = setEventCalled;
      compRegistered = lowerDriverReturn;
      compFptr = compRegistered;
      pended = compFptr;
      main_pirp__IoStatus__Status = 0;
      myStatus = 0;
      if ((main_irp_choice >= 0) && (main_irp_choice <= 0)) {
        main_pirp__IoStatus__Status = -1073741637;
        myStatus = -1073741637;
      }
      stub_driver_init();
      if (main_status < 0) {
        retres13 = -1;
        TRACER_returning = 1;
      }
      else {
        main_tmp_ndt_1 = __VERIFIER_nondet_int();
        if ((main_tmp_ndt_1 >= 0) && (main_tmp_ndt_1 <= 0)) {
          main_status = DiskPerfCreate(main_devobj, pirp);
        } else {
          main_tmp_ndt_2 = __VERIFIER_nondet_int();
          if ((main_tmp_ndt_2 >= 2) && (main_tmp_ndt_2 <= 2)) {
            main_status = DiskPerfDeviceControl(main_devobj, pirp);
          } else {
            main_tmp_ndt_3 = __VERIFIER_nondet_int();
            if ((main_tmp_ndt_3 >= 3) && (main_tmp_ndt_3 <= 3)) {
              main_status = DiskPerfDispatchPnp(main_devobj, pirp);
            } else {
              main_tmp_ndt_4 = __VERIFIER_nondet_int();
              if ((main_tmp_ndt_4 >= 4) && (main_tmp_ndt_4 <= 4)) {
                main_status = DiskPerfDispatchPower(main_devobj, pirp);
              } else {
                main_tmp_ndt_5 = __VERIFIER_nondet_int();
                if ((main_tmp_ndt_5 >= 12) && (main_tmp_ndt_5 <= 12)) {
                  main_status = DiskPerfShutdownFlush(main_devobj, pirp);
                } else {
                  retres13 = -1;
                  TRACER_returning = 1;
                }
              }
            }
          }
        }
        if (TRACER_returning <= 0) {
          if ((main_we_should_unload > 0) || (main_we_should_unload < 0)) {
            DiskPerfUnload(main_d);
          }
        }
      }
    }
    if (TRACER_returning <= 0) {
      if ((pended >= 1) && (pended <= 1)) {
        if ((s >= NP) && (s <= NP)) {
          s = NP;
        } else {
          if ((pended >= 1) && (pended <= 1)) {
            if ((s >= MPR3) && (s <= MPR3)) {
              s = MPR3;
            } else {
              if ((s > UNLOADED) || (s < UNLOADED)) {
                if ((main_status > -1) || (main_status < -1)) {
                  if ((s > SKIP2) || (s < SKIP2)) {
                    if ((s > IPC) || (s < IPC)) {
                      safety = safety + (s - DC);
                    }
                    if ((pended >= 1) && (pended <= 1)) {
                      safety = safety + (main_status - 259);
                    } else {
                      if ((s > DC) || (s < DC)) {
                        safety = safety + (main_status - lowerDriverReturn);
                      }
                    }
                  } else {
                    if ((pended >= 1) && (pended <= 1)) {
                      safety = safety + (main_status - 259);
                    } else {
                      if ((s > DC) || (s < DC)) {
                        safety = safety + (main_status - lowerDriverReturn);
                      }
                    }
                  }
                }
              }
            }
          } else {
            if ((s > UNLOADED) || (s < UNLOADED)) {
              if ((main_status > -1) || (main_status < -1)) {
                if ((s > SKIP2) || (s < SKIP2)) {
                  if ((s > IPC) || (s < IPC)) {
                    safety = safety + (s - DC);
                  }
                  if ((pended >= 1) && (pended <= 1)) {
                    safety = safety + (main_status - 259);
                  } else {
                    if ((s > DC) || (s < DC)) {
                      safety = safety + (main_status - lowerDriverReturn);
                    }
                  }
                } else {
                  if ((pended >= 1) && (pended <= 1)) {
                    safety = safety + (main_status - 259);
                  } else {
                    if ((s > DC) || (s < DC)) {
                      safety = safety + (main_status - lowerDriverReturn);
                    }
                  }
                }
              }
            }
          }
        }
      } else {
        if ((pended >= 1) && (pended <= 1)) {
          if ((s >= MPR3) && (s <= MPR3)) {
            s = MPR3;
          } else {
            if ((s > UNLOADED) || (s < UNLOADED)) {
              if ((main_status > -1) || (main_status < -1)) {
                if ((s > SKIP2) || (s < SKIP2)) {
                  if ((s > IPC) || (s < IPC)) {
                    safety = safety + (s - DC);
                  }
                  if ((pended >= 1) && (pended <= 1)) {
                    safety = safety + (main_status - 259);
                  } else {
                    if ((s > DC) || (s < DC)) {
                      safety = safety + (main_status - lowerDriverReturn);
                    }
                  }
                } else {
                  if ((pended >= 1) && (pended <= 1)) {
                    safety = safety + (main_status - 259);
                  } else {
                    if ((s > DC) || (s < DC)) {
                      safety = safety + (main_status - lowerDriverReturn);
                    }
                  }
                }
              }
            }
          }
        } else {
          if ((s > UNLOADED) || (s < UNLOADED)) {
            if ((main_status > -1) || (main_status < -1)) {
              if ((s > SKIP2) || (s < SKIP2)) {
                if ((s > IPC) || (s < IPC)) {
                  safety = safety + (s - DC);
                }
                if ((pended >= 1) && (pended <= 1)) {
                  safety = safety + (main_status - 259);
                } else {
                  if ((s > DC) || (s < DC)) {
                    safety = safety + (main_status - lowerDriverReturn);
                  }
                }
              } else {
                if ((pended >= 1) && (pended <= 1)) {
                  safety = safety + (main_status - 259);
                } else {
                  if ((s > DC) || (s < DC)) {
                    safety = safety + (main_status - lowerDriverReturn);
                  }
                }
              }
            }
          }
        }
      }
      retres13 = main_status;
    }
    if (safety != 0) goto ERROR; return; ERROR:;
    return (retres13);
  }
}