svf-lib 1.0.2695 → 1.0.2697

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.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -101,6 +101,12 @@ public:
101
101
  return ptdTy;
102
102
  }
103
103
 
104
+ /// Whether we maintain reverse points-to sets.
105
+ inline bool hasReversePts() const
106
+ {
107
+ return rev;
108
+ }
109
+
104
110
  /// Clears all points-to sets as if nothing is stored.
105
111
  virtual void clear() = 0;
106
112
 
@@ -189,6 +189,10 @@ public:
189
189
  /// Interface exposed to users of our pointer analysis, given PAGNodeID
190
190
  virtual AliasResult alias(NodeID node1, NodeID node2) = 0;
191
191
 
192
+ /// Collect the nodes that may alias the given node.
193
+ /// Subclasses must implement this query; the default reports unsupported and aborts.
194
+ virtual NodeBS getMayAliases(NodeID node);
195
+
192
196
  /// Get points-to targets of a pointer. It needs to be implemented in child class
193
197
  virtual const PointsTo& getPts(NodeID ptr) = 0;
194
198
 
@@ -225,6 +225,10 @@ public:
225
225
  /// Interface expose to users of our pointer analysis, given two pts
226
226
  virtual AliasResult alias(const PointsTo& pts1, const PointsTo& pts2);
227
227
 
228
+ /// Declaring the PointsTo overload below would otherwise hide the base class's
229
+ /// mayAlias(NodeID, NodeID) and mayAlias(const SVFVar*, const SVFVar*).
230
+ using PointerAnalysis::mayAlias;
231
+
228
232
  /// Convenience bool wrappers: return true if the two operands may/must/partial alias
229
233
  inline bool mayAlias(const PointsTo& pts1, const PointsTo& pts2)
230
234
  {
@@ -252,6 +252,9 @@ public:
252
252
  return getPTDataTy()->unionPts(id,ptd);
253
253
  }
254
254
 
255
+ /// Collect exactly the SVFIR nodes q for which mayAlias(node, q) holds
256
+ virtual NodeBS getMayAliases(NodeID node);
257
+
255
258
 
256
259
  void dumpTopLevelPtsTo();
257
260
 
@@ -354,6 +357,13 @@ protected:
354
357
  /// SCC detection
355
358
  virtual NodeStack& SCCDetect();
356
359
 
360
+ /// Collect may-alias candidates. Attempts to do so from reverse points-to sets (cheaper),
361
+ /// and if not possible, falls back to trying every node (costlier).
362
+ NodeBS getMayAliasCandidates(NodeID node);
363
+
364
+ /// Also check getMayAliases on the pointers that the alias tests use
365
+ virtual void validateSuccessTests(std::string fun);
366
+
357
367
 
358
368
 
359
369
  /// Sanitize pts for field insensitive objects
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.2695",
3
+ "version": "1.0.2697",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {