Class ConstantPropagation.Analysis
java.lang.Object
pascal.taie.analysis.dataflow.analysis.AbstractDataflowAnalysis<Stmt,CPFact>
pascal.taie.analysis.dataflow.analysis.constprop.ConstantPropagation.Analysis
- All Implemented Interfaces:
DataflowAnalysis<Stmt,
CPFact>
- Enclosing class:
- ConstantPropagation
-
Field Summary
Fields inherited from class pascal.taie.analysis.dataflow.analysis.AbstractDataflowAnalysis
cfg
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
Meets a fact into another (target) fact.Meets two Values.boolean
needTransferEdge
(CFGEdge<Stmt> edge) By default, a data-flow analysis does not have edge transfer, i.e., does not need to perform transfer for any edges.newBoundaryFact
(IR ir) transferEdge
(CFGEdge<Stmt> edge, CPFact nodeFact) Edge Transfer function for this analysis.boolean
transferNode
(Stmt stmt, CPFact in, CPFact out) Node Transfer function for the analysis.Methods inherited from class pascal.taie.analysis.dataflow.analysis.AbstractDataflowAnalysis
getCFG
-
Constructor Details
-
Analysis
-
-
Method Details
-
isForward
public boolean isForward()- Returns:
- true if this analysis is forward, otherwise false.
-
newBoundaryFact
- Returns:
- new fact in boundary conditions, i.e., the fact for entry (exit) node in forward (backward) analysis.
-
newBoundaryFact
-
newInitialFact
- Returns:
- new initial fact for non-boundary nodes.
-
meetInto
Description copied from interface:DataflowAnalysis
Meets a fact into another (target) fact. This function will be used to handle control-flow confluences. -
meetValue
Meets two Values. This method computes the greatest lower bound of two Values. -
transferNode
Description copied from interface:DataflowAnalysis
Node Transfer function for the analysis. The function transfers data-flow from in (out) fact to out (in) fact for forward (backward) analysis.- Returns:
- true if the transfer changed the out (in) fact, otherwise false.
-
needTransferEdge
Description copied from class:AbstractDataflowAnalysis
By default, a data-flow analysis does not have edge transfer, i.e., does not need to perform transfer for any edges.- Specified by:
needTransferEdge
in interfaceDataflowAnalysis<Stmt,
CPFact> - Overrides:
needTransferEdge
in classAbstractDataflowAnalysis<Stmt,
CPFact> - Returns:
- true if this analysis needs to perform transfer for given edge, otherwise false.
-
transferEdge
Description copied from interface:DataflowAnalysis
Edge Transfer function for this analysis. Note that this function should NOT modifynodeFact
.- Specified by:
transferEdge
in interfaceDataflowAnalysis<Stmt,
CPFact> - Overrides:
transferEdge
in classAbstractDataflowAnalysis<Stmt,
CPFact> - Parameters:
edge
- the edge that the transfer function is applied onnodeFact
- the fact of the source node of the edge. Note that which node is the source node of an edge depends on the direction of the analysis.- Returns:
- the resulting edge fact
-