Package proguard.analysis.cpa.bam
Interface ReduceOperator<CfaNodeT extends CfaNode<CfaEdgeT,SignatureT>,CfaEdgeT extends CfaEdge<CfaNodeT>,SignatureT extends Signature>
-
- All Known Implementing Classes:
JvmDefaultReduceOperator
,JvmReferenceReduceOperator
,JvmTaintReduceOperator
,JvmValueReduceOperator
,NoOpReduceOperator
public interface ReduceOperator<CfaNodeT extends CfaNode<CfaEdgeT,SignatureT>,CfaEdgeT extends CfaEdge<CfaNodeT>,SignatureT extends Signature>
This operator is used to discard unnecessary information when entering a procedure block depending on the domain-specific analysis (e.g. local variables, caller stack).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default AbstractState
onMethodEntry(AbstractState reducedState, boolean isStatic)
Performs additional operations on the reduced state (i.e.default AbstractState
reduce(AbstractState expandedInitialState, CfaNodeT blockEntryNode, Call call)
Accumulates the reduction procedure by calling the method to create the initial state of the called procedure discarding the useless information from the state of the caller and calling a method that performs additional operations on the created state if any are specified by an implementing class.AbstractState
reduceImpl(AbstractState expandedInitialState, CfaNodeT blockEntryNode, Call call)
Creates the initial state of the called procedure discarding the useless information from the state of the caller.
-
-
-
Method Detail
-
reduce
default AbstractState reduce(AbstractState expandedInitialState, CfaNodeT blockEntryNode, Call call)
Accumulates the reduction procedure by calling the method to create the initial state of the called procedure discarding the useless information from the state of the caller and calling a method that performs additional operations on the created state if any are specified by an implementing class.- Parameters:
expandedInitialState
- the entry state of the called procedure before any reductionblockEntryNode
- the entry node of the called procedurecall
- the information of the call to the procedure- Returns:
- The entry state of the called procedure
-
reduceImpl
AbstractState reduceImpl(AbstractState expandedInitialState, CfaNodeT blockEntryNode, Call call)
Creates the initial state of the called procedure discarding the useless information from the state of the caller.- Parameters:
expandedInitialState
- the entry state of the called procedure before any reductionblockEntryNode
- the entry node of the called procedurecall
- the information of the call to the procedure- Returns:
- The entry state of the called procedure
-
onMethodEntry
default AbstractState onMethodEntry(AbstractState reducedState, boolean isStatic)
Performs additional operations on the reduced state (i.e. on the method entry state). Does nothing by default. NB: since this is still part of the reduction operation the result of this method is the state used by the analysis and part of the cache key for the called method.- Parameters:
reducedState
- reduced state (i.e., the entry state of the called method)isStatic
- is the called method static- Returns:
- the state after performing additional operations or untouched state by default
-
-