Package com.ibm.wala.dataflow.IFDS
Class LocalPathEdges
- java.lang.Object
-
- com.ibm.wala.dataflow.IFDS.LocalPathEdges
-
public class LocalPathEdges extends Object
A set of path edges for a particular procedure entry s_p.
-
-
Constructor Summary
Constructors Constructor Description LocalPathEdges(boolean fastMerge)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)boolean
contains(int i, int n, int j)
IntSet
getInverse(int n, int d2)
N.B: If we're using the ZERO_PATH_SHORT_CIRCUIT, then we may have-> implicitly represented since we also have -> . IntSet
getReachable(int n)
TODO: optimize this based on altPathsIntSet
getReachable(int n, int d1)
IntSet
getReachedNodeNumbers()
TODO: optimize this
-
-
-
Method Detail
-
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:
i
-n
- local block number of the basic block nj
-
-
getInverse
public IntSet getInverse(int n, int d2)
N.B: If we're using the ZERO_PATH_SHORT_CIRCUIT, then we may have-> implicitly represented since we also have -> . However, getInverse() will NOT 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 nd2
-- Returns:
- the sparse int set of d1 s.t.
-> are recorded as path edges. null if none found
-
contains
public boolean contains(int i, int n, int j)
- Parameters:
i
-n
- local block number of a basic block nj
-- Returns:
- true iff we have a path edge
->
-
getReachable
public IntSet getReachable(int n, int d1)
- Parameters:
n
-- Returns:
- set of d2 s.t. d1->d2 is a path edge for node n.
-
getReachable
public IntSet getReachable(int n)
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
public IntSet getReachedNodeNumbers()
TODO: optimize this- Returns:
- set of node numbers that are reached by any fact
-
-