only select a new predicate branch when new read actions are processed
[c11tester.git] / newfuzzer.h
1 #ifndef __NEWFUZZER_H__
2 #define __NEWFUZZER_H__
3
4 #include "fuzzer.h"
5 #include "classlist.h"
6 #include "mymemory.h"
7 #include "stl-model.h"
8
9 class NewFuzzer : public Fuzzer {
10 public:
11         NewFuzzer();
12         int selectWrite(ModelAction *read, SnapVector<ModelAction *>* rf_set);
13         void selectBranch(int thread_id, Predicate * curr_pred, FuncInst * read_inst);
14
15         Thread * selectThread(int * threadlist, int numthreads);
16         Thread * selectNotify(action_list_t * waiters);
17         bool shouldSleep(const ModelAction *sleep);
18         bool shouldWake(const ModelAction *sleep);
19
20         void register_engine(ModelHistory * history, ModelExecution * execution);
21
22         MEMALLOC
23 private:
24         ModelHistory * history;
25         ModelExecution * execution;
26
27         SnapVector<ModelAction *> thrd_last_read_act;
28         SnapVector<Predicate *> thrd_curr_pred;
29         SnapVector<Predicate *> thrd_selected_child_branch;
30 };
31
32 #endif /* end of __NEWFUZZER_H__ */