#define INITIAL_THREAD_ID 0
+class Backtrack {
+public:
+ Backtrack(ModelAction *d, action_list_t *t) {
+ diverge = d;
+ actionTrace = t;
+ iter = actionTrace->begin();
+ }
+ ModelAction * get_diverge() { return diverge; }
+ action_list_t * get_trace() { return actionTrace; }
+ void advance_state() { iter++; }
+ ModelAction * get_state() {
+ return iter == actionTrace->end() ? NULL : *iter;
+ }
+private:
+ ModelAction *diverge;
+ action_list_t *actionTrace;
+ /* points to position in actionTrace as we replay */
+ action_list_t::iterator iter;
+};
+
ModelChecker *model;
ModelChecker::ModelChecker()
/* Forward declaration */
class TreeNode;
-
-class Backtrack {
-public:
- Backtrack(ModelAction *d, action_list_t *t) {
- diverge = d;
- actionTrace = t;
- iter = actionTrace->begin();
- }
- ModelAction * get_diverge() { return diverge; }
- action_list_t * get_trace() { return actionTrace; }
- void advance_state() { iter++; }
- ModelAction * get_state() {
- return iter == actionTrace->end() ? NULL : *iter;
- }
-private:
- ModelAction *diverge;
- action_list_t *actionTrace;
- /* points to position in actionTrace as we replay */
- action_list_t::iterator iter;
-};
+class Backtrack;
class ModelChecker {
public: