Class AbstractInterDataflowAnalysis<Method,Node,Fact>
java.lang.Object
pascal.taie.analysis.Analysis
pascal.taie.analysis.ProgramAnalysis<DataflowResult<Node,Fact>>
pascal.taie.analysis.dataflow.inter.AbstractInterDataflowAnalysis<Method,Node,Fact>
- Type Parameters:
Method
- type of ICFG edgesNode
- type of ICFG nodesFact
- type of data-flow facts
- All Implemented Interfaces:
InterDataflowAnalysis<Node,
Fact>
- Direct Known Subclasses:
InterConstantPropagation
public abstract class AbstractInterDataflowAnalysis<Method,Node,Fact>
extends ProgramAnalysis<DataflowResult<Node,Fact>>
implements InterDataflowAnalysis<Node,Fact>
Provides common functionalities for
InterDataflowAnalysis
implementations.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionanalyze()
Runs this analysis for the whole program.protected void
finish()
If the concrete analysis needs to perform some finishing work after the solver finishes, then it can overwrite this method.protected void
If the concrete analysis needs to perform some initialization before the solver starts, then it can overwrite this method.protected abstract Fact
transferCallEdge
(CallEdge<Node> edge, Fact callSiteOut) protected abstract boolean
transferCallNode
(Node node, Fact in, Fact out) Transfer function for call node.protected abstract Fact
transferCallToReturnEdge
(CallToReturnEdge<Node> edge, Fact out) transferEdge
(ICFGEdge<Node> edge, Fact out) boolean
transferNode
(Node node, Fact in, Fact out) DispatchesNode
to specific node transfer functions for call nodes and non-call nodes.protected abstract boolean
transferNonCallNode
(Node node, Fact in, Fact out) Transfer function for non-call node.protected abstract Fact
transferNormalEdge
(NormalEdge<Node> edge, Fact out) protected abstract Fact
transferReturnEdge
(ReturnEdge<Node> edge, Fact returnOut) Methods inherited from class pascal.taie.analysis.Analysis
getId, getOptions
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface pascal.taie.analysis.dataflow.inter.InterDataflowAnalysis
isForward, meetInto, newBoundaryFact, newInitialFact
-
Field Details
-
icfg
-
solver
-
-
Constructor Details
-
AbstractInterDataflowAnalysis
-
-
Method Details
-
initialize
protected void initialize()If the concrete analysis needs to perform some initialization before the solver starts, then it can overwrite this method. -
finish
protected void finish()If the concrete analysis needs to perform some finishing work after the solver finishes, then it can overwrite this method. -
transferNode
DispatchesNode
to specific node transfer functions for call nodes and non-call nodes.- Specified by:
transferNode
in interfaceInterDataflowAnalysis<Method,
Node> - Returns:
- true if the transfer changed the out (int) fact, otherwise false.
-
transferCallNode
Transfer function for call node. -
transferNonCallNode
Transfer function for non-call node. -
transferEdge
- Specified by:
transferEdge
in interfaceInterDataflowAnalysis<Method,
Node> - Parameters:
edge
- the ICFG edge that the transfer function is applied on.out
- the OUT fact of source node of the edge.- Returns:
- the result of edge transfer function.
-
transferNormalEdge
-
transferCallToReturnEdge
-
transferCallEdge
-
transferReturnEdge
-
analyze
Description copied from class:ProgramAnalysis
Runs this analysis for the whole program. If the result is not used by following analyses, then this method should returnnull
.- Specified by:
analyze
in classProgramAnalysis<DataflowResult<Node,
Fact>> - Returns:
- the analysis result for the whole program.
The result will be stored in
World
.
-