Class PropagationGraph
- java.lang.Object
-
- com.ibm.wala.ipa.callgraph.propagation.PropagationGraph
-
- All Implemented Interfaces:
com.ibm.wala.fixpoint.IFixedPointSystem<PointsToSetVariable>
public class PropagationGraph extends java.lang.Object implements com.ibm.wala.fixpoint.IFixedPointSystem<PointsToSetVariable>
A dataflow graph implementation specialized for propagation-based pointer analysis
-
-
Constructor Summary
Constructors Constructor Description PropagationGraph()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addStatement(com.ibm.wala.fixedpoint.impl.GeneralStatement<PointsToSetVariable> eq)
void
addStatement(com.ibm.wala.fixpoint.IFixedPointStatement<PointsToSetVariable> statement)
void
addStatement(com.ibm.wala.fixpoint.UnaryStatement<PointsToSetVariable> eq)
boolean
containsStatement(com.ibm.wala.fixpoint.IFixedPointStatement<PointsToSetVariable> eq)
boolean
containsVariable(PointsToSetVariable v)
com.ibm.wala.util.graph.NumberedGraph<PointsToSetVariable>
getAssignmentGraph()
A graph of just the variables in the system.com.ibm.wala.util.graph.Graph<PointsToSetVariable>
getFilterAssignmentGraph()
A graph of just the variables in the system.com.ibm.wala.util.graph.Graph<PointsToSetVariable>
getFlowGraphIncludingImplicitConstraints()
NOTE: do not use this method unless you really know what you are doing.int
getNumberOfStatementsThatDef(PointsToSetVariable v)
int
getNumberOfStatementsThatUse(PointsToSetVariable v)
Note that this implementation consults the implicit relation for each and every operator cached.java.util.Iterator<com.ibm.wala.fixpoint.AbstractStatement>
getStatements()
java.util.Iterator<com.ibm.wala.fixpoint.AbstractStatement<PointsToSetVariable,?>>
getStatementsThatDef(PointsToSetVariable v)
java.util.Iterator<com.ibm.wala.fixpoint.AbstractStatement>
getStatementsThatUse(PointsToSetVariable v)
java.util.Iterator<PointsToSetVariable>
getVariables()
void
performVerboseAction()
void
removeStatement(com.ibm.wala.fixpoint.IFixedPointStatement<PointsToSetVariable> eq)
void
removeVariable(PointsToSetVariable p)
void
reorder()
java.lang.String
spaceReport()
-
-
-
Method Detail
-
addStatement
public void addStatement(com.ibm.wala.fixedpoint.impl.GeneralStatement<PointsToSetVariable> eq)
- Throws:
java.lang.IllegalArgumentException
- if eq is null
-
addStatement
public void addStatement(com.ibm.wala.fixpoint.UnaryStatement<PointsToSetVariable> eq) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
removeVariable
public void removeVariable(PointsToSetVariable p)
-
getStatements
public java.util.Iterator<com.ibm.wala.fixpoint.AbstractStatement> getStatements()
- Specified by:
getStatements
in interfacecom.ibm.wala.fixpoint.IFixedPointSystem<PointsToSetVariable>
-
removeStatement
public void removeStatement(com.ibm.wala.fixpoint.IFixedPointStatement<PointsToSetVariable> eq) throws java.lang.IllegalArgumentException
- Specified by:
removeStatement
in interfacecom.ibm.wala.fixpoint.IFixedPointSystem<PointsToSetVariable>
- Throws:
java.lang.IllegalArgumentException
-
reorder
public void reorder()
- Specified by:
reorder
in interfacecom.ibm.wala.fixpoint.IFixedPointSystem<PointsToSetVariable>
-
getStatementsThatUse
public java.util.Iterator<com.ibm.wala.fixpoint.AbstractStatement> getStatementsThatUse(PointsToSetVariable v)
- Specified by:
getStatementsThatUse
in interfacecom.ibm.wala.fixpoint.IFixedPointSystem<PointsToSetVariable>
-
getStatementsThatDef
public java.util.Iterator<com.ibm.wala.fixpoint.AbstractStatement<PointsToSetVariable,?>> getStatementsThatDef(PointsToSetVariable v)
- Specified by:
getStatementsThatDef
in interfacecom.ibm.wala.fixpoint.IFixedPointSystem<PointsToSetVariable>
-
getNumberOfStatementsThatUse
public int getNumberOfStatementsThatUse(PointsToSetVariable v)
Note that this implementation consults the implicit relation for each and every operator cached. This will be inefficient if there are many implicit operators.- Specified by:
getNumberOfStatementsThatUse
in interfacecom.ibm.wala.fixpoint.IFixedPointSystem<PointsToSetVariable>
- Throws:
java.lang.IllegalArgumentException
- if v is null
-
getNumberOfStatementsThatDef
public int getNumberOfStatementsThatDef(PointsToSetVariable v)
- Specified by:
getNumberOfStatementsThatDef
in interfacecom.ibm.wala.fixpoint.IFixedPointSystem<PointsToSetVariable>
-
getVariables
public java.util.Iterator<PointsToSetVariable> getVariables()
- Specified by:
getVariables
in interfacecom.ibm.wala.fixpoint.IFixedPointSystem<PointsToSetVariable>
-
performVerboseAction
public void performVerboseAction()
- See Also:
VerboseAction.performVerboseAction()
-
containsStatement
public boolean containsStatement(com.ibm.wala.fixpoint.IFixedPointStatement<PointsToSetVariable> eq) throws java.lang.IllegalArgumentException
- Specified by:
containsStatement
in interfacecom.ibm.wala.fixpoint.IFixedPointSystem<PointsToSetVariable>
- Throws:
java.lang.IllegalArgumentException
-
containsVariable
public boolean containsVariable(PointsToSetVariable v)
- Specified by:
containsVariable
in interfacecom.ibm.wala.fixpoint.IFixedPointSystem<PointsToSetVariable>
-
addStatement
public void addStatement(com.ibm.wala.fixpoint.IFixedPointStatement<PointsToSetVariable> statement) throws java.lang.IllegalArgumentException, com.ibm.wala.util.debug.UnimplementedError
- Specified by:
addStatement
in interfacecom.ibm.wala.fixpoint.IFixedPointSystem<PointsToSetVariable>
- Throws:
java.lang.IllegalArgumentException
com.ibm.wala.util.debug.UnimplementedError
-
getAssignmentGraph
public com.ibm.wala.util.graph.NumberedGraph<PointsToSetVariable> getAssignmentGraph()
A graph of just the variables in the system. v1 -> v2 iff there exists an assignment equation e s.t. e uses v1 and e defs v2.
-
getFilterAssignmentGraph
public com.ibm.wala.util.graph.Graph<PointsToSetVariable> getFilterAssignmentGraph()
A graph of just the variables in the system. v1 -> v2 iff there exists an Assingnment or Filter equation e s.t. e uses v1 and e defs v2.
-
getFlowGraphIncludingImplicitConstraints
public com.ibm.wala.util.graph.Graph<PointsToSetVariable> getFlowGraphIncludingImplicitConstraints()
NOTE: do not use this method unless you really know what you are doing. Functionality is fragile and may not work in the future.
-
spaceReport
public java.lang.String spaceReport()
-
-