X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=fuzzer.h;h=d31c22673a4aab928a614075490e79b1362dd9cf;hp=6cf1efbad26352782e4a45b985654e8f52069a1b;hb=7d703e06ecec3abb3c173378e18ad6c28eb6f3d7;hpb=5d0368dd546d03580ae69f8058a3a4fdc31de83b diff --git a/fuzzer.h b/fuzzer.h index 6cf1efba..d31c2267 100644 --- a/fuzzer.h +++ b/fuzzer.h @@ -3,14 +3,23 @@ #include "classlist.h" #include "mymemory.h" #include "stl-model.h" +#include "threads-model.h" class Fuzzer { public: Fuzzer() {} - int selectWrite(ModelAction *read, SnapVector* rf_set); - Thread * selectThread(Node *n, int * threadlist, int numthreads); + virtual int selectWrite(ModelAction *read, SnapVector* rf_set); + virtual bool has_paused_threads() { return false; } + virtual void notify_paused_thread(Thread * thread) = 0; + virtual Thread * selectThread(int * threadlist, int numthreads); + Thread * selectNotify(action_list_t * waiters); - MEMALLOC + bool shouldSleep(const ModelAction *sleep); + bool shouldWake(const ModelAction *sleep); + virtual bool shouldWait(const ModelAction *wait) = 0; + virtual void register_engine(ModelHistory * history, ModelExecution * execution) = 0; + virtual Predicate * get_selected_child_branch(thread_id_t tid) = 0; + SNAPSHOTALLOC private: }; #endif