From 6c25cb78e05b059e0b57a6cf9cfd5637c58d936b Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Mon, 23 Apr 2012 17:14:45 -0700 Subject: [PATCH] model: print 'number of executions' In preparation of many executions, I establish a counting variable 'num_executions'. --- model.cc | 2 ++ model.h | 1 + 2 files changed, 3 insertions(+) diff --git a/model.cc b/model.cc index afe159e..914ae3d 100644 --- a/model.cc +++ b/model.cc @@ -13,6 +13,7 @@ ModelChecker::ModelChecker() /* Initialize default scheduler */ this->scheduler = new Scheduler(); + num_executions = 0; this->current_action = NULL; this->exploring = NULL; this->nextThread = THREAD_ID_T_NONE; @@ -178,6 +179,7 @@ void ModelChecker::print_trace(void) printf("\n"); printf("---------------------------------------------------------------------\n"); + printf("Number of executions: %d\n", num_executions); printf("Total nodes created: %d\n\n", TreeNode::getTotalNodes()); scheduler->print(); diff --git a/model.h b/model.h index ccaeda2..44979ab 100644 --- a/model.h +++ b/model.h @@ -88,6 +88,7 @@ public: bool next_execution(); private: int used_thread_id; + int num_executions; ModelAction *get_last_conflict(ModelAction *act); void set_backtracking(ModelAction *act); -- 2.34.1