-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathscanalysis.h
51 lines (46 loc) · 1.39 KB
/
scanalysis.h
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef SCANALYSIS_H
#define SCANALYSIS_H
#include "traceanalysis.h"
#include "hashtable.h"
struct sc_statistics {
unsigned long long elapsedtime;
unsigned int sccount;
unsigned int nonsccount;
};
class SCAnalysis : public TraceAnalysis {
public:
SCAnalysis();
~SCAnalysis();
virtual void setExecution(ModelExecution * execution);
virtual void analyze(action_list_t *);
virtual const char * name();
virtual bool option(char *);
virtual void finish();
SNAPSHOTALLOC
private:
void update_stats();
void print_list(action_list_t *list);
int buildVectors(action_list_t *);
bool updateConstraints(ModelAction *act);
void computeCV(action_list_t *);
action_list_t * generateSC(action_list_t *);
bool processRead(ModelAction *read, ClockVector *cv);
int getNextActions(ModelAction **array);
bool merge(ClockVector *cv, const ModelAction *act, const ModelAction *act2);
void check_rf(action_list_t *list);
void reset(action_list_t *list);
ModelAction* pruneArray(ModelAction**, int);
int maxthreads;
HashTable<const ModelAction *, ClockVector *, uintptr_t, 4 > cvmap;
bool cyclic;
HashTable<const ModelAction *, const ModelAction *, uintptr_t, 4 > badrfset;
HashTable<void *, const ModelAction *, uintptr_t, 4 > lastwrmap;
SnapVector<action_list_t> threadlists;
ModelExecution *execution;
bool print_always;
bool print_buggy;
bool print_nonsc;
bool time;
struct sc_statistics *stats;
};
#endif