Class JvmDefaultReduceOperator<StateT extends LatticeAbstractState<StateT>>
- java.lang.Object
-
- proguard.analysis.cpa.jvm.operators.JvmDefaultReduceOperator<StateT>
-
- All Implemented Interfaces:
ReduceOperator<JvmCfaNode,JvmCfaEdge,MethodSignature>
,JvmAbstractStateFactory<StateT>
- Direct Known Subclasses:
JvmTaintReduceOperator
,JvmValueReduceOperator
public class JvmDefaultReduceOperator<StateT extends LatticeAbstractState<StateT>> extends java.lang.Object implements ReduceOperator<JvmCfaNode,JvmCfaEdge,MethodSignature>, JvmAbstractStateFactory<StateT>
ThisReduceOperator
simulates the JVM behavior on a method call. It takes a clone of the callerJvmAbstractState
, creates an empty stack and a local variables array with the callee arguments.
-
-
Constructor Summary
Constructors Constructor Description JvmDefaultReduceOperator()
Create the default reduce operator for the JVM.JvmDefaultReduceOperator(boolean reduceHeap)
Create the default reduce operator for the JVM.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
reduceHeap(JvmHeapAbstractState<StateT> heap, JvmFrameAbstractState<StateT> reducedFrame, MapAbstractState<java.lang.String,StateT> reducedStaticFields)
Reduces the heap state.JvmAbstractState<StateT>
reduceImpl(AbstractState expandedInitialState, JvmCfaNode blockEntryNode, Call call)
Creates the initial state of the called procedure discarding the useless information from the state of the caller.protected void
reduceStaticFields(MapAbstractState<java.lang.String,StateT> staticFields)
Reduces the static fields.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface proguard.analysis.cpa.jvm.state.JvmAbstractStateFactory
createJvmAbstractState
-
Methods inherited from interface proguard.analysis.cpa.bam.ReduceOperator
onMethodEntry, reduce
-
-
-
-
Constructor Detail
-
JvmDefaultReduceOperator
public JvmDefaultReduceOperator()
Create the default reduce operator for the JVM.
-
JvmDefaultReduceOperator
public JvmDefaultReduceOperator(boolean reduceHeap)
Create the default reduce operator for the JVM.- Parameters:
reduceHeap
- whether reduction of the heap is performed
-
-
Method Detail
-
reduceImpl
public JvmAbstractState<StateT> reduceImpl(AbstractState expandedInitialState, JvmCfaNode blockEntryNode, Call call)
Description copied from interface:ReduceOperator
Creates the initial state of the called procedure discarding the useless information from the state of the caller.- Specified by:
reduceImpl
in interfaceReduceOperator<JvmCfaNode,JvmCfaEdge,MethodSignature>
- 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
-
reduceStaticFields
protected void reduceStaticFields(MapAbstractState<java.lang.String,StateT> staticFields)
Reduces the static fields. The default implementation doesn't perform any reduction.- Parameters:
staticFields
- the static fields map that is modified by this method by performing reduction
-
reduceHeap
protected void reduceHeap(JvmHeapAbstractState<StateT> heap, JvmFrameAbstractState<StateT> reducedFrame, MapAbstractState<java.lang.String,StateT> reducedStaticFields)
Reduces the heap state. The default implementation doesn't perform any reduction.- Parameters:
heap
- the heap that is modified by this method by performing reductionreducedFrame
- the frame after reduction has been performed on itreducedStaticFields
- the static fields after reduction has been performed on them
-
-