forked from bajinsheng/SGFuzz
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFuzzerStateMachine.h
More file actions
35 lines (27 loc) · 834 Bytes
/
FuzzerStateMachine.h
File metadata and controls
35 lines (27 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "FuzzerDefs.h"
#include "robin_hood.h"
namespace fuzzer {
class StateMachine {
public:
StateMachine(uint32_t state_name, uint32_t state_value, StateMachine *p);
~StateMachine();
StateMachine* get_parent();
uint64_t get_hits();
size_t sum_hits();
size_t get_num_leaves();
std::string get_id();
void print(uint32_t indent);
uint32_t state_name;
uint32_t state_value;
uint64_t hits;
StateMachine *parent;
robin_hood::unordered_map<uint32_t, StateMachine*> children;
};
extern robin_hood::unordered_map<uint32_t, uint32_t> SM_state_map;
extern uint32_t SM_num;
extern StateMachine *SM_root;
extern StateMachine *SM_cur_node;
extern Vector<StateMachine*> SM_visited_states;
extern bool SM_added_states;
void SM_reset();
}