X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=fuzzer.h;h=65210e09ae8e147693d3b5300e4c5db3ff766cc6;hb=HEAD;hp=6cf1efbad26352782e4a45b985654e8f52069a1b;hpb=5d0368dd546d03580ae69f8058a3a4fdc31de83b;p=c11tester.git diff --git a/fuzzer.h b/fuzzer.h index 6cf1efba..65210e09 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); - Thread * selectNotify(action_list_t * waiters); - MEMALLOC + virtual int selectWrite(ModelAction *read, SnapVector* rf_set); + virtual bool has_paused_threads() { return false; } + virtual Thread * selectThread(int * threadlist, int numthreads); + + Thread * selectNotify(simple_action_list_t * waiters); + bool shouldSleep(const ModelAction *sleep); + bool shouldWake(const ModelAction *sleep); + virtual bool waitShouldFail(ModelAction *wait); + bool waitShouldWakeUp(const ModelAction *wait); + bool randomizeWaitTime(ModelAction * timed_wait); + virtual void register_engine(ModelChecker * _model, ModelExecution * execution) {} + SNAPSHOTALLOC private: }; #endif