X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=fuzzer.h;h=d31c22673a4aab928a614075490e79b1362dd9cf;hb=f5d5c517f482c639d5daa579dfdc840d19eecea5;hp=a6318d04ff941aada044e7a81f757c1185c56ea1;hpb=5b68754a2ba2c75dccfff9d64ae0aa1069c8e3fe;p=c11tester.git diff --git a/fuzzer.h b/fuzzer.h index a6318d04..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, 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; + virtual Predicate * get_selected_child_branch(thread_id_t tid) = 0; + SNAPSHOTALLOC private: }; #endif