2 * @brief Stack of operations for use in backtracking.
5 #ifndef __NODESTACK_H__
6 #define __NODESTACK_H__
18 Node(ModelAction *act = NULL, int nthreads = 1);
20 /* return true = thread choice has already been explored */
21 bool has_been_explored(thread_id_t tid);
22 /* return true = backtrack set is empty */
23 bool backtrack_empty();
24 void explore_child(ModelAction *act);
25 /* return false = thread was already in backtrack */
26 bool set_backtrack(thread_id_t id);
27 thread_id_t get_next_backtrack();
28 bool is_enabled(Thread *t);
29 ModelAction * get_action() { return action; }
35 void explore(thread_id_t tid);
39 std::vector< bool, MyAlloc<bool> > explored_children;
40 std::vector< bool, MyAlloc<bool> > backtrack;
43 typedef std::list<class Node *, MyAlloc< class Node * > > node_list_t;
49 ModelAction * explore_action(ModelAction *act);
52 void reset_execution();
54 int get_total_nodes() { return total_nodes; }
60 node_list_t node_list;
61 node_list_t::iterator iter;
66 #endif /* __NODESTACK_H__ */