int main(int argc, char *argv[]) { if (argc < 4) errx(1, "not enough arguments"); init_sli(); VexPtr<Oracle> oracle(new Oracle(NULL, NULL, NULL)); VexPtr<StateMachine, &ir_heap> readMachine(readStateMachine(open(argv[1], O_RDONLY))); VexPtr<StateMachine, &ir_heap> writeMachine(readStateMachine(open(argv[2], O_RDONLY))); VexPtr<IRExpr, &ir_heap> assumption(readIRExpr(open(argv[3], O_RDONLY))); bool mightCrash; bool mightSurvive; evalCrossProductMachine(readMachine, writeMachine, oracle, assumption, AllowableOptimisations::defaultOptimisations, &mightSurvive, &mightCrash, ALLOW_GC); printf("Might survive %d, might crash %d\n", mightSurvive, mightCrash); return 0; }
int readStates(string filePrefix) { dout << " loadStates" << endl; string fileName = filePrefix + "state_machine.dat"; FILE *fin = fopen(fileName.c_str(), "rb"); if(!fin) { dout << "ERROR- loadStates: Could not open " << fileName << " for reading." << endl; return 1; } readStateMachine(fin, game_states); dout << game_states; fclose(fin); dout << " End loadStates" << endl; return 0; }