model: print 'number of executions'
authorBrian Norris <banorris@uci.edu>
Tue, 24 Apr 2012 00:14:45 +0000 (17:14 -0700)
committerBrian Norris <banorris@uci.edu>
Tue, 24 Apr 2012 00:14:45 +0000 (17:14 -0700)
In preparation of many executions, I establish a counting variable
'num_executions'.

model.cc
model.h

index afe159ec189ad934cac85eafa7920163b296d160..914ae3daccefa90aa0c24be3cff1d712c1e5b5a7 100644 (file)
--- 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 ccaeda21aaa29b9b4ab9919cc3947ebcef9a36fd..44979ab6ed789e229f8be1849da8832f0daed565 100644 (file)
--- 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);