Fix
[c11tester.git] / newfuzzer.h
index d1037a61f5481378c46d5f317d0c071ba7afdb82..ecab8f216f96443734b732eff6165e79f57d56cd 100644 (file)
@@ -5,12 +5,12 @@
 #include "classlist.h"
 #include "mymemory.h"
 #include "stl-model.h"
+#include "predicatetypes.h"
 
 class NewFuzzer : public Fuzzer {
 public:
        NewFuzzer();
        int selectWrite(ModelAction *read, SnapVector<ModelAction *>* rf_set);
-       Predicate * get_selected_child_branch(thread_id_t tid);
        bool has_paused_threads();
        void notify_paused_thread(Thread * thread);
 
@@ -33,8 +33,10 @@ private:
        SnapVector<Predicate *> thrd_selected_child_branch;
        SnapVector< SnapVector<ModelAction *> *> thrd_pruned_writes;
 
+       Predicate * get_selected_child_branch(thread_id_t tid);
        bool prune_writes(thread_id_t tid, Predicate * pred, SnapVector<ModelAction *> * rf_set, inst_act_map_t * inst_act_map);
        Predicate * selectBranch(thread_id_t tid, Predicate * curr_pred, FuncInst * read_inst);
+       int choose_index(SnapVector<Predicate *> * branches, uint32_t numerator);
 
        /* The set of Threads put to sleep by NewFuzzer because no writes in rf_set satisfies the selected predicate. Only used by selectWrite.
         */
@@ -43,9 +45,11 @@ private:
        HashTable<Predicate *, bool, uintptr_t, 0> failed_predicates;
 
        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);
 };
 
 #endif /* end of __NEWFUZZER_H__ */