@Override public boolean hasEdge(CGNode src, CGNode dst) { int x = getNumber(src); int y = getNumber(dst); return predecessors.contains(y, x); } }
@Override public boolean hasEdge(T src, T dst) { int x = nodeManager.getNumber(src); int y = nodeManager.getNumber(dst); if (x < 0 || y < 0) { return false; } return successors.contains(x, y); }
@Override public boolean hasEdge(T src, T dst) { int x = nodeManager.getNumber(src); int y = nodeManager.getNumber(dst); if (x < 0 || y < 0) { return false; } return successors.contains(x, y); }
@Override public boolean hasEdge(T src, T dst) { int x = nodeManager.getNumber(src); int y = nodeManager.getNumber(dst); if (x < 0 || y < 0) { return false; } return successors.contains(x, y); }
@Override public boolean hasEdge(CGNode src, CGNode dst) { int x = getNumber(src); int y = getNumber(dst); return predecessors.contains(y, x); } }
/** * Does a particular summary edge exist? * * @param s_p local block number an entry * @param x local block number of an exit block * @param d1 source dataflow fact * @param d2 target dataflow fact */ public boolean contains(int s_p, int x, int d1, int d2) { int n = getIndexForEntryExitPair(s_p, x); IBinaryNaturalRelation R = summaries.get(n); if (R == null) { return false; } else { return R.contains(d1, d2); } }
/** * Does a particular summary edge exist? * * @param s_p local block number an entry * @param x local block number of an exit block * @param d1 source dataflow fact * @param d2 target dataflow fact */ public boolean contains(int s_p, int x, int d1, int d2) { int n = getIndexForEntryExitPair(s_p, x); IBinaryNaturalRelation R = summaries.get(n); if (R == null) { return false; } else { return R.contains(d1, d2); } }
public static <T> boolean hasIncomingBackEdges(Path p, NumberedGraph<T> G, T root) { /* * TODO: pull out computeBackEdges, and pass in the backedge relation as a parameter to this call */ IBinaryNaturalRelation backedges = computeBackEdges(G, root); for (int index = 0; index < p.size(); index++) { int gn = p.get(index); Iterator<? extends T> predIter = G.getPredNodes(G.getNode(gn)); while (predIter.hasNext()) { if (backedges.contains(G.getNumber(predIter.next()), gn)) return true; } } return false; }
public static <T> boolean hasIncomingBackEdges(Path p, NumberedGraph<T> G, T root) { /* * TODO: pull out computeBackEdges, and pass in the backedge relation as a parameter to this call */ IBinaryNaturalRelation backedges = computeBackEdges(G, root); for (int index = 0; index < p.size(); index++) { int gn = p.get(index); Iterator<? extends T> predIter = G.getPredNodes(G.getNode(gn)); while (predIter.hasNext()) { if (backedges.contains(G.getNumber(predIter.next()), gn)) return true; } } return false; }
public static <T> boolean hasIncomingBackEdges(Path p, NumberedGraph<T> G, T root) { /* * TODO: pull out computeBackEdges, and pass in the backedge relation as a parameter to this call */ IBinaryNaturalRelation backedges = computeBackEdges(G, root); for (int index = 0; index < p.size(); index++) { int gn = p.get(index); Iterator<? extends T> predIter = G.getPredNodes(G.getNode(gn)); while (predIter.hasNext()) { if (backedges.contains(G.getNumber(predIter.next()), gn)) return true; } } return false; }
return false; return R.contains(n, i);
return false; return R.contains(n, i);
/** * @return true iff the graph already contains this equation */ private boolean containsImplicitStatement(UnaryStatement<PointsToSetVariable> eq) { if (!containsVariable(eq.getLHS())) { return false; } if (!containsVariable(eq.getRightHandSide())) { return false; } int lhs = eq.getLHS().getGraphNodeId(); int rhs = eq.getRightHandSide().getGraphNodeId(); UnaryOperator op = eq.getOperator(); IBinaryNaturalRelation R = implicitUnaryMap.get(op); if (R != null) { return R.contains(lhs, rhs); } else { return false; } }
/** * @return true iff the graph already contains this equation */ private boolean containsImplicitStatement(UnaryStatement<PointsToSetVariable> eq) { if (!containsVariable(eq.getLHS())) { return false; } if (!containsVariable(eq.getRightHandSide())) { return false; } int lhs = eq.getLHS().getGraphNodeId(); int rhs = eq.getRightHandSide().getGraphNodeId(); UnaryOperator op = eq.getOperator(); IBinaryNaturalRelation R = implicitUnaryMap.get(op); if (R != null) { return R.contains(lhs, rhs); } else { return false; } }
int d2 = it.next(); IBinaryNaturalRelation R = contents.next(); if (R != null && R.contains(n, d1)) { result.add(d2);
int d2 = it.next(); IBinaryNaturalRelation R = contents.next(); if (R != null && R.contains(n, d1)) { result.add(d2);