From 54bdedd93b19c79b6e6ad17153300b3a58fa61b3 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Fri, 11 Mar 2011 07:34:02 +0000 Subject: [PATCH] running on some benchmarks.... --- Robust/src/Analysis/Pointer/GraphManip.java | 2 +- Robust/src/Analysis/Pointer/Pointer.java | 51 +++++++++------------ 2 files changed, 22 insertions(+), 31 deletions(-) diff --git a/Robust/src/Analysis/Pointer/GraphManip.java b/Robust/src/Analysis/Pointer/GraphManip.java index 163e9581..73fde38b 100644 --- a/Robust/src/Analysis/Pointer/GraphManip.java +++ b/Robust/src/Analysis/Pointer/GraphManip.java @@ -148,7 +148,7 @@ public class GraphManip { MySet edges=entry.getValue(); MySet removeedges=delta.heapedgeremove.get(node); for(Edge e:edges) { - if (!removeedges.contains(e)) { + if (removeedges==null||!removeedges.contains(e)) { newedges.add(e); } } diff --git a/Robust/src/Analysis/Pointer/Pointer.java b/Robust/src/Analysis/Pointer/Pointer.java index 860dfb77..98e0512a 100644 --- a/Robust/src/Analysis/Pointer/Pointer.java +++ b/Robust/src/Analysis/Pointer/Pointer.java @@ -63,15 +63,11 @@ public class Pointer { BBlock bblock=ppoint.getBBlock(); Vector nodes=bblock.nodes(); int startindex=0; - System.out.println("BB BEGIN"); - delta.print(); if (ppoint.getIndex()==-1) { //Build base graph for entrance to this basic block - System.out.println("INIT"); delta=applyInitDelta(delta, bblock); } else { - System.out.println("CALL"); startindex=ppoint.getIndex()+1; delta=applyCallDelta(delta, bblock); } @@ -80,8 +76,6 @@ public class Pointer { //Compute delta at exit of each node for(int i=startindex; i e:bbgraphMap.entrySet()) { - Graph g=e.getValue(); - plotGraph(g,"BB"+debugindex); - debugindex++; - } - - for(Map.Entry e:graphMap.entrySet()) { - FlatNode fn=e.getKey(); - Graph g=e.getValue(); - plotGraph(g,"FN"+fn.toString()+debugindex); - debugindex++; - } - for(FlatMethod fm:blockMap.keySet()) { - fm.printMethod(); + if (false) { + int debugindex=0; + for(Map.Entry e:bbgraphMap.entrySet()) { + Graph g=e.getValue(); + plotGraph(g,"BB"+debugindex); + debugindex++; + } + + for(Map.Entry e:graphMap.entrySet()) { + FlatNode fn=e.getKey(); + Graph g=e.getValue(); + plotGraph(g,"FN"+fn.toString()+debugindex); + debugindex++; + } + for(FlatMethod fm:blockMap.keySet()) { + fm.printMethod(); + } } } @@ -188,7 +182,6 @@ public class Pointer { HashSet tmpSet=new HashSet(); tmpSet.addAll(delta.basevaredge.keySet()); tmpSet.addAll(delta.varedgeadd.keySet()); - System.out.println(tmpSet); for(TempDescriptor tmp:tmpSet) { /* Start with the new incoming edges */ MySet newbaseedge=delta.basevaredge.get(tmp); @@ -250,8 +243,6 @@ public class Pointer { } } } - System.out.println("FINAL"); - newDelta.print(); /* Now we need to propagate newdelta */ if (!newDelta.heapedgeadd.isEmpty()||!newDelta.heapedgeremove.isEmpty()||!newDelta.varedgeadd.isEmpty()||!newDelta.addNodeAges.isEmpty()||!newDelta.addOldNodes.isEmpty()) { @@ -304,12 +295,11 @@ public class Pointer { case FKind.FlatExit: case FKind.FlatBackEdge: case FKind.FlatGenReachNode: + case FKind.FlatSESEEnterNode: + case FKind.FlatSESEExitNode: return processFlatNop(node, delta, newgraph); case FKind.FlatCall: return processFlatCall(bblock, index, (FlatCall) node, delta, newgraph); - case FKind.FlatSESEEnterNode: - case FKind.FlatSESEExitNode: - throw new Error("Unimplemented node:"+node); default: throw new Error("Unrecognized node:"+node); } @@ -1062,7 +1052,8 @@ public class Pointer { MySet edgeAdd=delta.heapedgeadd.get(src); MySet existingEdges=graph.getEdges(src); //remove edge from delta - edgeAdd.remove(e); + if (edgeAdd!=null) + edgeAdd.remove(e); //if the edge is already in the graph, add an explicit remove to the delta if (existingEdges.contains(e)) { delta.removeHeapEdge(e); -- 2.34.1