void Predicate::copy_predicate_expr(Predicate * other)
{
PredExprSet * other_pred_expressions = other->get_pred_expressions();
void Predicate::copy_predicate_expr(Predicate * other)
{
PredExprSet * other_pred_expressions = other->get_pred_expressions();
struct pred_expr * copy = new pred_expr(ptr->token, ptr->func_inst, ptr->value);
pred_expressions.add(copy);
}
struct pred_expr * copy = new pred_expr(ptr->token, ptr->func_inst, ptr->value);
pred_expressions.add(copy);
}
-}
-
-/* Return the single child branch of this predicate.
- * Return NULL if this predicate has no children.
- */
-Predicate * Predicate::get_single_child(FuncInst * inst)
-{
- int size = children.size();
- if (size == 0)
- return NULL;
-
- /* Should only have one child */
- ASSERT(size == 1);
- Predicate * child = children[0];
- ConcretePredicate * concrete = new ConcretePredicate(tid);
- PredExprSetIter * it = pred_expressions.iterator();
-
- while (it->hasNext()) {
- struct pred_expr * ptr = it->next();
- uint64_t value = 0;
-
- switch(ptr->token) {
- case NOPREDICATE:
- break;
- case EQUALITY:
- FuncInst * to_be_compared;
- ModelAction * last_act;
-
- to_be_compared = ptr->func_inst;
- last_act = inst_act_map->get(to_be_compared);
- value = last_act->get_reads_from_value();
- break;
- case NULLITY:
- break;
- default:
- break;
- }
-
- concrete->add_expression(ptr->token, value, ptr->value);
- }
-
- return concrete;
+ /*
+ ConcretePredicate * concrete = new ConcretePredicate(tid);
+ PredExprSetIter * it = pred_expressions.iterator();
+
+ while (it->hasNext()) {
+ struct pred_expr * ptr = it->next();
+ uint64_t value = 0;
+
+ switch(ptr->token) {
+ case NOPREDICATE:
+ break;
+ case EQUALITY:
+ FuncInst * to_be_compared;
+ ModelAction * last_act;
+
+ to_be_compared = ptr->func_inst;
+ last_act = inst_act_map->get(to_be_compared);
+ value = last_act->get_reads_from_value();
+ break;
+ case NULLITY:
+ break;
+ default:
+ break;
+ }
+
+ concrete->add_expression(ptr->token, value, ptr->value);
+ }
+
+ delete it;
+ return concrete;
+ */
+
+ return NULL;
double prob = (double) store_visible_count / total_checking_count;
model_print("Total checks: %d, visible count: %d; prob: %f\n", total_checking_count, store_visible_count, prob);
double prob = (double) store_visible_count / total_checking_count;
model_print("Total checks: %d, visible count: %d; prob: %f\n", total_checking_count, store_visible_count, prob);
if (exit) {
model_print("\"%p\" -> \"%p\"[style=dashed, color=red]\n", this, exit);
}
if (exit) {
model_print("\"%p\" -> \"%p\"[style=dashed, color=red]\n", this, exit);
}