Class DemandPointerFlowGraph.StatementVisitor
java.lang.Object
com.ibm.wala.ssa.SSAInstruction.Visitor
com.ibm.wala.demandpa.flowgraph.DemandPointerFlowGraph.StatementVisitor
- All Implemented Interfaces:
AbstractDemandFlowGraph.FlowStatementVisitor, SSAInstruction.IVisitor
- Enclosing class:
DemandPointerFlowGraph
public static class DemandPointerFlowGraph.StatementVisitor
extends SSAInstruction.Visitor
implements AbstractDemandFlowGraph.FlowStatementVisitor
A visitor that generates graph nodes and edges for an IR.
strategy: when visiting a statement, for each use of that statement, add a graph edge from def to use.
TODO: special treatment for parameter passing, etc.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final DefUseDef-use informationprotected final IRThe governing IRprotected final CGNodeThe node whose statements we are currently traversingprotected final SymbolTableGoverning symbol table -
Constructor Summary
ConstructorsConstructorDescriptionStatementVisitor(HeapModel heapModel, IFlowGraph g, IClassHierarchy cha, CallGraph cg, CGNode node) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddExceptionDefConstraints(IR ir, CGNode node, List<ProgramCounter> peis, PointerKey exceptionVar, Set<IClass> catchClasses) Generate constraints which assign exception values into an exception pointervoidsetBasicBlock(ISSABasicBlock block) The calling loop must call this in each iteration!voidvisitArrayLoad(SSAArrayLoadInstruction instruction) voidvisitArrayStore(SSAArrayStoreInstruction instruction) voidvisitCheckCast(SSACheckCastInstruction instruction) voidvisitGet(SSAGetInstruction instruction) voidvisitGetCaughtException(SSAGetCaughtExceptionInstruction instruction) protected voidvisitGetInternal(int lval, int ref, boolean isStatic, FieldReference field) voidvisitInvoke(SSAInvokeInstruction instruction) voidvisitLoadMetadata(SSALoadMetadataInstruction instruction) voidvisitNew(SSANewInstruction instruction) voidvisitPi(SSAPiInstruction instruction) voidvisitPut(SSAPutInstruction instruction) voidvisitPutInternal(int rval, int ref, boolean isStatic, FieldReference field) voidvisitReturn(SSAReturnInstruction instruction) voidvisitThrow(SSAThrowInstruction instruction) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SSAInstruction.IVisitor
visitArrayLength, visitBinaryOp, visitComparison, visitConditionalBranch, visitConversion, visitGoto, visitInstanceof, visitMonitor, visitPhi, visitSwitch, visitUnaryOp
-
Field Details
-
node
The node whose statements we are currently traversing -
ir
The governing IR -
symbolTable
Governing symbol table -
du
Def-use information
-
-
Constructor Details
-
StatementVisitor
public StatementVisitor(HeapModel heapModel, IFlowGraph g, IClassHierarchy cha, CallGraph cg, CGNode node)
-
-
Method Details
-
visitArrayLoad
- Specified by:
visitArrayLoadin interfaceSSAInstruction.IVisitor
-
visitArrayStore
- Specified by:
visitArrayStorein interfaceSSAInstruction.IVisitor- See Also:
-
visitCheckCast
- Specified by:
visitCheckCastin interfaceSSAInstruction.IVisitor- See Also:
-
visitReturn
- Specified by:
visitReturnin interfaceSSAInstruction.IVisitor- See Also:
-
visitGet
- Specified by:
visitGetin interfaceSSAInstruction.IVisitor- See Also:
-
visitGetInternal
-
visitPut
- Specified by:
visitPutin interfaceSSAInstruction.IVisitor- See Also:
-
visitPutInternal
-
visitInvoke
- Specified by:
visitInvokein interfaceSSAInstruction.IVisitor- See Also:
-
visitNew
- Specified by:
visitNewin interfaceSSAInstruction.IVisitor- See Also:
-
visitThrow
- Specified by:
visitThrowin interfaceSSAInstruction.IVisitor- See Also:
-
visitGetCaughtException
- Specified by:
visitGetCaughtExceptionin interfaceSSAInstruction.IVisitor
-
addExceptionDefConstraints
protected void addExceptionDefConstraints(IR ir, CGNode node, List<ProgramCounter> peis, PointerKey exceptionVar, Set<IClass> catchClasses) Generate constraints which assign exception values into an exception pointer- Parameters:
node- governing nodepeis- list of PEI instructionsexceptionVar- PointerKey representing a pointer to an exception valuecatchClasses- the types "caught" by the exceptionVar
-
visitPi
- Specified by:
visitPiin interfaceSSAInstruction.IVisitor
-
getBasicBlock
-
setBasicBlock
The calling loop must call this in each iteration!- Specified by:
setBasicBlockin interfaceAbstractDemandFlowGraph.FlowStatementVisitor
-
visitLoadMetadata
- Specified by:
visitLoadMetadatain interfaceSSAInstruction.IVisitor
-