X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=predicate.cc;h=eb979f8868a9de8097ca5cbb6c4be24a0bbaa2f8;hp=7710705174860433473b7f8d7a995e198d40a212;hb=57748ff26d916528ba0df0b1d2c699a901386d5f;hpb=17b49f10df170ee8e6aca7401e014e8658971cdb diff --git a/predicate.cc b/predicate.cc index 77107051..eb979f88 100644 --- a/predicate.cc +++ b/predicate.cc @@ -8,6 +8,7 @@ Predicate::Predicate(FuncInst * func_inst, bool is_entry, bool is_exit) : exit_predicate(is_exit), does_write(false), depth(0), + weight(0), exploration_count(0), store_visible_count(0), total_checking_count(0), @@ -60,6 +61,22 @@ void Predicate::set_parent(Predicate * parent_pred) depth = parent_pred->get_depth() + 1; } +void Predicate::set_exit(Predicate * exit_pred) +{ + exit = exit_pred; + exit_pred->add_pre_exit_predicate(this); +} + +void Predicate::alloc_pre_exit_predicates() +{ + pre_exit_predicates = new ModelVector(); +} + +void Predicate::add_pre_exit_predicate(Predicate * pred) +{ + pre_exit_predicates->push_back(pred); +} + void Predicate::copy_predicate_expr(Predicate * other) { PredExprSet * other_pred_expressions = other->get_pred_expressions(); @@ -136,7 +153,7 @@ void Predicate::print_predicate() return; } - model_print("depth: %d\n", depth); + model_print("depth: %u; weight: %g\n", depth, weight); func_inst->print();