if ( func_nodes.size() <= func_id )
resize_func_nodes( func_id + 1 );
+
+ FuncNode * func_node = func_nodes[func_id];
+ func_node->init_predicate_tree_position(tid);
}
/* @param func_id a non-zero value */
if (last_func_id == func_id) {
FuncNode * func_node = func_nodes[func_id];
+ func_node->unset_predicate_tree_position(tid);
//func_node->clear_read_map(tid);
action_list_t * curr_act_list = func_act_lists->back();
/* defer the processing of curr_act_list until the function has exits a few times
- * (currently 2 times) so that more information can be gathered to infer nullity predicates.
+ * (currently twice) so that more information can be gathered to infer nullity predicates.
*/
func_node->incr_exit_count();
if (func_node->get_exit_count() >= 2) {
if ( old_size < new_size )
func_nodes.resize(new_size);
- for (uint32_t id = old_size;id < new_size;id++) {
+ for (uint32_t id = old_size; id < new_size; id++) {
const char * func_name = func_map_rev[id];
FuncNode * func_node = new FuncNode(this);
func_node->set_func_id(id);
SnapList<action_list_t *> * func_act_lists = (*thrd_func_act_lists)[id];
if (act->is_write()) {
- add_to_write_history(act->get_location(), act->get_write_value());
-
+ void * location = act->get_location();
+ uint64_t value = act->get_write_value();
+ add_to_write_history(location, value);
+
+ /* update FuncNodes */
+ SnapList<FuncNode *> * func_nodes = loc_func_nodes_map.get(location);
+ sllnode<FuncNode *> * it = NULL;
+ if (func_nodes != NULL)
+ it = func_nodes->begin();
+
+ for (; it != NULL; it = it->getNext()) {
+ FuncNode * func_node = it->getVal();
+ func_node->add_to_val_loc_map(value, location);
+ }
}
/* the following does not care about actions without a position */
func_node_list->push_back(node);
}
+/* Reallocate some snapshotted memories when new executions start */
void ModelHistory::set_new_exec_flag()
{
for (uint i = 1; i < func_nodes.size(); i++) {