X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=fuzzer.h;h=0d5734d0f193d517209cd34ae46d9ff1454d3a68;hb=51ee3f71895aafae7e7292174862b3ad42c801a6;hp=572190e1b35bc4df9437836f96e62667a2dfdf5b;hpb=54210d33af73ae7c74f2d416ab0e7bd472379e12;p=c11tester.git diff --git a/fuzzer.h b/fuzzer.h index 572190e1..0d5734d0 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(int * threadlist, int numthreads); + virtual int selectWrite(ModelAction *read, SnapVector* rf_set); + virtual Predicate * get_selected_child_branch(thread_id_t tid) = 0; + 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; + SNAPSHOTALLOC private: }; #endif