- int used_thread_id;
- class ModelAction *current_action;
- std::list<class ModelAction *> action_trace;
- std::map<thread_id_t, class Thread *> thread_map;
- class TreeNode *rootNode, *currentNode;
+ /** The scheduler to use: tracks the running/ready Threads */
+ Scheduler * const scheduler;
+ NodeStack * const node_stack;
+ ModelExecution *execution;
+
+ int execution_number;
+
+ unsigned int get_num_threads() const;
+
+ void execute_sleep_set();
+
+ bool next_execution();
+ bool should_terminate_execution();
+
+ Thread * get_next_thread();
+ void reset_to_initial_state();
+
+
+ ModelAction *diverge;
+ ModelAction *earliest_diverge;
+
+ ucontext_t system_context;
+
+ ModelVector<TraceAnalysis *> trace_analyses;
+
+ /** @brief The cumulative execution stats */
+ struct execution_stats stats;
+ void record_stats();
+ void run_trace_analyses();
+ void print_bugs() const;
+ void print_execution(bool printbugs) const;
+ void print_stats() const;
+
+ friend void user_main_wrapper();