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
Modifier and TypeFieldDescriptionprotected final DefUse
Def-use informationprotected final IR
The governing IRprotected final CGNode
The node whose statements we are currently traversingprotected final SymbolTable
Governing symbol table -
Constructor Summary
ConstructorDescriptionStatementVisitor
(HeapModel heapModel, IFlowGraph g, IClassHierarchy cha, CallGraph cg, CGNode node) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addExceptionDefConstraints
(IR ir, CGNode node, List<ProgramCounter> peis, PointerKey exceptionVar, Set<IClass> catchClasses) Generate constraints which assign exception values into an exception pointervoid
setBasicBlock
(ISSABasicBlock block) The calling loop must call this in each iteration!void
visitArrayLoad
(SSAArrayLoadInstruction instruction) void
visitArrayStore
(SSAArrayStoreInstruction instruction) void
visitCheckCast
(SSACheckCastInstruction instruction) void
visitGet
(SSAGetInstruction instruction) void
visitGetCaughtException
(SSAGetCaughtExceptionInstruction instruction) protected void
visitGetInternal
(int lval, int ref, boolean isStatic, FieldReference field) void
visitInvoke
(SSAInvokeInstruction instruction) void
visitLoadMetadata
(SSALoadMetadataInstruction instruction) void
visitNew
(SSANewInstruction instruction) void
visitPi
(SSAPiInstruction instruction) void
visitPut
(SSAPutInstruction instruction) void
visitPutInternal
(int rval, int ref, boolean isStatic, FieldReference field) void
visitReturn
(SSAReturnInstruction instruction) void
visitThrow
(SSAThrowInstruction instruction) Methods inherited from class com.ibm.wala.ssa.SSAInstruction.Visitor
visitArrayLength, visitBinaryOp, visitComparison, visitConditionalBranch, visitConversion, visitGoto, visitInstanceof, visitMonitor, visitPhi, visitSwitch, visitUnaryOp
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.ibm.wala.ssa.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:
visitArrayLoad
in interfaceSSAInstruction.IVisitor
- Overrides:
visitArrayLoad
in classSSAInstruction.Visitor
-
visitArrayStore
- Specified by:
visitArrayStore
in interfaceSSAInstruction.IVisitor
- Overrides:
visitArrayStore
in classSSAInstruction.Visitor
- See Also:
-
visitCheckCast
- Specified by:
visitCheckCast
in interfaceSSAInstruction.IVisitor
- Overrides:
visitCheckCast
in classSSAInstruction.Visitor
- See Also:
-
visitReturn
- Specified by:
visitReturn
in interfaceSSAInstruction.IVisitor
- Overrides:
visitReturn
in classSSAInstruction.Visitor
- See Also:
-
visitGet
- Specified by:
visitGet
in interfaceSSAInstruction.IVisitor
- Overrides:
visitGet
in classSSAInstruction.Visitor
- See Also:
-
visitGetInternal
-
visitPut
- Specified by:
visitPut
in interfaceSSAInstruction.IVisitor
- Overrides:
visitPut
in classSSAInstruction.Visitor
- See Also:
-
visitPutInternal
-
visitInvoke
- Specified by:
visitInvoke
in interfaceSSAInstruction.IVisitor
- Overrides:
visitInvoke
in classSSAInstruction.Visitor
- See Also:
-
visitNew
- Specified by:
visitNew
in interfaceSSAInstruction.IVisitor
- Overrides:
visitNew
in classSSAInstruction.Visitor
- See Also:
-
visitThrow
- Specified by:
visitThrow
in interfaceSSAInstruction.IVisitor
- Overrides:
visitThrow
in classSSAInstruction.Visitor
- See Also:
-
visitGetCaughtException
- Specified by:
visitGetCaughtException
in interfaceSSAInstruction.IVisitor
- Overrides:
visitGetCaughtException
in classSSAInstruction.Visitor
-
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:
visitPi
in interfaceSSAInstruction.IVisitor
- Overrides:
visitPi
in classSSAInstruction.Visitor
-
getBasicBlock
-
setBasicBlock
The calling loop must call this in each iteration!- Specified by:
setBasicBlock
in interfaceAbstractDemandFlowGraph.FlowStatementVisitor
-
visitLoadMetadata
- Specified by:
visitLoadMetadata
in interfaceSSAInstruction.IVisitor
- Overrides:
visitLoadMetadata
in classSSAInstruction.Visitor
-