Class LocalPathEdges
java.lang.Object
com.ibm.wala.dataflow.IFDS.LocalPathEdges
A set of path edges for a particular procedure entry s_p.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPathEdge
(int i, int n, int j) Record that in this procedure we've discovered a same-level realizable path from (s_p,d_i) to (n,d_j)boolean
contains
(int i, int n, int j) getInverse
(int n, int d2) N.B: If we're using the ZERO_PATH_SHORT_CIRCUIT, then we may have <s_p, d1> -> <n, d2> implicitly represented since we also have <s_p, 0> -> <n,d2>.getReachable
(int n) TODO: optimize this based on altPathsgetReachable
(int n, int d1) TODO: optimize this
-
Constructor Details
-
LocalPathEdges
public LocalPathEdges(boolean fastMerge) - Parameters:
fastMerge
- if true, the representation uses extra space in order to support faster merge operations
-
-
Method Details
-
addPathEdge
public void addPathEdge(int i, int n, int j) Record that in this procedure we've discovered a same-level realizable path from (s_p,d_i) to (n,d_j)- Parameters:
n
- local block number of the basic block n
-
getInverse
N.B: If we're using the ZERO_PATH_SHORT_CIRCUIT, then we may have <s_p, d1> -> <n, d2> implicitly represented since we also have <s_p, 0> -> <n,d2>. However, getInverse() <b> will NOT </b> return these implicit d1 bits in the result. This translates to saying that the caller had better not care about any other d1 other than d1==0 if d1==0 is present. This happens to be true in the single use of getInverse() in the tabulation solver, which uses getInverse() to propagate flow from an exit node back to the caller's return site(s). Since we know that we will see flow from fact 0 to the return sites(s), we don't care about other facts that may induce the same flow to the return site(s).- Parameters:
n
- local block number of a basic block n- Returns:
- the sparse int set of d1 s.t. <s_p, d1> -> <n, d2> are recorded as path edges. null if none found
-
contains
public boolean contains(int i, int n, int j) - Parameters:
n
- local block number of a basic block n- Returns:
- true iff we have a path edge <s_p,i> -> <n, j>
-
getReachable
- Returns:
- set of d2 s.t. d1 -> d2 is a path edge for node n.
-
getReachable
TODO: optimize this based on altPaths- Parameters:
n
- the local block number of a node- Returns:
- set of d2 s.t \exists d1 s.t. d1 -> d2 is a path edge for node n
-
getReachedNodeNumbers
TODO: optimize this- Returns:
- set of node numbers that are reached by any fact
-