Package proguard.analysis.cpa.bam
Interface ReduceOperator<ContentT extends AbstractState<ContentT>>
-
- Type Parameters:
ContentT
- The content of the jvm states. For example, this can be aSetAbstractState
of taints for taint analysis or aValueAbstractState
for value analysis.
- All Known Implementing Classes:
DefaultReduceOperator
,NoOpReduceOperator
,TaintReduceOperator
,ValueReduceOperator
public interface ReduceOperator<ContentT extends AbstractState<ContentT>>
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 JvmAbstractState<ContentT>
onMethodEntry(JvmAbstractState<ContentT> reducedState, boolean isStatic)
Performs additional operations on the reduced state (i.e.default JvmAbstractState<ContentT>
reduce(JvmAbstractState<ContentT> expandedInitialState, JvmCfaNode 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.JvmAbstractState<ContentT>
reduceImpl(JvmAbstractState<ContentT> expandedInitialState, JvmCfaNode 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 JvmAbstractState<ContentT> reduce(JvmAbstractState<ContentT> expandedInitialState, JvmCfaNode 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
JvmAbstractState<ContentT> reduceImpl(JvmAbstractState<ContentT> expandedInitialState, JvmCfaNode 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 JvmAbstractState<ContentT> onMethodEntry(JvmAbstractState<ContentT> 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
-
-