X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=model.cc;h=b4bbb70e926bfdba2610509f4cdfc8265b137e1d;hp=7f38adc37e149403828d993676e366fb70bc653d;hb=fa4c0d65d9c72d08d28e604a3eaa2fd82a9c6b20;hpb=c56ca6ef155dc69125bfc53bf9893016b699a0c2 diff --git a/model.cc b/model.cc index 7f38adc3..b4bbb70e 100644 --- a/model.cc +++ b/model.cc @@ -162,7 +162,7 @@ void ModelChecker::print_bugs() const bugs->size(), bugs->size() > 1 ? "s" : ""); for (unsigned int i = 0;i < bugs->size();i++) - (*bugs)[i]->print(); + (*bugs)[i] -> print(); } /** @@ -173,15 +173,15 @@ void ModelChecker::print_bugs() const */ void ModelChecker::record_stats() { - stats.num_total++; + stats.num_total ++; if (!execution->isfeasibleprefix()) - stats.num_infeasible++; + stats.num_infeasible ++; else if (execution->have_bug_reports()) - stats.num_buggy_executions++; + stats.num_buggy_executions ++; else if (execution->is_complete_execution()) - stats.num_complete++; + stats.num_complete ++; else { - stats.num_redundant++; + stats.num_redundant ++; /** * @todo We can violate this ASSERT() when fairness/sleep sets @@ -262,15 +262,15 @@ bool ModelChecker::next_execution() return true; } // test code - execution_number++; + execution_number ++; reset_to_initial_state(); return false; } /** @brief Run trace analyses on complete trace */ void ModelChecker::run_trace_analyses() { - for (unsigned int i = 0;i < trace_analyses.size();i++) - trace_analyses[i]->analyze(execution->get_action_trace()); + for (unsigned int i = 0;i < trace_analyses.size();i ++) + trace_analyses[i] -> analyze(execution->get_action_trace()); } /** @@ -373,7 +373,9 @@ void ModelChecker::do_restart() } void ModelChecker::startMainThread() { - init_thread->setContext(); + init_thread->set_state(THREAD_RUNNING); + scheduler->set_current_thread(init_thread); + thread_startup(); } /** @brief Run ModelChecker for the user program */ @@ -383,7 +385,7 @@ void ModelChecker::run() char random_state[256]; initstate(423121, random_state, sizeof(random_state)); - for(int exec = 0;exec < params.maxexecutions;exec++) { + for(int exec = 0;exec < params.maxexecutions;exec ++) { Thread * t = init_thread; do {