cleanup plugin interface a little more.
[model-checker.git] / model.cc
index 8e94561531ca063ccbd23bec2bf51d778530a95d..d9caf9a91e72ef727835a24433ba3496c74f7cd6 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -24,7 +24,7 @@ ModelChecker::ModelChecker(struct model_params params) :
        params(params),
        scheduler(new Scheduler()),
        node_stack(new NodeStack()),
-       execution(new ModelExecution(this, &params, scheduler, node_stack)),
+       execution(new ModelExecution(this, &this->params, scheduler, node_stack)),
        execution_number(1),
        diverge(NULL),
        earliest_diverge(NULL),
@@ -36,8 +36,6 @@ ModelChecker::ModelChecker(struct model_params params) :
 ModelChecker::~ModelChecker()
 {
        delete node_stack;
-       for (unsigned int i = 0; i < trace_analyses.size(); i++)
-               delete trace_analyses[i];
        delete scheduler;
 }
 
@@ -444,7 +442,7 @@ void ModelChecker::run()
                         * thread which just took a step--plus the first step
                         * for any newly-created thread
                         */
-                       for (unsigned int i = 0; i < execution->get_num_threads(); i++) {
+                       for (unsigned int i = 0; i < get_num_threads(); i++) {
                                thread_id_t tid = int_to_id(i);
                                Thread *thr = get_thread(tid);
                                if (!thr->is_model_thread() && !thr->is_complete() && !thr->get_pending()) {