ClearBlue
SailfishCSOutSummaryBuilder.h
1 //
2 // Created by yongchao on 12/26/22.
3 //
4 
5 #ifndef CLEARBLUE_SAILFISHCSOUTSUMMARYBUILDER_H
6 #define CLEARBLUE_SAILFISHCSOUTSUMMARYBUILDER_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 private:
20  std::vector<std::pair<const SEGCallSiteOutputNode *, OutputSummary *>>
21  CSOutSummaryVec;
22 
23 public:
25  : SailfishFunctionChecker(P, F) {
26  time(&start_time);
27  }
28  virtual ~SailfishCSOutSummaryBuilder() {
29  time_t curr_time;
30  time(&curr_time);
31  PTL->Statistics.emplace_back(F->getName(), "CSOut", CSOutSummaryVec.size(),
32  Smry->CSOutSummarySet.size(),
33  (size_t)difftime(curr_time, start_time));
34  }
35 
36  virtual void run() override;
37 
38  virtual void storeSummary(SummaryBase *R) override;
39 
40  void collectOutputSummary(
41  const SymbolicExprGraph *SEG, CBCallGraph *CG,
42  const std::map<const Function *, SailfishSummary *> &FuncSummaryMap);
43 };
44 
45 #endif // CLEARBLUE_SAILFISHCSOUTSUMMARYBUILDER_H
SymbolicExprGraph
Definition: SymbolicExprGraph.h:708
SailfishChecker
Definition: SailfishChecker.h:42
SailfishCSOutSummaryBuilder
Definition: SailfishCSOutSummaryBuilder.h:13
SailfishFunctionChecker
Definition: SailfishFunctionChecker.h:22