X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=newfuzzer.h;h=26fab3f6c2fff4e0ed995e4d68a8dd7733ecb5f5;hp=76f13ce64e983bceb845923f81524adcd84d2221;hb=251ac4b4bf3a9f2d3cfacc1e6618200ca1c431ac;hpb=fcc90758629b11f123081c80bb3c37e7ca2a4608 diff --git a/newfuzzer.h b/newfuzzer.h index 76f13ce6..26fab3f6 100644 --- a/newfuzzer.h +++ b/newfuzzer.h @@ -29,12 +29,13 @@ public: void notify_paused_thread(Thread * thread); Thread * selectThread(int * threadlist, int numthreads); - Thread * selectNotify(action_list_t * waiters); + Thread * selectNotify(simple_action_list_t * waiters); bool shouldSleep(const ModelAction * sleep); bool shouldWake(const ModelAction * sleep); bool shouldWait(const ModelAction * wait); - void register_engine(ModelHistory * history, ModelExecution * execution); + void register_engine(ModelChecker * model, ModelExecution * execution); + Predicate * get_selected_child_branch(thread_id_t tid); SNAPSHOTALLOC private: @@ -44,31 +45,26 @@ private: SnapVector thrd_last_read_act; SnapVector thrd_last_func_inst; + SnapVector available_branches_tmp_storage; SnapVector thrd_selected_child_branch; SnapVector< SnapVector *> thrd_pruned_writes; - void check_store_visibility(Predicate * curr_pred, FuncInst * read_inst, inst_act_map_t * inst_act_map, SnapVector * rf_set); + bool check_branch_inst(Predicate * curr_pred, FuncInst * read_inst, SnapVector * rf_set); Predicate * selectBranch(thread_id_t tid, Predicate * curr_pred, FuncInst * read_inst); - Predicate * get_selected_child_branch(thread_id_t tid); - bool prune_writes(thread_id_t tid, Predicate * pred, SnapVector * rf_set, inst_act_map_t * inst_act_map); - int choose_index(SnapVector * branches, uint32_t numerator); + bool prune_writes(thread_id_t tid, Predicate * pred, SnapVector * rf_set); + int choose_branch_index(SnapVector * branches); /* The set of Threads put to sleep by NewFuzzer because no writes in rf_set satisfies the selected predicate. Only used by selectWrite. */ SnapVector paused_thread_list; //-- (not in use) HashTable paused_thread_table; //-- - HashTable failed_predicates; SnapVector dist_info_vec; //-- void conditional_sleep(Thread * thread); //-- - bool should_conditional_sleep(Predicate * predicate); void wake_up_paused_threads(int * threadlist, int * numthreads); //-- bool find_threads(ModelAction * pending_read); //-- - /*-- void update_predicate_score(Predicate * predicate, sleep_result_t type); */ - - bool check_predicate_expressions(PredExprSet * pred_expressions, inst_act_map_t * inst_act_map, uint64_t write_val, bool * no_predicate); }; #endif /* end of __NEWFUZZER_H__ */