14 * A tree with n possible branches from each node - used for recording the
15 * execution paths we've executed / backtracked
19 TreeNode(TreeNode *par = NULL, ModelAction *act = NULL);
21 bool hasBeenExplored(thread_id_t id) { return children.find(id_to_int(id)) != children.end(); }
22 TreeNode * explore_child(ModelAction *act);
23 thread_id_t getNextBacktrack();
25 /* Return 1 if already in backtrack, 0 otherwise */
26 int setBacktrack(thread_id_t id);
28 static int getTotalNodes() { return TreeNode::totalNodes; }
30 bool is_enabled(Thread *t);
34 std::map<int, class TreeNode *, std::less< int >, MyAlloc< std::pair< const int, class TreeNode * > > > children;
35 std::set<int, std::less< int >, MyAlloc< int > > backtrack;
36 static int totalNodes;
40 #endif /* __TREE_H__ */