svf-lib 1.0.2539 → 1.0.2541

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,6 +31,7 @@
31
31
  #pragma once
32
32
  #include "AE/Core/AbstractState.h"
33
33
  #include "AE/Core/ICFGWTO.h"
34
+ #include "AE/Svfexe/AbstractStateManager.h"
34
35
  #include "AE/Svfexe/AEDetector.h"
35
36
  #include "AE/Svfexe/PreAnalysis.h"
36
37
  #include "AE/Svfexe/AbsExtAPI.h"
@@ -73,6 +74,13 @@ public:
73
74
  * if set WIDEN_ONLY, result = [10000, +oo] since only widening is applied at the cycle head of recursive functions without narrowing.
74
75
  * if set WIDEN_NARROW, result = [10000, 10000] since both widening and narrowing are applied at the cycle head of recursive functions.
75
76
  * */
77
+ enum AESparsity
78
+ {
79
+ Dense,
80
+ SemiSparse,
81
+ Sparse
82
+ };
83
+
76
84
  enum HandleRecur
77
85
  {
78
86
  TOP,
@@ -115,43 +123,45 @@ public:
115
123
  return svfir->getSVFVar(varId);
116
124
  }
117
125
 
118
- /// Retrieve abstract value for a top-level variable at a given ICFG node
119
- const AbstractValue& getAbstractValue(const ValVar* var);
126
+ /// Get the state manager instance.
127
+ AbstractStateManager* getStateMgr()
128
+ {
129
+ return svfStateMgr;
130
+ }
120
131
 
121
- /// Retrieve abstract value for an address-taken variable at a given ICFG node
122
- const AbstractValue& getAbstractValue(const ICFGNode* node, const ObjVar* var);
132
+ // ---------------------------------------------------------------
133
+ // Convenience wrappers around AbstractStateManager
134
+ // ---------------------------------------------------------------
135
+ /// Read-only access to a node's AbstractState. Mutations must go through
136
+ /// updateAbsState (to replace) or updateAbsValue (to update one variable).
137
+ inline const AbstractState& getAbsState(const ICFGNode* node) const
138
+ {
139
+ return svfStateMgr->getAbstractState(node);
140
+ }
123
141
 
124
- /// Retrieve abstract value for any SVF variable at a given ICFG node
125
- const AbstractValue& getAbstractValue(const ICFGNode* node, const SVFVar* var);
142
+ inline bool hasAbsState(const ICFGNode* node)
143
+ {
144
+ return svfStateMgr->hasAbstractState(node);
145
+ }
126
146
 
127
- /// Set abstract value for a top-level variable at a given ICFG node
128
- void updateAbstractValue(const ValVar* var, const AbstractValue& val);
147
+ inline void updateAbsState(const ICFGNode* node, const AbstractState& state)
148
+ {
149
+ svfStateMgr->updateAbstractState(node, state);
150
+ }
129
151
 
130
- /// Set abstract value for an address-taken variable at a given ICFG node
131
- void updateAbstractValue(const ICFGNode* node, const ObjVar* var, const AbstractValue& val);
152
+ inline const AbstractValue& getAbsValue(const SVFVar* var, const ICFGNode* node)
153
+ {
154
+ return svfStateMgr->getAbstractValue(var, node);
155
+ }
132
156
 
133
- /// Set abstract value for any SVF variable at a given ICFG node
134
- void updateAbstractValue(const ICFGNode* node, const SVFVar* var, const AbstractValue& val);
157
+ inline void updateAbsValue(const SVFVar* var, const AbstractValue& val, const ICFGNode* node)
158
+ {
159
+ svfStateMgr->updateAbstractValue(var, val, node);
160
+ }
135
161
 
136
- /// Propagate an ObjVar's abstract value from defSite to all its use-site ICFGNodes via SVFG
162
+ /// Propagate an ObjVar's abstract value from defSite to all its use-sites.
137
163
  void propagateObjVarAbsVal(const ObjVar* var, const ICFGNode* defSite);
138
164
 
139
- /// Retrieve the abstract state from the trace for a given ICFG node; asserts if no trace exists
140
- AbstractState& getAbstractState(const ICFGNode* node);
141
-
142
- /// Check if an abstract state exists in the trace for a given ICFG node
143
- bool hasAbstractState(const ICFGNode* node);
144
-
145
- /// Retrieve abstract state filtered to specific top-level variables
146
- void getAbstractState(const ICFGNode* node, const Set<const ValVar*>& vars, AbstractState& result);
147
-
148
- /// Retrieve abstract state filtered to specific address-taken variables
149
- void getAbstractState(const ICFGNode* node, const Set<const ObjVar*>& vars, AbstractState& result);
150
-
151
- /// Retrieve abstract state filtered to specific SVF variables
152
- void getAbstractState(const ICFGNode* node, const Set<const SVFVar*>& vars, AbstractState& result);
153
-
154
-
155
165
  private:
156
166
  /// Initialize abstract state for the global ICFG node and process global statements
157
167
  virtual void handleGlobalNode();
@@ -161,8 +171,8 @@ private:
161
171
  /// abstractTrace[node]. Returns true if at least one predecessor had state.
162
172
  bool mergeStatesFromPredecessors(const ICFGNode* node);
163
173
 
164
- /// Check if the branch on intraEdge is feasible under abstract state as
165
- bool isBranchFeasible(const IntraCFGEdge* intraEdge, AbstractState& as);
174
+ /// Returns true if the branch is reachable; narrows as in-place.
175
+ bool isBranchFeasible(const IntraCFGEdge* edge, AbstractState& as);
166
176
 
167
177
  /// Handle a call site node: dispatch to ext-call, direct-call, or indirect-call handling
168
178
  virtual void handleCallSite(const ICFGNode* node);
@@ -179,15 +189,11 @@ private:
179
189
  /// Dispatch an SVF statement (Addr/Binary/Cmp/Load/Store/Copy/Gep/Select/Phi/Call/Ret) to its handler
180
190
  virtual void handleSVFStatement(const SVFStmt* stmt);
181
191
 
182
- /// Set all store targets and return value to TOP for a recursive call node
183
- virtual void setTopToObjInRecursion(const CallICFGNode* callnode);
192
+ /// Returns true if the cmp-conditional branch is feasible; narrows as in-place.
193
+ bool isCmpBranchFeasible(const IntraCFGEdge* edge, AbstractState& as);
184
194
 
185
- /// Check if cmpStmt with successor value succ is feasible; refine intervals in as accordingly
186
- bool isCmpBranchFeasible(const CmpStmt* cmpStmt, s64_t succ,
187
- AbstractState& as);
188
-
189
- /// Check if switch branch with case value succ is feasible; refine intervals in as accordingly
190
- bool isSwitchBranchFeasible(const SVFVar* var, s64_t succ, AbstractState& as);
195
+ /// Returns true if the switch branch is feasible; narrows as in-place.
196
+ bool isSwitchBranchFeasible(const IntraCFGEdge* edge, AbstractState& as);
191
197
 
192
198
  void updateStateOnAddr(const AddrStmt *addr);
193
199
 
@@ -211,7 +217,6 @@ private:
211
217
 
212
218
  void updateStateOnPhi(const PhiStmt *phi);
213
219
 
214
-
215
220
  /// protected data members, also used in subclasses
216
221
  SVFIR* svfir;
217
222
  /// Execution State, used to store the Interval Value of every SVF variable
@@ -232,7 +237,7 @@ private:
232
237
  virtual bool isExtCall(const CallICFGNode* callNode);
233
238
  virtual void handleExtCall(const CallICFGNode* callNode);
234
239
  virtual bool isRecursiveFun(const FunObjVar* fun);
235
- virtual void handleRecursiveCall(const CallICFGNode *callNode);
240
+ virtual void skipRecursionWithTop(const CallICFGNode *callNode);
236
241
  virtual bool isRecursiveCallSite(const CallICFGNode* callNode, const FunObjVar *);
237
242
  virtual void handleFunCall(const CallICFGNode* callNode);
238
243
 
@@ -243,60 +248,13 @@ private:
243
248
  // there data should be shared with subclasses
244
249
  Map<std::string, std::function<void(const CallICFGNode*)>> func_map;
245
250
 
246
- Map<const ICFGNode*, AbstractState> abstractTrace; // abstract states for nodes
251
+ AbstractStateManager* svfStateMgr{nullptr}; // state management (owns abstractTrace)
247
252
  Set<const ICFGNode*> allAnalyzedNodes; // All nodes ever analyzed (across all entry points)
248
253
  std::string moduleName;
249
254
 
250
255
  std::vector<std::unique_ptr<AEDetector>> detectors;
251
256
  AbsExtAPI* utils;
252
257
 
253
- // according to varieties of cmp insts,
254
- // maybe var X var, var X const, const X var, const X const
255
- // we accept 'var X const' 'var X var' 'const X const'
256
- // if 'const X var', we need to reverse op0 op1 and its predicate 'var X' const'
257
- // X' is reverse predicate of X
258
- // == -> !=, != -> ==, > -> <=, >= -> <, < -> >=, <= -> >
259
-
260
- Map<s32_t, s32_t> _reverse_predicate =
261
- {
262
- {CmpStmt::Predicate::FCMP_OEQ, CmpStmt::Predicate::FCMP_ONE}, // == -> !=
263
- {CmpStmt::Predicate::FCMP_UEQ, CmpStmt::Predicate::FCMP_UNE}, // == -> !=
264
- {CmpStmt::Predicate::FCMP_OGT, CmpStmt::Predicate::FCMP_OLE}, // > -> <=
265
- {CmpStmt::Predicate::FCMP_OGE, CmpStmt::Predicate::FCMP_OLT}, // >= -> <
266
- {CmpStmt::Predicate::FCMP_OLT, CmpStmt::Predicate::FCMP_OGE}, // < -> >=
267
- {CmpStmt::Predicate::FCMP_OLE, CmpStmt::Predicate::FCMP_OGT}, // <= -> >
268
- {CmpStmt::Predicate::FCMP_ONE, CmpStmt::Predicate::FCMP_OEQ}, // != -> ==
269
- {CmpStmt::Predicate::FCMP_UNE, CmpStmt::Predicate::FCMP_UEQ}, // != -> ==
270
- {CmpStmt::Predicate::ICMP_EQ, CmpStmt::Predicate::ICMP_NE}, // == -> !=
271
- {CmpStmt::Predicate::ICMP_NE, CmpStmt::Predicate::ICMP_EQ}, // != -> ==
272
- {CmpStmt::Predicate::ICMP_UGT, CmpStmt::Predicate::ICMP_ULE}, // > -> <=
273
- {CmpStmt::Predicate::ICMP_ULT, CmpStmt::Predicate::ICMP_UGE}, // < -> >=
274
- {CmpStmt::Predicate::ICMP_UGE, CmpStmt::Predicate::ICMP_ULT}, // >= -> <
275
- {CmpStmt::Predicate::ICMP_SGT, CmpStmt::Predicate::ICMP_SLE}, // > -> <=
276
- {CmpStmt::Predicate::ICMP_SLT, CmpStmt::Predicate::ICMP_SGE}, // < -> >=
277
- {CmpStmt::Predicate::ICMP_SGE, CmpStmt::Predicate::ICMP_SLT}, // >= -> <
278
- };
279
-
280
-
281
- Map<s32_t, s32_t> _switch_lhsrhs_predicate =
282
- {
283
- {CmpStmt::Predicate::FCMP_OEQ, CmpStmt::Predicate::FCMP_OEQ}, // == -> ==
284
- {CmpStmt::Predicate::FCMP_UEQ, CmpStmt::Predicate::FCMP_UEQ}, // == -> ==
285
- {CmpStmt::Predicate::FCMP_OGT, CmpStmt::Predicate::FCMP_OLT}, // > -> <
286
- {CmpStmt::Predicate::FCMP_OGE, CmpStmt::Predicate::FCMP_OLE}, // >= -> <=
287
- {CmpStmt::Predicate::FCMP_OLT, CmpStmt::Predicate::FCMP_OGT}, // < -> >
288
- {CmpStmt::Predicate::FCMP_OLE, CmpStmt::Predicate::FCMP_OGE}, // <= -> >=
289
- {CmpStmt::Predicate::FCMP_ONE, CmpStmt::Predicate::FCMP_ONE}, // != -> !=
290
- {CmpStmt::Predicate::FCMP_UNE, CmpStmt::Predicate::FCMP_UNE}, // != -> !=
291
- {CmpStmt::Predicate::ICMP_EQ, CmpStmt::Predicate::ICMP_EQ}, // == -> ==
292
- {CmpStmt::Predicate::ICMP_NE, CmpStmt::Predicate::ICMP_NE}, // != -> !=
293
- {CmpStmt::Predicate::ICMP_UGT, CmpStmt::Predicate::ICMP_ULT}, // > -> <
294
- {CmpStmt::Predicate::ICMP_ULT, CmpStmt::Predicate::ICMP_UGT}, // < -> >
295
- {CmpStmt::Predicate::ICMP_UGE, CmpStmt::Predicate::ICMP_ULE}, // >= -> <=
296
- {CmpStmt::Predicate::ICMP_SGT, CmpStmt::Predicate::ICMP_SLT}, // > -> <
297
- {CmpStmt::Predicate::ICMP_SLT, CmpStmt::Predicate::ICMP_SGT}, // < -> >
298
- {CmpStmt::Predicate::ICMP_SGE, CmpStmt::Predicate::ICMP_SLE}, // >= -> <=
299
- };
300
258
 
301
259
  };
302
260
  }
@@ -0,0 +1,172 @@
1
+ //===- AbstractStateManager.h -- State management for abstract execution --//
2
+ //
3
+ // SVF: Static Value-Flow Analysis
4
+ //
5
+ // Copyright (C) <2013-> <Yulei Sui>
6
+ //
7
+
8
+ // This program is free software: you can redistribute it and/or modify
9
+ // it under the terms of the GNU Affero General Public License as published by
10
+ // the Free Software Foundation, either version 3 of the License, or
11
+ // (at your option) any later version.
12
+
13
+ // This program is distributed in the hope that it will be useful,
14
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ // GNU Affero General Public License for more details.
17
+
18
+ // You should have received a copy of the GNU Affero General Public License
19
+ // along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ //
21
+ //===----------------------------------------------------------------------===//
22
+ //
23
+ // Created on: Mar 2026
24
+ // Author: Jiawei Wang
25
+ //
26
+ #pragma once
27
+ #include "AE/Core/AbstractState.h"
28
+ #include "SVFIR/SVFIR.h"
29
+
30
+ namespace SVF
31
+ {
32
+
33
+ class GepStmt;
34
+ class AddrStmt;
35
+ class SVFG;
36
+ class AndersenWaveDiff;
37
+
38
+ /// Manages abstract states across ICFG nodes and provides a unified API
39
+ /// for reading/writing abstract values. Encapsulates the dense vs.
40
+ /// semi-sparse lookup strategy so that all consumers (updateStateOnXxx,
41
+ /// AEDetector, AbsExtAPI) are sparsity-agnostic.
42
+ ///
43
+ /// Two sparsity-dependent behaviors live here:
44
+ /// 1. getAbstractValue(ValVar*): dense reads from current node's state;
45
+ /// semi-sparse pulls from def-site.
46
+ /// 2. joinWith (inside AbstractState): dense merges all variables;
47
+ /// semi-sparse skips ValVar merge.
48
+ class AbstractStateManager
49
+ {
50
+ public:
51
+ AbstractStateManager(SVFIR* svfir, AndersenWaveDiff* pta);
52
+ ~AbstractStateManager();
53
+
54
+ // ===----------------------------------------------------------------------===//
55
+ // Abstract Value Access API
56
+ // ===----------------------------------------------------------------------===//
57
+
58
+ /// Read a top-level variable's abstract value.
59
+ /// Dense: reads from abstractTrace[node]. Semi-sparse: checks current state
60
+ /// first, then pulls from def-site. Returns top if absent everywhere.
61
+ const AbstractValue& getAbstractValue(const ValVar* var, const ICFGNode* node);
62
+
63
+ /// Read an address-taken variable's content via virtual-address load.
64
+ const AbstractValue& getAbstractValue(const ObjVar* var, const ICFGNode* node);
65
+
66
+ /// Dispatch to ValVar or ObjVar overload (checks ObjVar first due to inheritance).
67
+ const AbstractValue& getAbstractValue(const SVFVar* var, const ICFGNode* node);
68
+
69
+ /// Write a top-level variable's abstract value into abstractTrace[node].
70
+ void updateAbstractValue(const ValVar* var, const AbstractValue& val, const ICFGNode* node);
71
+
72
+ /// Write an address-taken variable's content via virtual-address store.
73
+ void updateAbstractValue(const ObjVar* var, const AbstractValue& val, const ICFGNode* node);
74
+
75
+ /// Dispatch to ValVar or ObjVar overload.
76
+ void updateAbstractValue(const SVFVar* var, const AbstractValue& val, const ICFGNode* node);
77
+
78
+ // ===----------------------------------------------------------------------===//
79
+ // State Access
80
+ // ===----------------------------------------------------------------------===//
81
+
82
+ /// Retrieve the abstract state for a given ICFG node. Asserts if absent.
83
+ AbstractState& getAbstractState(const ICFGNode* node);
84
+ void updateAbstractState(const ICFGNode* node, const AbstractState& state);
85
+
86
+ /// Check if an abstract state exists for a given ICFG node.
87
+ bool hasAbstractState(const ICFGNode* node);
88
+
89
+ /// Retrieve abstract state filtered to specific variable sets.
90
+ void getAbstractState(const Set<const ValVar*>& vars, AbstractState& result, const ICFGNode* node);
91
+ void getAbstractState(const Set<const ObjVar*>& vars, AbstractState& result, const ICFGNode* node);
92
+ void getAbstractState(const Set<const SVFVar*>& vars, AbstractState& result, const ICFGNode* node);
93
+
94
+ // ===----------------------------------------------------------------------===//
95
+ // GEP Helpers
96
+ //
97
+ // Lifted from AbstractState to use getAbstractValue for index variable lookup.
98
+ // ===----------------------------------------------------------------------===//
99
+
100
+ /// Compute the flattened element index for a GepStmt.
101
+ IntervalValue getGepElementIndex(const GepStmt* gep);
102
+
103
+ /// Compute the byte offset for a GepStmt.
104
+ IntervalValue getGepByteOffset(const GepStmt* gep);
105
+
106
+ /// Compute GEP object addresses for a pointer at a given element offset.
107
+ AddressValue getGepObjAddrs(const ValVar* pointer, IntervalValue offset);
108
+
109
+ // ===----------------------------------------------------------------------===//
110
+ // Load / Store through pointer (combines ValVar lookup + ObjVar access)
111
+ // ===----------------------------------------------------------------------===//
112
+
113
+ /// Load value through a pointer: resolve pointer's address set via
114
+ /// getAbstractValue (sparsity-aware), then load from each ObjVar address.
115
+ /// @param pointer The pointer SVFVar (ValVar).
116
+ /// @param node The ICFG node providing context.
117
+ /// @return The joined abstract value from all pointed-to objects.
118
+ AbstractValue loadValue(const ValVar* pointer, const ICFGNode* node);
119
+
120
+ /// Store value through a pointer: resolve pointer's address set via
121
+ /// getAbstractValue (sparsity-aware), then store to each ObjVar address.
122
+ /// @param pointer The pointer SVFVar (ValVar).
123
+ /// @param val The value to store.
124
+ /// @param node The ICFG node providing context.
125
+ void storeValue(const ValVar* pointer, const AbstractValue& val, const ICFGNode* node);
126
+
127
+ // ===----------------------------------------------------------------------===//
128
+ // Type / Size Helpers
129
+ // ===----------------------------------------------------------------------===//
130
+
131
+ /// Get the pointee type for a pointer variable.
132
+ const SVFType* getPointeeElement(const ObjVar* var, const ICFGNode* node);
133
+
134
+ /// Get the byte size of a stack allocation.
135
+ u32_t getAllocaInstByteSize(const AddrStmt* addr);
136
+
137
+ // ===----------------------------------------------------------------------===//
138
+ // Direct Trace Access (for merge, fixpoint, etc.)
139
+ // ===----------------------------------------------------------------------===//
140
+
141
+ Map<const ICFGNode*, AbstractState>& getTrace()
142
+ {
143
+ return abstractTrace;
144
+ }
145
+ AbstractState& operator[](const ICFGNode* node)
146
+ {
147
+ return abstractTrace[node];
148
+ }
149
+
150
+ // ===----------------------------------------------------------------------===//
151
+ // Def/Use site queries (sparsity-aware)
152
+ // ===----------------------------------------------------------------------===//
153
+
154
+ /// Given an ObjVar and its use-site ICFGNode, find all downstream use-site ICFGNodes.
155
+ Set<const ICFGNode*> getUseSitesOfObjVar(const ObjVar* obj, const ICFGNode* node) const;
156
+
157
+ /// Given a ValVar, find all use-site ICFGNodes.
158
+ Set<const ICFGNode*> getUseSitesOfValVar(const ValVar* var) const;
159
+
160
+ /// Given a ValVar, find its definition-site ICFGNode.
161
+ const ICFGNode* getDefSiteOfValVar(const ValVar* var) const;
162
+
163
+ /// Given an ObjVar and its use-site ICFGNode, find the definition-site ICFGNode.
164
+ const ICFGNode* getDefSiteOfObjVar(const ObjVar* obj, const ICFGNode* node) const;
165
+
166
+ private:
167
+ SVFIR* svfir;
168
+ SVFG* svfg;
169
+ Map<const ICFGNode*, AbstractState> abstractTrace;
170
+ };
171
+
172
+ } // namespace SVF
@@ -65,25 +65,6 @@ public:
65
65
  {
66
66
  return callGraphSCC;
67
67
  }
68
- SVFG* getSVFG() const
69
- {
70
- return svfg;
71
- }
72
- /// Given an ObjVar and its def-site ICFGNode, find all use-site ICFGNodes
73
- const Set<const ICFGNode*> getUseSitesOfObjVar(const ObjVar* obj, const ICFGNode* node) const;
74
-
75
- /// Given a ValVar, find all use-site ICFGNodes
76
- /// by following outgoing direct VFGEdges from its unique definition SVFGNode
77
- const Set<const ICFGNode*> getUseSitesOfValVar(const ValVar* var) const;
78
-
79
- /// Given a ValVar and its SVFGNode, find the definition-site ICFGNode
80
- /// by following incoming direct VFGEdges (asserts unique definition)
81
- const ICFGNode* getDefSiteOfValVar(const ValVar* var) const;
82
-
83
- /// Given an ObjVar and its use-site ICFGNode, find the definition-site ICFGNode
84
- /// by following incoming IndirectSVFGEdges whose pts contains the ObjVar (asserts unique definition)
85
- const ICFGNode* getDefSiteOfObjVar(const ObjVar* obj, const ICFGNode* node) const;
86
-
87
68
  /// Build WTO for each function using call graph SCC
88
69
  void initWTO();
89
70
 
@@ -93,15 +74,31 @@ public:
93
74
  return funcToWTO;
94
75
  }
95
76
 
77
+ /// Walk every function's WTO and populate cycleToValVars bottom-up.
78
+ /// Called once right after initWTO(). No-op in dense mode.
79
+ void initCycleValVars();
80
+
81
+ /// Look up the ValVar id set of a WTO cycle. Returns nullptr if the
82
+ /// cycle is unknown (e.g. dense mode, where the map is never built).
83
+ const Set<NodeID>* getCycleValVars(const ICFGCycleWTO* cycle) const
84
+ {
85
+ auto it = cycleToValVars.find(cycle);
86
+ return it == cycleToValVars.end() ? nullptr : &it->second;
87
+ }
88
+
96
89
  private:
97
90
  SVFIR* svfir;
98
91
  ICFG* icfg;
99
- SVFG* svfg;
100
92
  AndersenWaveDiff* pta;
101
93
  CallGraph* callGraph;
102
94
  CallGraphSCC* callGraphSCC;
103
95
 
104
96
  Map<const FunObjVar*, const ICFGWTO*> funcToWTO;
97
+
98
+ /// Pre-computed (semi-sparse only) map from a WTO cycle to the IDs of
99
+ /// every ValVar whose def-site is inside that cycle, including all
100
+ /// nested sub-cycles. Empty in dense mode.
101
+ Map<const ICFGCycleWTO*, Set<NodeID>> cycleToValVars;
105
102
  };
106
103
 
107
104
  } // End namespace SVF
@@ -240,7 +240,7 @@ public:
240
240
  static const Option<u32_t> LoopBound;
241
241
 
242
242
  // Abstract Execution
243
- static const Option<bool> SparseAE;
243
+ static const OptionMap<u32_t> AESparsity;
244
244
  static const Option<u32_t> WidenDelay;
245
245
  /// recursion handling mode, Default: TOP
246
246
  static const OptionMap<u32_t> HandleRecur;
@@ -81,7 +81,7 @@ if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
81
81
  FILE_SET "HEADERS"
82
82
  TYPE "HEADERS"
83
83
  BASE_DIRS "${_IMPORT_PREFIX}/include"
84
- FILES "${_IMPORT_PREFIX}/include/AE/Core/AbstractState.h" "${_IMPORT_PREFIX}/include/AE/Core/AbstractValue.h" "${_IMPORT_PREFIX}/include/AE/Core/AddressValue.h" "${_IMPORT_PREFIX}/include/AE/Core/ICFGWTO.h" "${_IMPORT_PREFIX}/include/AE/Core/IntervalValue.h" "${_IMPORT_PREFIX}/include/AE/Core/NumericValue.h" "${_IMPORT_PREFIX}/include/AE/Core/RelExeState.h" "${_IMPORT_PREFIX}/include/AE/Core/RelationSolver.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/AEDetector.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/AEStat.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/AbsExtAPI.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/AbstractInterpretation.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/PreAnalysis.h" "${_IMPORT_PREFIX}/include/CFL/CFGNormalizer.h" "${_IMPORT_PREFIX}/include/CFL/CFGrammar.h" "${_IMPORT_PREFIX}/include/CFL/CFLAlias.h" "${_IMPORT_PREFIX}/include/CFL/CFLBase.h" "${_IMPORT_PREFIX}/include/CFL/CFLGramGraphChecker.h" "${_IMPORT_PREFIX}/include/CFL/CFLGraphBuilder.h" "${_IMPORT_PREFIX}/include/CFL/CFLSVFGBuilder.h" "${_IMPORT_PREFIX}/include/CFL/CFLSolver.h" "${_IMPORT_PREFIX}/include/CFL/CFLStat.h" "${_IMPORT_PREFIX}/include/CFL/CFLVF.h" "${_IMPORT_PREFIX}/include/CFL/GrammarBuilder.h" "${_IMPORT_PREFIX}/include/DDA/ContextDDA.h" "${_IMPORT_PREFIX}/include/DDA/DDAClient.h" "${_IMPORT_PREFIX}/include/DDA/DDAPass.h" "${_IMPORT_PREFIX}/include/DDA/DDAStat.h" "${_IMPORT_PREFIX}/include/DDA/DDAVFSolver.h" "${_IMPORT_PREFIX}/include/DDA/FlowDDA.h" "${_IMPORT_PREFIX}/include/FastCluster/fastcluster.h" "${_IMPORT_PREFIX}/include/Graphs/BasicBlockG.h" "${_IMPORT_PREFIX}/include/Graphs/CDG.h" "${_IMPORT_PREFIX}/include/Graphs/CFLGraph.h" "${_IMPORT_PREFIX}/include/Graphs/CHG.h" "${_IMPORT_PREFIX}/include/Graphs/CallGraph.h" "${_IMPORT_PREFIX}/include/Graphs/ConsG.h" "${_IMPORT_PREFIX}/include/Graphs/ConsGEdge.h" "${_IMPORT_PREFIX}/include/Graphs/ConsGNode.h" "${_IMPORT_PREFIX}/include/Graphs/DOTGraphTraits.h" "${_IMPORT_PREFIX}/include/Graphs/GenericGraph.h" "${_IMPORT_PREFIX}/include/Graphs/GraphPrinter.h" "${_IMPORT_PREFIX}/include/Graphs/GraphTraits.h" "${_IMPORT_PREFIX}/include/Graphs/GraphWriter.h" "${_IMPORT_PREFIX}/include/Graphs/ICFG.h" "${_IMPORT_PREFIX}/include/Graphs/ICFGEdge.h" "${_IMPORT_PREFIX}/include/Graphs/ICFGNode.h" "${_IMPORT_PREFIX}/include/Graphs/ICFGStat.h" "${_IMPORT_PREFIX}/include/Graphs/IRGraph.h" "${_IMPORT_PREFIX}/include/Graphs/SCC.h" "${_IMPORT_PREFIX}/include/Graphs/SVFG.h" "${_IMPORT_PREFIX}/include/Graphs/SVFGEdge.h" "${_IMPORT_PREFIX}/include/Graphs/SVFGNode.h" "${_IMPORT_PREFIX}/include/Graphs/SVFGOPT.h" "${_IMPORT_PREFIX}/include/Graphs/SVFGStat.h" "${_IMPORT_PREFIX}/include/Graphs/ThreadCallGraph.h" "${_IMPORT_PREFIX}/include/Graphs/VFG.h" "${_IMPORT_PREFIX}/include/Graphs/VFGEdge.h" "${_IMPORT_PREFIX}/include/Graphs/VFGNode.h" "${_IMPORT_PREFIX}/include/Graphs/WTO.h" "${_IMPORT_PREFIX}/include/MSSA/MSSAMuChi.h" "${_IMPORT_PREFIX}/include/MSSA/MemPartition.h" "${_IMPORT_PREFIX}/include/MSSA/MemRegion.h" "${_IMPORT_PREFIX}/include/MSSA/MemSSA.h" "${_IMPORT_PREFIX}/include/MSSA/SVFGBuilder.h" "${_IMPORT_PREFIX}/include/MTA/LockAnalysis.h" "${_IMPORT_PREFIX}/include/MTA/MHP.h" "${_IMPORT_PREFIX}/include/MTA/MTA.h" "${_IMPORT_PREFIX}/include/MTA/MTAStat.h" "${_IMPORT_PREFIX}/include/MTA/TCT.h" "${_IMPORT_PREFIX}/include/MemoryModel/AbstractPointsToDS.h" "${_IMPORT_PREFIX}/include/MemoryModel/AccessPath.h" "${_IMPORT_PREFIX}/include/MemoryModel/ConditionalPT.h" "${_IMPORT_PREFIX}/include/MemoryModel/MutablePointsToDS.h" "${_IMPORT_PREFIX}/include/MemoryModel/PersistentPointsToCache.h" "${_IMPORT_PREFIX}/include/MemoryModel/PersistentPointsToDS.h" "${_IMPORT_PREFIX}/include/MemoryModel/PointerAnalysis.h" "${_IMPORT_PREFIX}/include/MemoryModel/PointerAnalysisImpl.h" "${_IMPORT_PREFIX}/include/MemoryModel/PointsTo.h" "${_IMPORT_PREFIX}/include/MemoryModel/SVFLoop.h" "${_IMPORT_PREFIX}/include/SABER/DoubleFreeChecker.h" "${_IMPORT_PREFIX}/include/SABER/FileChecker.h" "${_IMPORT_PREFIX}/include/SABER/LeakChecker.h" "${_IMPORT_PREFIX}/include/SABER/ProgSlice.h" "${_IMPORT_PREFIX}/include/SABER/SaberCheckerAPI.h" "${_IMPORT_PREFIX}/include/SABER/SaberCondAllocator.h" "${_IMPORT_PREFIX}/include/SABER/SaberSVFGBuilder.h" "${_IMPORT_PREFIX}/include/SABER/SrcSnkDDA.h" "${_IMPORT_PREFIX}/include/SABER/SrcSnkSolver.h" "${_IMPORT_PREFIX}/include/SVFIR/ObjTypeInfo.h" "${_IMPORT_PREFIX}/include/SVFIR/PAGBuilderFromFile.h" "${_IMPORT_PREFIX}/include/SVFIR/SVFIR.h" "${_IMPORT_PREFIX}/include/SVFIR/SVFStatements.h" "${_IMPORT_PREFIX}/include/SVFIR/SVFType.h" "${_IMPORT_PREFIX}/include/SVFIR/SVFValue.h" "${_IMPORT_PREFIX}/include/SVFIR/SVFVariables.h" "${_IMPORT_PREFIX}/include/Util/Annotator.h" "${_IMPORT_PREFIX}/include/Util/BitVector.h" "${_IMPORT_PREFIX}/include/Util/CDGBuilder.h" "${_IMPORT_PREFIX}/include/Util/CallGraphBuilder.h" "${_IMPORT_PREFIX}/include/Util/Casting.h" "${_IMPORT_PREFIX}/include/Util/CommandLine.h" "${_IMPORT_PREFIX}/include/Util/CoreBitVector.h" "${_IMPORT_PREFIX}/include/Util/CxtStmt.h" "${_IMPORT_PREFIX}/include/Util/DPItem.h" "${_IMPORT_PREFIX}/include/Util/ExtAPI.h" "${_IMPORT_PREFIX}/include/Util/GeneralType.h" "${_IMPORT_PREFIX}/include/Util/GraphReachSolver.h" "${_IMPORT_PREFIX}/include/Util/NodeIDAllocator.h" "${_IMPORT_PREFIX}/include/Util/Options.h" "${_IMPORT_PREFIX}/include/Util/PTAStat.h" "${_IMPORT_PREFIX}/include/Util/SVFBugReport.h" "${_IMPORT_PREFIX}/include/Util/SVFLoopAndDomInfo.h" "${_IMPORT_PREFIX}/include/Util/SVFStat.h" "${_IMPORT_PREFIX}/include/Util/SVFUtil.h" "${_IMPORT_PREFIX}/include/Util/SparseBitVector.h" "${_IMPORT_PREFIX}/include/Util/ThreadAPI.h" "${_IMPORT_PREFIX}/include/Util/WorkList.h" "${_IMPORT_PREFIX}/include/Util/Z3Expr.h" "${_IMPORT_PREFIX}/include/Util/cJSON.h" "${_IMPORT_PREFIX}/include/Util/iterator.h" "${_IMPORT_PREFIX}/include/Util/iterator_range.h" "${_IMPORT_PREFIX}/include/WPA/Andersen.h" "${_IMPORT_PREFIX}/include/WPA/AndersenPWC.h" "${_IMPORT_PREFIX}/include/WPA/CSC.h" "${_IMPORT_PREFIX}/include/WPA/FlowSensitive.h" "${_IMPORT_PREFIX}/include/WPA/Steensgaard.h" "${_IMPORT_PREFIX}/include/WPA/TypeAnalysis.h" "${_IMPORT_PREFIX}/include/WPA/VersionedFlowSensitive.h" "${_IMPORT_PREFIX}/include/WPA/WPAFSSolver.h" "${_IMPORT_PREFIX}/include/WPA/WPAPass.h" "${_IMPORT_PREFIX}/include/WPA/WPASolver.h" "${_IMPORT_PREFIX}/include/WPA/WPAStat.h"
84
+ FILES "${_IMPORT_PREFIX}/include/AE/Core/AbstractState.h" "${_IMPORT_PREFIX}/include/AE/Core/AbstractValue.h" "${_IMPORT_PREFIX}/include/AE/Core/AddressValue.h" "${_IMPORT_PREFIX}/include/AE/Core/ICFGWTO.h" "${_IMPORT_PREFIX}/include/AE/Core/IntervalValue.h" "${_IMPORT_PREFIX}/include/AE/Core/NumericValue.h" "${_IMPORT_PREFIX}/include/AE/Core/RelExeState.h" "${_IMPORT_PREFIX}/include/AE/Core/RelationSolver.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/AEDetector.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/AEStat.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/AbsExtAPI.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/AbstractInterpretation.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/AbstractStateManager.h" "${_IMPORT_PREFIX}/include/AE/Svfexe/PreAnalysis.h" "${_IMPORT_PREFIX}/include/CFL/CFGNormalizer.h" "${_IMPORT_PREFIX}/include/CFL/CFGrammar.h" "${_IMPORT_PREFIX}/include/CFL/CFLAlias.h" "${_IMPORT_PREFIX}/include/CFL/CFLBase.h" "${_IMPORT_PREFIX}/include/CFL/CFLGramGraphChecker.h" "${_IMPORT_PREFIX}/include/CFL/CFLGraphBuilder.h" "${_IMPORT_PREFIX}/include/CFL/CFLSVFGBuilder.h" "${_IMPORT_PREFIX}/include/CFL/CFLSolver.h" "${_IMPORT_PREFIX}/include/CFL/CFLStat.h" "${_IMPORT_PREFIX}/include/CFL/CFLVF.h" "${_IMPORT_PREFIX}/include/CFL/GrammarBuilder.h" "${_IMPORT_PREFIX}/include/DDA/ContextDDA.h" "${_IMPORT_PREFIX}/include/DDA/DDAClient.h" "${_IMPORT_PREFIX}/include/DDA/DDAPass.h" "${_IMPORT_PREFIX}/include/DDA/DDAStat.h" "${_IMPORT_PREFIX}/include/DDA/DDAVFSolver.h" "${_IMPORT_PREFIX}/include/DDA/FlowDDA.h" "${_IMPORT_PREFIX}/include/FastCluster/fastcluster.h" "${_IMPORT_PREFIX}/include/Graphs/BasicBlockG.h" "${_IMPORT_PREFIX}/include/Graphs/CDG.h" "${_IMPORT_PREFIX}/include/Graphs/CFLGraph.h" "${_IMPORT_PREFIX}/include/Graphs/CHG.h" "${_IMPORT_PREFIX}/include/Graphs/CallGraph.h" "${_IMPORT_PREFIX}/include/Graphs/ConsG.h" "${_IMPORT_PREFIX}/include/Graphs/ConsGEdge.h" "${_IMPORT_PREFIX}/include/Graphs/ConsGNode.h" "${_IMPORT_PREFIX}/include/Graphs/DOTGraphTraits.h" "${_IMPORT_PREFIX}/include/Graphs/GenericGraph.h" "${_IMPORT_PREFIX}/include/Graphs/GraphPrinter.h" "${_IMPORT_PREFIX}/include/Graphs/GraphTraits.h" "${_IMPORT_PREFIX}/include/Graphs/GraphWriter.h" "${_IMPORT_PREFIX}/include/Graphs/ICFG.h" "${_IMPORT_PREFIX}/include/Graphs/ICFGEdge.h" "${_IMPORT_PREFIX}/include/Graphs/ICFGNode.h" "${_IMPORT_PREFIX}/include/Graphs/ICFGStat.h" "${_IMPORT_PREFIX}/include/Graphs/IRGraph.h" "${_IMPORT_PREFIX}/include/Graphs/SCC.h" "${_IMPORT_PREFIX}/include/Graphs/SVFG.h" "${_IMPORT_PREFIX}/include/Graphs/SVFGEdge.h" "${_IMPORT_PREFIX}/include/Graphs/SVFGNode.h" "${_IMPORT_PREFIX}/include/Graphs/SVFGOPT.h" "${_IMPORT_PREFIX}/include/Graphs/SVFGStat.h" "${_IMPORT_PREFIX}/include/Graphs/ThreadCallGraph.h" "${_IMPORT_PREFIX}/include/Graphs/VFG.h" "${_IMPORT_PREFIX}/include/Graphs/VFGEdge.h" "${_IMPORT_PREFIX}/include/Graphs/VFGNode.h" "${_IMPORT_PREFIX}/include/Graphs/WTO.h" "${_IMPORT_PREFIX}/include/MSSA/MSSAMuChi.h" "${_IMPORT_PREFIX}/include/MSSA/MemPartition.h" "${_IMPORT_PREFIX}/include/MSSA/MemRegion.h" "${_IMPORT_PREFIX}/include/MSSA/MemSSA.h" "${_IMPORT_PREFIX}/include/MSSA/SVFGBuilder.h" "${_IMPORT_PREFIX}/include/MTA/LockAnalysis.h" "${_IMPORT_PREFIX}/include/MTA/MHP.h" "${_IMPORT_PREFIX}/include/MTA/MTA.h" "${_IMPORT_PREFIX}/include/MTA/MTAStat.h" "${_IMPORT_PREFIX}/include/MTA/TCT.h" "${_IMPORT_PREFIX}/include/MemoryModel/AbstractPointsToDS.h" "${_IMPORT_PREFIX}/include/MemoryModel/AccessPath.h" "${_IMPORT_PREFIX}/include/MemoryModel/ConditionalPT.h" "${_IMPORT_PREFIX}/include/MemoryModel/MutablePointsToDS.h" "${_IMPORT_PREFIX}/include/MemoryModel/PersistentPointsToCache.h" "${_IMPORT_PREFIX}/include/MemoryModel/PersistentPointsToDS.h" "${_IMPORT_PREFIX}/include/MemoryModel/PointerAnalysis.h" "${_IMPORT_PREFIX}/include/MemoryModel/PointerAnalysisImpl.h" "${_IMPORT_PREFIX}/include/MemoryModel/PointsTo.h" "${_IMPORT_PREFIX}/include/MemoryModel/SVFLoop.h" "${_IMPORT_PREFIX}/include/SABER/DoubleFreeChecker.h" "${_IMPORT_PREFIX}/include/SABER/FileChecker.h" "${_IMPORT_PREFIX}/include/SABER/LeakChecker.h" "${_IMPORT_PREFIX}/include/SABER/ProgSlice.h" "${_IMPORT_PREFIX}/include/SABER/SaberCheckerAPI.h" "${_IMPORT_PREFIX}/include/SABER/SaberCondAllocator.h" "${_IMPORT_PREFIX}/include/SABER/SaberSVFGBuilder.h" "${_IMPORT_PREFIX}/include/SABER/SrcSnkDDA.h" "${_IMPORT_PREFIX}/include/SABER/SrcSnkSolver.h" "${_IMPORT_PREFIX}/include/SVFIR/ObjTypeInfo.h" "${_IMPORT_PREFIX}/include/SVFIR/PAGBuilderFromFile.h" "${_IMPORT_PREFIX}/include/SVFIR/SVFIR.h" "${_IMPORT_PREFIX}/include/SVFIR/SVFStatements.h" "${_IMPORT_PREFIX}/include/SVFIR/SVFType.h" "${_IMPORT_PREFIX}/include/SVFIR/SVFValue.h" "${_IMPORT_PREFIX}/include/SVFIR/SVFVariables.h" "${_IMPORT_PREFIX}/include/Util/Annotator.h" "${_IMPORT_PREFIX}/include/Util/BitVector.h" "${_IMPORT_PREFIX}/include/Util/CDGBuilder.h" "${_IMPORT_PREFIX}/include/Util/CallGraphBuilder.h" "${_IMPORT_PREFIX}/include/Util/Casting.h" "${_IMPORT_PREFIX}/include/Util/CommandLine.h" "${_IMPORT_PREFIX}/include/Util/CoreBitVector.h" "${_IMPORT_PREFIX}/include/Util/CxtStmt.h" "${_IMPORT_PREFIX}/include/Util/DPItem.h" "${_IMPORT_PREFIX}/include/Util/ExtAPI.h" "${_IMPORT_PREFIX}/include/Util/GeneralType.h" "${_IMPORT_PREFIX}/include/Util/GraphReachSolver.h" "${_IMPORT_PREFIX}/include/Util/NodeIDAllocator.h" "${_IMPORT_PREFIX}/include/Util/Options.h" "${_IMPORT_PREFIX}/include/Util/PTAStat.h" "${_IMPORT_PREFIX}/include/Util/SVFBugReport.h" "${_IMPORT_PREFIX}/include/Util/SVFLoopAndDomInfo.h" "${_IMPORT_PREFIX}/include/Util/SVFStat.h" "${_IMPORT_PREFIX}/include/Util/SVFUtil.h" "${_IMPORT_PREFIX}/include/Util/SparseBitVector.h" "${_IMPORT_PREFIX}/include/Util/ThreadAPI.h" "${_IMPORT_PREFIX}/include/Util/WorkList.h" "${_IMPORT_PREFIX}/include/Util/Z3Expr.h" "${_IMPORT_PREFIX}/include/Util/cJSON.h" "${_IMPORT_PREFIX}/include/Util/iterator.h" "${_IMPORT_PREFIX}/include/Util/iterator_range.h" "${_IMPORT_PREFIX}/include/WPA/Andersen.h" "${_IMPORT_PREFIX}/include/WPA/AndersenPWC.h" "${_IMPORT_PREFIX}/include/WPA/CSC.h" "${_IMPORT_PREFIX}/include/WPA/FlowSensitive.h" "${_IMPORT_PREFIX}/include/WPA/Steensgaard.h" "${_IMPORT_PREFIX}/include/WPA/TypeAnalysis.h" "${_IMPORT_PREFIX}/include/WPA/VersionedFlowSensitive.h" "${_IMPORT_PREFIX}/include/WPA/WPAFSSolver.h" "${_IMPORT_PREFIX}/include/WPA/WPAPass.h" "${_IMPORT_PREFIX}/include/WPA/WPASolver.h" "${_IMPORT_PREFIX}/include/WPA/WPAStat.h"
85
85
  )
86
86
  else()
87
87
  set_property(TARGET SVF::SvfCore
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.2539",
3
+ "version": "1.0.2541",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {