V - the abstract value type to be tracked by the analysisS - the store type used in the analysisT - the transfer function type that is used to approximated runtime behaviorpublic interface Analysis<V extends AbstractValue<V>,S extends Store<S>,T extends TransferFunction<V,S>>
| Modifier and Type | Interface and Description |
|---|---|
static class |
Analysis.BeforeOrAfter
In calls to
Analysis#runAnalysisFor, whether to return the store before or after the
given node. |
static class |
Analysis.Direction
The direction of an analysis instance.
|
| Modifier and Type | Method and Description |
|---|---|
Analysis.Direction |
getDirection()
Get the direction of this analysis.
|
S |
getExceptionalExitStore()
Returns the exceptional exit store.
|
@Nullable TransferInput<V,S> |
getInput(Block b)
Get the transfer input of a given
Block b. |
S |
getRegularExitStore()
Returns the regular exit store, or
null, if there is no such store (because the method
cannot exit through the regular exit block). |
AnalysisResult<V,S> |
getResult()
The result of running the analysis.
|
T |
getTransferFunction()
Get the transfer function of this analysis.
|
V |
getValue(Node n)
|
V |
getValue(Tree t)
|
boolean |
isRunning()
Is the analysis currently running?
|
void |
performAnalysis(ControlFlowGraph cfg)
Perform the actual analysis.
|
void |
performAnalysisBlock(Block b)
Perform the actual analysis on one block.
|
S |
runAnalysisFor(Node node,
Analysis.BeforeOrAfter preOrPost,
TransferInput<V,S> blockTransferInput,
IdentityHashMap<Node,V> nodeValues,
Map<TransferInput<V,S>,IdentityHashMap<Node,TransferResult<V,S>>> analysisCaches)
Runs the analysis again within the block of
node and returns the store at the location
of node. |
Analysis.Direction getDirection()
boolean isRunning()
void performAnalysis(ControlFlowGraph cfg)
cfg - the control flow graphvoid performAnalysisBlock(Block b)
b - the block to analyzeS runAnalysisFor(Node node, Analysis.BeforeOrAfter preOrPost, TransferInput<V,S> blockTransferInput, IdentityHashMap<Node,V> nodeValues, Map<TransferInput<V,S>,IdentityHashMap<Node,TransferResult<V,S>>> analysisCaches)
node and returns the store at the location
of node. If before is true, then the store immediately before the Node
node is returned. Otherwise, the store immediately after node is returned. If
analysisCaches is not null, this method uses a cache. analysisCaches is a map
of a block of node to the cached analysis result. If the cache for transferInput is not
in analysisCaches, this method creates new cache and stores it in analysisCaches. The cache is a map of nodes to the analysis results of the nodes.node - the node to analyzepreOrPost - which store to return: the store immediately before node or the store
after nodeblockTransferInput - the transfer input of the block of this nodenodeValues - abstract values of nodesanalysisCaches - caches of analysis resultsnode (depends on the value of before) after
running the analysisAnalysisResult<V,S> getResult()
T getTransferFunction()
@Nullable TransferInput<V,S> getInput(Block b)
Block b.b - a given BlockV getValue(Node n)
Node n, or null if no information is
available. Note that if the analysis has not finished yet, this value might not represent the
final value for this node.n - n a noden, or null if no information is availableV getValue(Tree t)
Tree t, or null if no information is
available. Note that if the analysis has not finished yet, this value might not represent the
final value for this node.t - the given treeS getRegularExitStore()
null, if there is no such store (because the method
cannot exit through the regular exit block).null, if there is no such store (because the method
cannot exit through the regular exit block)S getExceptionalExitStore()