13 * A tree with n possible branches from each node - used for recording the
14 * execution paths we've executed / backtracked
18 TreeNode(TreeNode *par = NULL, ModelAction *act = NULL);
20 bool hasBeenExplored(thread_id_t id) { return children.find(id_to_int(id)) != children.end(); }
21 TreeNode * explore_child(ModelAction *act);
22 thread_id_t getNextBacktrack();
24 /* Return 1 if already in backtrack, 0 otherwise */
25 int setBacktrack(thread_id_t id);
27 static int getTotalNodes() { return TreeNode::totalNodes; }
30 std::map<int, class TreeNode *> children;
31 std::set<int> backtrack;
32 static int totalNodes;
35 #endif /* __TREE_H__ */