ContentT - The content of the jvm states. For example, this can be a SetAbstractState of taints for taint analysis or a ValueAbstractState for value analysis.public class DefaultReduceOperator<ContentT extends AbstractState<ContentT>> extends java.lang.Object implements ReduceOperator<ContentT>
ReduceOperator simulates the JVM behavior on a method call. It takes a clone of the
caller JvmAbstractState, creates an empty stack and a local variables array with the
callee arguments.| Constructor and Description |
|---|
DefaultReduceOperator()
Create the default reduce operator for the JVM.
|
DefaultReduceOperator(boolean reduceHeap)
Create the default reduce operator for the JVM.
|
| Modifier and Type | Method and Description |
|---|---|
protected JvmAbstractState<ContentT> |
createJvmAbstractState(JvmCfaNode programLocation,
JvmFrameAbstractState<ContentT> frame,
JvmHeapAbstractState<ContentT> heap,
MapAbstractState<java.lang.String,ContentT> staticFields) |
protected void |
reduceHeap(JvmHeapAbstractState<ContentT> heap,
JvmFrameAbstractState<ContentT> reducedFrame,
MapAbstractState<java.lang.String,ContentT> reducedStaticFields)
Reduces the heap state.
|
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.
|
protected void |
reduceStaticFields(MapAbstractState<java.lang.String,ContentT> staticFields)
Reduces the static fields.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonMethodEntry, reducepublic DefaultReduceOperator()
public DefaultReduceOperator(boolean reduceHeap)
reduceHeap - whether reduction of the heap is performedpublic JvmAbstractState<ContentT> reduceImpl(JvmAbstractState<ContentT> expandedInitialState, JvmCfaNode blockEntryNode, Call call)
ReduceOperatorreduceImpl in interface ReduceOperator<ContentT extends AbstractState<ContentT>>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 procedureprotected void reduceStaticFields(MapAbstractState<java.lang.String,ContentT> staticFields)
staticFields - the static fields map that is modified by this method by performing
reductionprotected void reduceHeap(JvmHeapAbstractState<ContentT> heap, JvmFrameAbstractState<ContentT> reducedFrame, MapAbstractState<java.lang.String,ContentT> reducedStaticFields)
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 themprotected JvmAbstractState<ContentT> createJvmAbstractState(JvmCfaNode programLocation, JvmFrameAbstractState<ContentT> frame, JvmHeapAbstractState<ContentT> heap, MapAbstractState<java.lang.String,ContentT> staticFields)