X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=fuzzer.h;h=65210e09ae8e147693d3b5300e4c5db3ff766cc6;hb=HEAD;hp=a6318d04ff941aada044e7a81f757c1185c56ea1;hpb=5b68754a2ba2c75dccfff9d64ae0aa1069c8e3fe;p=c11tester.git diff --git a/fuzzer.h b/fuzzer.h index a6318d04..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, 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 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