Interface Analysis<V extends AbstractValue<V>,S extends Store<S>,T extends TransferFunction<V,S>>   
- Type Parameters:
- V- the abstract value type to be tracked by the analysis
- S- the store type used in the analysis
- T- the transfer function type that is used to approximated runtime behavior
- All Known Subinterfaces:
- BackwardAnalysis<V,,- S, - T> - ForwardAnalysis<V,- S, - T> 
- All Known Implementing Classes:
- AbstractAnalysis,- BackwardAnalysisImpl,- CalledMethodsAnalysis,- CFAbstractAnalysis,- CFAnalysis,- ForwardAnalysisImpl,- KeyForAnalysis,- LockAnalysis,- NullnessAnalysis,- ResourceLeakAnalysis
public interface Analysis<V extends AbstractValue<V>,S extends Store<S>,T extends TransferFunction<V,S>>   
This interface defines a dataflow analysis, given a control flow graph and a transfer function. A
 dataflow analysis has a direction, either forward or backward. The direction of corresponding
 transfer function is consistent with the analysis, i.e. a forward analysis has a forward transfer
 function, and a backward analysis has a backward transfer function.
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic enumIn calls toAnalysis#runAnalysisFor, whether to return the store before or after the given node.static enumThe direction of an analysis instance.
- 
Method SummaryModifier and TypeMethodDescriptionGet the direction of this analysis.Returns the exceptional exit store.Get the transfer input of a givenBlockb.Returns the regular exit store, ornull, if there is no such store (because the method cannot exit through the regular exit block).The result of running the analysis.Get the transfer function of this analysis.booleanIs the analysis currently running?voidPerform the actual analysis.voidPerform the actual analysis on one block.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 ofnodeand returns the store at the location ofnode.
- 
Method Details- 
getDirectionAnalysis.Direction getDirection()Get the direction of this analysis.- Returns:
- the direction of this analysis
 
- 
isRunningboolean isRunning()Is the analysis currently running?- Returns:
- true if the analysis is running currently, else false
 
- 
performAnalysisPerform the actual analysis.- Parameters:
- cfg- the control flow graph
 
- 
performAnalysisBlockPerform the actual analysis on one block.- Parameters:
- b- the block to analyze
 
- 
runAnalysisForS 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 ofnodeand returns the store at the location ofnode. Ifbeforeis true, then the store immediately before theNodenodeis returned. Otherwise, the store immediately afternodeis returned. IfanalysisCachesis not null, this method uses a cache.analysisCachesis a map of a block of node to the cached analysis result. If the cache fortransferInputis not inanalysisCaches, this method creates new cache and stores it inanalysisCaches. The cache is a map of nodes to the analysis results of the nodes.- Parameters:
- node- the node to analyze
- preOrPost- which store to return: the store immediately before- nodeor the store after- node
- blockTransferInput- the transfer input of the block of this node
- nodeValues- abstract values of nodes
- analysisCaches- caches of analysis results
- Returns:
- the store before or after node(depends on the value ofbefore) after running the analysis
 
- 
getResultAnalysisResult<V,S> getResult()The result of running the analysis. This is only available once the analysis finished running.- Returns:
- the result of running the analysis
 
- 
getTransferFunctionGet the transfer function of this analysis.- Returns:
- the transfer function of this analysis
 
- 
getInputGet the transfer input of a givenBlockb.- Parameters:
- b- a given Block
- Returns:
- the transfer input of this Block
 
- 
getValueReturns the abstract value forNoden, ornullif no information is available. Note that if the analysis has not finished yet, this value might not represent the final value for this node.- Parameters:
- n- n a node
- Returns:
- the abstract value for node n, ornullif no information is available
 
- 
getValueReturn the abstract value forTreet, ornullif no information is available. Note that if the analysis has not finished yet, this value might not represent the final value for this node.- Parameters:
- t- the given tree
- Returns:
- the abstract value for the given tree
 
- 
getRegularExitStoreReturns the regular exit store, ornull, if there is no such store (because the method cannot exit through the regular exit block).- Returns:
- the regular exit store, or null, if there is no such store (because the method cannot exit through the regular exit block)
 
- 
getExceptionalExitStoreReturns the exceptional exit store.- Returns:
- the exceptional exit store
 
 
-