本文整理了Java中com.ibm.wala.util.graph.Graph.getPredNodeCount()
方法的一些代码示例,展示了Graph.getPredNodeCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.getPredNodeCount()
方法的具体详情如下:
包路径:com.ibm.wala.util.graph.Graph
类名称:Graph
方法名:getPredNodeCount
暂无
代码示例来源:origin: wala/WALA
@Override
public int getPredNodeCount(T N) throws IllegalArgumentException {
return delegate.getPredNodeCount(N);
}
代码示例来源:origin: com.ibm.wala/com.ibm.wala.util
@Override
public int getPredNodeCount(T N) throws IllegalArgumentException {
return delegate.getPredNodeCount(N);
}
代码示例来源:origin: wala/WALA
@Override
public int getPredNodeCount(T N) throws IllegalArgumentException {
return delegate.getPredNodeCount(N);
}
代码示例来源:origin: wala/WALA
@Override
public int getPredNodeCount(T N) throws IllegalArgumentException {
return delegate.getPredNodeCount(N);
}
代码示例来源:origin: wala/WALA
@Override
public int getPredNodeCount(T N) throws IllegalArgumentException {
return delegate.getPredNodeCount(N);
}
代码示例来源:origin: com.ibm.wala/com.ibm.wala.util
@Override
public int getPredNodeCount(T N) throws IllegalArgumentException {
return delegate.getPredNodeCount(N);
}
代码示例来源:origin: wala/WALA
public static <T> Set<T> inferRoots(Graph<T> g){
if (g == null) {
throw new IllegalArgumentException("g is null");
}
HashSet<T> s = HashSetFactory.make();
for (T node : g) {
if (g.getPredNodeCount(node) == 0) {
s.add(node);
}
}
return s;
}
}
代码示例来源:origin: wala/WALA
public static <T> Set<T> inferRoots(Graph<T> g){
if (g == null) {
throw new IllegalArgumentException("g is null");
}
HashSet<T> s = HashSetFactory.make();
for (T node : g) {
if (g.getPredNodeCount(node) == 0) {
s.add(node);
}
}
return s;
}
}
代码示例来源:origin: com.ibm.wala/com.ibm.wala.util
public static <T> Set<T> inferRoots(Graph<T> g){
if (g == null) {
throw new IllegalArgumentException("g is null");
}
HashSet<T> s = HashSetFactory.make();
for (T node : g) {
if (g.getPredNodeCount(node) == 0) {
s.add(node);
}
}
return s;
}
}
代码示例来源:origin: com.ibm.wala/com.ibm.wala.util
private void shortCircuitUnaryMeets(Graph<T> G, ITransferFunctionProvider<T,V> functions, UnionFind uf) {
for (T node : G) {
assert node != null;
int nPred = G.getPredNodeCount(node);
if (nPred == 1) {
// short circuit by setting IN = OUT_p
Object p = G.getPredNodes(node).next();
// if (p == null) {
// p = G.getPredNodes(node).next();
// }
assert p != null;
uf.union(getIn(node), functions.hasEdgeTransferFunctions() ? getEdge(p, node) : getOut(p));
}
}
}
代码示例来源:origin: wala/WALA
private void shortCircuitUnaryMeets(Graph<T> G, ITransferFunctionProvider<T,V> functions, UnionFind uf) {
for (T node : G) {
assert node != null;
int nPred = G.getPredNodeCount(node);
if (nPred == 1) {
// short circuit by setting IN = OUT_p
Object p = G.getPredNodes(node).next();
// if (p == null) {
// p = G.getPredNodes(node).next();
// }
assert p != null;
uf.union(getIn(node), functions.hasEdgeTransferFunctions() ? getEdge(p, node) : getOut(p));
}
}
}
代码示例来源:origin: wala/WALA
private void shortCircuitUnaryMeets(Graph<T> G, ITransferFunctionProvider<T,V> functions, UnionFind uf) {
for (T node : G) {
assert node != null;
int nPred = G.getPredNodeCount(node);
if (nPred == 1) {
// short circuit by setting IN = OUT_p
Object p = G.getPredNodes(node).next();
// if (p == null) {
// p = G.getPredNodes(node).next();
// }
assert p != null;
uf.union(getIn(node), functions.hasEdgeTransferFunctions() ? getEdge(p, node) : getOut(p));
}
}
}
代码示例来源:origin: wala/WALA
private static <T> void checkEdgeCounts(Graph<T> G) throws UnsoundGraphException {
for (T N : G) {
int count1 = G.getSuccNodeCount(N);
int count2 = IteratorUtil.count(G.getSuccNodes(N));
if (count1 != count2) {
throw new UnsoundGraphException("getSuccNodeCount " + count1 + " is wrong for node " + N);
}
int count3 = G.getPredNodeCount(N);
int count4 = IteratorUtil.count(G.getPredNodes(N));
if (count3 != count4) {
throw new UnsoundGraphException("getPredNodeCount " + count1 + " is wrong for node " + N);
}
}
}
代码示例来源:origin: wala/WALA
private static <T> void checkEdgeCounts(Graph<T> G) throws UnsoundGraphException {
for (T N : G) {
int count1 = G.getSuccNodeCount(N);
int count2 = IteratorUtil.count(G.getSuccNodes(N));
if (count1 != count2) {
throw new UnsoundGraphException("getSuccNodeCount " + count1 + " is wrong for node " + N);
}
int count3 = G.getPredNodeCount(N);
int count4 = IteratorUtil.count(G.getPredNodes(N));
if (count3 != count4) {
throw new UnsoundGraphException("getPredNodeCount " + count1 + " is wrong for node " + N);
}
}
}
代码示例来源:origin: com.ibm.wala/com.ibm.wala.util
private static <T> void checkEdgeCounts(Graph<T> G) throws UnsoundGraphException {
for (T N : G) {
int count1 = G.getSuccNodeCount(N);
int count2 = IteratorUtil.count(G.getSuccNodes(N));
if (count1 != count2) {
throw new UnsoundGraphException("getSuccNodeCount " + count1 + " is wrong for node " + N);
}
int count3 = G.getPredNodeCount(N);
int count4 = IteratorUtil.count(G.getPredNodes(N));
if (count3 != count4) {
throw new UnsoundGraphException("getPredNodeCount " + count1 + " is wrong for node " + N);
}
}
}
代码示例来源:origin: wala/WALA
BasicBlock exit = ir.getControlFlowGraph().exit();
if (!exit.equals(ir.getControlFlowGraph().entry())) {
Assert.assertTrue(graph.getPredNodeCount(exit) > 0);
代码示例来源:origin: wala/WALA
int nPred = G.getPredNodeCount(node);
if (nPred >= meetThreshold) {
代码示例来源:origin: wala/WALA
int nPred = G.getPredNodeCount(node);
if (nPred >= meetThreshold) {
代码示例来源:origin: com.ibm.wala/com.ibm.wala.util
int nPred = G.getPredNodeCount(node);
if (nPred >= meetThreshold) {
内容来源于网络,如有侵权,请联系作者删除!