Class PropagationGraph
- java.lang.Object
-
- com.ibm.wala.ipa.callgraph.propagation.PropagationGraph
-
- All Implemented Interfaces:
IFixedPointSystem<PointsToSetVariable>
public class PropagationGraph extends Object implements IFixedPointSystem<PointsToSetVariable>
A dataflow graph implementation specialized for propagation-based pointer analysis
-
-
Constructor Summary
Constructors Constructor Description PropagationGraph()
-
Method Summary
-
-
-
Method Detail
-
addStatement
public void addStatement(GeneralStatement<PointsToSetVariable> eq)
- Throws:
IllegalArgumentException
- if eq is null
-
addStatement
public void addStatement(UnaryStatement<PointsToSetVariable> eq) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
removeVariable
public void removeVariable(PointsToSetVariable p)
-
getStatements
public Iterator<AbstractStatement> getStatements()
Description copied from interface:IFixedPointSystem
Return an Iterator of theIFixedPointStatement
s in this system- Specified by:
getStatements
in interfaceIFixedPointSystem<PointsToSetVariable>
- Returns:
- Iterator
-
removeStatement
public void removeStatement(IFixedPointStatement<PointsToSetVariable> eq) throws IllegalArgumentException
Description copied from interface:IFixedPointSystem
removes a given statement- Specified by:
removeStatement
in interfaceIFixedPointSystem<PointsToSetVariable>
- Throws:
IllegalArgumentException
-
reorder
public void reorder()
Description copied from interface:IFixedPointSystem
reorder the statements in this system- Specified by:
reorder
in interfaceIFixedPointSystem<PointsToSetVariable>
-
getStatementsThatUse
public Iterator<AbstractStatement> getStatementsThatUse(PointsToSetVariable v)
- Specified by:
getStatementsThatUse
in interfaceIFixedPointSystem<PointsToSetVariable>
- Returns:
- Iterator
, the statements that use the variable
-
getStatementsThatDef
public Iterator<AbstractStatement> getStatementsThatDef(PointsToSetVariable v)
- Specified by:
getStatementsThatDef
in interfaceIFixedPointSystem<PointsToSetVariable>
- Returns:
- Iterator
, the statements that def the variable
-
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 interfaceIFixedPointSystem<PointsToSetVariable>
- Throws:
IllegalArgumentException
- if v is null
-
getNumberOfStatementsThatDef
public int getNumberOfStatementsThatDef(PointsToSetVariable v)
- Specified by:
getNumberOfStatementsThatDef
in interfaceIFixedPointSystem<PointsToSetVariable>
-
getVariables
public Iterator<PointsToSetVariable> getVariables()
Description copied from interface:IFixedPointSystem
Return an Iterator of the variables in this graph- Specified by:
getVariables
in interfaceIFixedPointSystem<PointsToSetVariable>
- Returns:
- Iterator
-
performVerboseAction
public void performVerboseAction()
-
containsStatement
public boolean containsStatement(IFixedPointStatement<PointsToSetVariable> eq) throws IllegalArgumentException
- Specified by:
containsStatement
in interfaceIFixedPointSystem<PointsToSetVariable>
- Returns:
- true iff this system already contains an equation that is equal() to s
- Throws:
IllegalArgumentException
-
containsVariable
public boolean containsVariable(PointsToSetVariable v)
- Specified by:
containsVariable
in interfaceIFixedPointSystem<PointsToSetVariable>
- Returns:
- true iff this system already contains a variable that is equal() to v.
-
addStatement
public void addStatement(IFixedPointStatement<PointsToSetVariable> statement) throws IllegalArgumentException, UnimplementedError
Description copied from interface:IFixedPointSystem
Add a statement to the system- Specified by:
addStatement
in interfaceIFixedPointSystem<PointsToSetVariable>
- Throws:
IllegalArgumentException
UnimplementedError
-
getAssignmentGraph
public 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 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 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 String spaceReport()
-
-