move codes around in history.cc, and NewFuzzer::selectWrite is half working
[c11tester.git] / fuzzer.h
index 14d875d7827a2cf64c86f4abcf6838d56d7c00e9..56e40a984c8eaeeacefae1b352610edb0f9b876d 100644 (file)
--- a/fuzzer.h
+++ b/fuzzer.h
@@ -3,14 +3,19 @@
 #include "classlist.h"
 #include "mymemory.h"
 #include "stl-model.h"
+#include "threads-model.h"
 
 class Fuzzer {
 public:
-  Fuzzer() {}
-  ModelAction * selectWrite(ModelAction *read, ModelVector<ModelAction *>* rf_set);
-  Thread * selectThread(Node *n, int * threadlist, int numthreads);
-  Thread * selectNotify(action_list_t * waiters);
-  MEMALLOC
+       Fuzzer() {}
+       virtual int selectWrite(ModelAction *read, SnapVector<ModelAction *>* rf_set);
+       virtual Predicate * get_selected_child_branch(thread_id_t tid) = 0;
+       Thread * selectThread(int * threadlist, int numthreads);
+       Thread * selectNotify(action_list_t * waiters);
+       bool shouldSleep(const ModelAction *sleep);
+       bool shouldWake(const ModelAction *sleep);
+       virtual void register_engine(ModelHistory * history, ModelExecution * execution) = 0;
+       MEMALLOC
 private:
 };
 #endif