fixes to make PropagationGraph and friends easier to use in dataflow problems

This commit is contained in:
Julian Dolby 2018-03-02 15:29:42 -05:00
parent e1def2ffb5
commit 6cb72ad2b8
1 changed files with 5 additions and 9 deletions

View File

@ -478,8 +478,7 @@ public class PropagationGraph implements IFixedPointSystem<PointsToSetVariable>
*/
@Override
public void addNode(PointsToSetVariable n) {
Assertions.UNREACHABLE();
assert containsNode(n);
}
/*
@ -543,15 +542,14 @@ public class PropagationGraph implements IFixedPointSystem<PointsToSetVariable>
/*
* @see com.ibm.wala.util.graph.EdgeManager#getPredNodeCount(java.lang.Object)
*/
@SuppressWarnings("unused")
public int getPredNodeCount(INodeWithNumber N) {
PointsToSetVariable v = (PointsToSetVariable) N;
@Override
public int getPredNodeCount(PointsToSetVariable v) {
int result = 0;
for (AbstractStatement eq : Iterator2Iterable.make(getStatementsThatDef(v))) {
if (useImplicitRepresentation(eq)) {
result++;
} else {
result += delegateGraph.getPredNodeCount(N);
result += delegateGraph.getPredNodeCount(v);
}
}
return result;
@ -643,9 +641,7 @@ public class PropagationGraph implements IFixedPointSystem<PointsToSetVariable>
@Override
@SuppressWarnings("unchecked")
protected NumberedEdgeManager getEdgeManager() {
// TODO Auto-generated method stub
Assertions.UNREACHABLE();
return null;
return this;
}
}