public class EdgeFunctionCache<N,D,M,V> extends java.lang.Object implements EdgeFunctions<N,D,M,V>
| Modifier and Type | Field and Description |
|---|---|
protected <any> |
callCache |
protected <any> |
callToReturnCache |
protected EdgeFunctions<N,D,M,V> |
delegate |
protected <any> |
normalCache |
protected <any> |
returnCache |
| Constructor and Description |
|---|
EdgeFunctionCache(EdgeFunctions<N,D,M,V> delegate,
CacheBuilder builder) |
| Modifier and Type | Method and Description |
|---|---|
EdgeFunction<V> |
getCallEdgeFunction(N callStmt,
D srcNode,
M destinationMethod,
D destNode)
Returns the function that computes how the V-typed value changes when
being propagated along a method call.
|
EdgeFunction<V> |
getCallToReturnEdgeFunction(N callSite,
D callNode,
N returnSite,
D returnSideNode)
Returns the function that computes how the V-typed value changes when
being propagated from a method call to one of its intraprocedural
successor.
|
EdgeFunction<V> |
getNormalEdgeFunction(N curr,
D currNode,
N succ,
D succNode)
Returns the function that computes how the V-typed value changes when
being propagated from srcNode at statement src to tgtNode at statement
tgt.
|
EdgeFunction<V> |
getReturnEdgeFunction(N callSite,
M calleeMethod,
N exitStmt,
D exitNode,
N returnSite,
D retNode)
Returns the function that computes how the V-typed value changes when
being propagated along a method exit (return or throw).
|
void |
printStats() |
protected final EdgeFunctions<N,D,M,V> delegate
protected final <any> normalCache
protected final <any> callCache
protected final <any> returnCache
protected final <any> callToReturnCache
public EdgeFunctionCache(EdgeFunctions<N,D,M,V> delegate, CacheBuilder builder)
public EdgeFunction<V> getNormalEdgeFunction(N curr, D currNode, N succ, D succNode)
EdgeFunctionsgetNormalEdgeFunction in interface EdgeFunctions<N,D,M,V>curr - The statement from which the flow originates.currNode - The D-type value with which the source value is associated.succ - The target statement of the flow.succNode - The D-type value with which the target value will be
associated.public EdgeFunction<V> getCallEdgeFunction(N callStmt, D srcNode, M destinationMethod, D destNode)
EdgeFunctionsgetCallEdgeFunction in interface EdgeFunctions<N,D,M,V>callStmt - The call statement from which the flow originates.srcNode - The D-type value with which the source value is associated.destinationMethod - A concrete destination method of the call.destNode - The D-type value with which the target value will be
associated at the side of the callee.public EdgeFunction<V> getReturnEdgeFunction(N callSite, M calleeMethod, N exitStmt, D exitNode, N returnSite, D retNode)
EdgeFunctionsgetReturnEdgeFunction in interface EdgeFunctions<N,D,M,V>callSite - One of all the call sites in the program that called the
method from which the exitStmt is actually returning. This
information can be exploited to compute a value that depend on
information from before the call.
Note: This value might be null if
using a tabulation problem with SolverConfiguration.followReturnsPastSeeds()
returning true in a situation where the call graph
does not contain a caller for the method that is returned from.calleeMethod - The method from which we are exiting.exitStmt - The exit statement from which the flow originates.exitNode - The D-type value with which the source value is associated.returnSite - One of the possible successor statements of a caller to the
method we are exiting from.
Note: This value might be null if
using a tabulation problem with SolverConfiguration.followReturnsPastSeeds()
returning true in a situation where the call graph
does not contain a caller for the method that is returned from.public EdgeFunction<V> getCallToReturnEdgeFunction(N callSite, D callNode, N returnSite, D returnSideNode)
EdgeFunctionsgetCallToReturnEdgeFunction in interface EdgeFunctions<N,D,M,V>callSite - The call statement from which the flow originates.callNode - The D-type value with which the source value is associated.returnSite - One of the possible successor statements of a call statement.returnSideNode - The D-type value with which the target value will be
associated at the returnSite.public void printStats()