ClearBlue
SailfishErSrcSummaryBuilder.h
1 //
2 // Created by yongchao on 12/26/22.
3 //
4 
5 #ifndef CLEARBLUE_SAILFISHERSRCSUMMARYBUILDER_H
6 #define CLEARBLUE_SAILFISHERSRCSUMMARYBUILDER_H
7 
8 #include "Checker/PSA/TraceSummary.h"
9 #include "Checker/Sailfish/SailfishFunctionChecker.h"
10 
11 using namespace llvm;
12 
14 private:
15  time_t start_time;
16 
17 public:
19  : SailfishFunctionChecker(P, F) {
20  time(&start_time);
21  }
22  virtual ~SailfishErSrcSummaryBuilder() {
23  size_t NumSrc = 0;
24  std::for_each(
25  Sources.begin(), Sources.end(),
26  [&NumSrc](const std::pair<const SEGSiteBase *,
27  std::set<const SEGOperandNode *>> &It) {
28  NumSrc += It.second.size();
29  });
30 
31  time_t curr_time;
32  time(&curr_time);
33  PTL->Statistics.emplace_back(F->getName(), "ErSrc", NumSrc,
34  Smry->ErSrcSummarySet.size(),
35  (size_t)difftime(curr_time, start_time));
36  }
37 
38  virtual void run() override;
39 
40  virtual void storeSummary(SummaryBase *R) override;
41 };
42 
43 #endif // CLEARBLUE_SAILFISHERSRCSUMMARYBUILDER_H
SailfishErSrcSummaryBuilder
Definition: SailfishErSrcSummaryBuilder.h:13
SailfishChecker
Definition: SailfishChecker.h:42
SailfishFunctionChecker
Definition: SailfishFunctionChecker.h:22
SEGSiteBase
Definition: SymbolicExprGraph.h:663