X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=funcnode.h;h=d8b0bc1a0a6342421dce0c17f1859175495dc158;hb=f9cdc3f4a12363409956eb957252e6107aff8d45;hp=ed2213a73382e40d0e799aea9c976da3863613a2;hpb=e6983a4f1ce4e77f38a0d0fa90ed41cbde54e970;p=c11tester.git diff --git a/funcnode.h b/funcnode.h index ed2213a7..d8b0bc1a 100644 --- a/funcnode.h +++ b/funcnode.h @@ -13,6 +13,8 @@ typedef HashTable inst_id_map_t; typedef HashTable inst_pred_map_t; +typedef ModelList predicate_trace_t; + typedef enum edge_type { IN_EDGE, OUT_EDGE, BI_EDGE } edge_type_t; @@ -51,10 +53,11 @@ public: void add_to_val_loc_map(value_set_t * values, void * loc); void update_loc_may_equal_map(void * new_loc, loc_set_t * old_locations); - void init_predicate_tree_position(thread_id_t tid); void set_predicate_tree_position(thread_id_t tid, Predicate * pred); Predicate * get_predicate_tree_position(thread_id_t tid); + void add_predicate_to_trace(thread_id_t tid, Predicate *pred); + void init_inst_act_map(thread_id_t tid); void reset_inst_act_map(thread_id_t tid); void update_inst_act_map(thread_id_t tid, ModelAction * read_act); @@ -103,8 +106,8 @@ private: /* Delect read actions at the same locations when updating predicate trees */ ModelVector thrd_loc_inst_map; - void init_maps(thread_id_t tid); - void reset_maps(thread_id_t tid); + void init_local_maps(thread_id_t tid); + void reset_local_maps(thread_id_t tid); void infer_predicates(FuncInst * next_inst, ModelAction * next_act, SnapVector * half_pred_expressions); void generate_predicates(Predicate * curr_pred, FuncInst * next_inst, SnapVector * half_pred_expressions); @@ -126,11 +129,15 @@ private: /* Run-time position in the predicate tree for each thread * The inner vector is used to deal with recursive functions. */ - ModelVector< ModelVector * > predicate_tree_position; + ModelVector< ModelVector * > thrd_predicate_tree_position; + + ModelVector< ModelVector * > thrd_predicate_trace; + + void init_predicate_tree_data_structure(thread_id_t tid); + void reset_predicate_tree_data_structure(thread_id_t tid); PredSet predicate_leaves; ModelVector leaves_tmp_storage; - ModelVector weight_debug_vec; PredSet failed_predicates; /* Store the relation between this FuncNode and other FuncNodes */ @@ -139,8 +146,7 @@ private: /* FuncNodes that follow this node */ ModelList out_edges; - void assign_initial_weight(); - void update_predicate_tree_weight(); + void update_predicate_tree_weight(thread_id_t tid); }; #endif /* __FUNCNODE_H__ */