+/* Check if children of curr_pred match read_inst.
+ * @return False if no child matches read_inst
+ */
+bool NewFuzzer::check_branch_inst(Predicate * curr_pred, FuncInst * read_inst,
+ SnapVector<ModelAction *> * rf_set)
+{
+ available_branches_tmp_storage.clear();
+
+ ASSERT(!rf_set->empty());
+ if (curr_pred == NULL || read_inst == NULL)
+ return false;
+
+ ModelVector<Predicate *> * children = curr_pred->get_children();
+ bool any_child_match = false;
+
+ /* Iterate over all predicate children */
+ for (uint i = 0;i < children->size();i++) {
+ Predicate * branch = (*children)[i];
+
+ /* The children predicates may have different FuncInsts */
+ if (branch->get_func_inst() == read_inst) {
+ any_child_match = true;
+ branch->incr_total_checking_count();
+ available_branches_tmp_storage.push_back(branch);
+ }
+ }
+
+ return any_child_match;
+}
+
+/* Select a random branch from the children of curr_pred