run_walk.cpp 720 B

123456789101112131415161718192021222324252627
  1. #include "walk.hpp"
  2. int main(int argc,char* argv[]){
  3. if(argc!=3){
  4. cerr<<"[run_walk] Argument error."<<endl;
  5. exit(-1);
  6. }
  7. string filename=argv[1];
  8. int timeout=stoi(argv[2]);
  9. cout<<"Input filename : "<<filename<<endl;
  10. cout<<"Timeout : "<<timeout<<" seconds"<<endl;
  11. Stack stack;
  12. Semigroup* S=stack.next();
  13. rename(("todo/"+filename).c_str(),("lock/"+filename).c_str());
  14. S->from_file("lock/"+filename);
  15. stack.push();
  16. Results results;
  17. results.clear();
  18. walk(stack,results,filename,timeout);
  19. if(results.has_counter_example){
  20. cout<<"*******************"<<endl;
  21. cout<<"* Counter example *"<<endl;
  22. cout<<"*******************"<<endl;
  23. results.S_counter_example.display();
  24. }
  25. }