model_params * getParams();
void run();
- /** Restart the model checker, intended for pluggins. */
- void restart();
-
/** Exit the model checker, intended for pluggins. */
void exit_model_checker();
void switch_from_master(Thread *thread);
uint64_t switch_to_master(ModelAction *act);
+ uint64_t switch_thread(ModelAction *act);
+
+ void continueRunExecution(Thread *old);
+ void startRunExecution(ucontext_t *old);
+ void finishRunExecution(Thread *old);
+ void finishRunExecution(ucontext_t *old);
+ void consumeAction();
+ void chooseThread(ModelAction *act, Thread *thr);
+ Thread * getNextThread();
+ void handleChosenThread(Thread *old);
+ void handleChosenThread(ucontext_t *old);
+ void handleNewValidThread(Thread *old, Thread *next);
void assert_bug(const char *msg, ...);
Scheduler * getScheduler() {return scheduler;}
MEMALLOC
private:
- /** Flag indicates whether to restart the model checker. */
- bool restart_flag;
-
/** Snapshot id we return to restart. */
snapshot_id snapshot;
int execution_number;
+ unsigned int curr_thread_num;
+
+ Thread * chosen_thread;
+
+ bool thread_chosen;
+
+ modelclock_t checkfree;
+
unsigned int get_num_threads() const;
- bool next_execution();
+ void finish_execution(bool moreexecutions);
bool should_terminate_execution();
Thread * get_next_thread();
ModelVector<TraceAnalysis *> trace_analyses;
- /** @bref Implement restart. */
- void do_restart();
/** @bref Plugin that can inspect new actions. */
TraceAnalysis *inspect_plugin;
/** @brief The cumulative execution stats */