X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=fuzzer.h;h=c5248d726310b8bab5db32b80e0fccc2bbd0556a;hp=a6318d04ff941aada044e7a81f757c1185c56ea1;hb=a7b4dab68db8b1fc466a7ca4098d5a6fb006e353;hpb=5b68754a2ba2c75dccfff9d64ae0aa1069c8e3fe diff --git a/fuzzer.h b/fuzzer.h index a6318d04..c5248d72 100644 --- a/fuzzer.h +++ b/fuzzer.h @@ -3,14 +3,22 @@ #include "classlist.h" #include "mymemory.h" #include "stl-model.h" +#include "threads-model.h" class Fuzzer { public: - Fuzzer() {} - int selectWrite(ModelAction *read, ModelVector* rf_set); - Thread * selectThread(Node *n, int * threadlist, int numthreads); - Thread * selectNotify(action_list_t * waiters); - MEMALLOC + Fuzzer() {} + 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); + 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; + SNAPSHOTALLOC private: }; #endif