From 3476ae84a1e274a26a0247c99271fc068494da59 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Fri, 18 Mar 2011 08:32:33 +0000 Subject: [PATCH] commit hacks to effect analysis...interfaces to allow disjoint/pointer analysis to be exchanged --- Robust/src/Analysis/Disjoint/Canonical.java | 1 - .../Analysis/Disjoint/DisjointAnalysis.java | 2 +- .../Analysis/Disjoint/EffectsAnalysis.java | 16 +++---- .../src/Analysis/Disjoint/HeapAnalysis.java | 8 ++++ Robust/src/Analysis/Disjoint/Taint.java | 12 +++--- .../src/Analysis/OoOJava/ConflictGraph.java | 43 ++++++++++--------- Robust/src/Analysis/OoOJava/ConflictNode.java | 35 +++++++-------- .../src/Analysis/OoOJava/OoOJavaAnalysis.java | 15 ++++--- Robust/src/Analysis/Pointer/AllocFactory.java | 2 + Robust/src/Analysis/Pointer/Pointer.java | 40 ++++++++++------- .../src/IR/Flat/RuntimeConflictResolver.java | 14 +++--- 11 files changed, 107 insertions(+), 81 deletions(-) create mode 100644 Robust/src/Analysis/Disjoint/HeapAnalysis.java diff --git a/Robust/src/Analysis/Disjoint/Canonical.java b/Robust/src/Analysis/Disjoint/Canonical.java index 71d1f125..3926b285 100644 --- a/Robust/src/Analysis/Disjoint/Canonical.java +++ b/Robust/src/Analysis/Disjoint/Canonical.java @@ -1514,7 +1514,6 @@ abstract public class Canonical { FlatSESEEnterNode sese ) { assert ts != null; assert ts.isCanonical(); - assert sese != null; // NEVER a cached result... (cry) TaintSet out = new TaintSet(); diff --git a/Robust/src/Analysis/Disjoint/DisjointAnalysis.java b/Robust/src/Analysis/Disjoint/DisjointAnalysis.java index 5e107d37..75d0646f 100644 --- a/Robust/src/Analysis/Disjoint/DisjointAnalysis.java +++ b/Robust/src/Analysis/Disjoint/DisjointAnalysis.java @@ -11,7 +11,7 @@ import java.util.*; import java.io.*; -public class DisjointAnalysis { +public class DisjointAnalysis implements HeapAnalysis { /////////////////////////////////////////// // diff --git a/Robust/src/Analysis/Disjoint/EffectsAnalysis.java b/Robust/src/Analysis/Disjoint/EffectsAnalysis.java index 07abff41..25bbe914 100644 --- a/Robust/src/Analysis/Disjoint/EffectsAnalysis.java +++ b/Robust/src/Analysis/Disjoint/EffectsAnalysis.java @@ -151,10 +151,10 @@ public class EffectsAnalysis { Alloc affectedAlloc = edge.getDst(); Effect effect = new Effect(affectedAlloc, Effect.read, fld); - for (Iterator taintSetIter = taintSet.iterator(); taintSetIter.hasNext();) { - Taint taint = taintSetIter.next(); - add(taint, effect, currentProgramPoint); - } + if (taintSet!=null) + for (Taint taint:taintSet.getTaints()) { + add(taint, effect, currentProgramPoint); + } } } @@ -194,10 +194,10 @@ public class EffectsAnalysis { TaintSet taintSet = edge.getTaints(); Alloc affectedAlloc = edge.getDst(); Effect effect = new Effect(affectedAlloc, Effect.write, fld); - for (Iterator taintSetIter = taintSet.iterator(); taintSetIter.hasNext();) { - Taint taint = taintSetIter.next(); - add( taint, effect, currentProgramPoint ); - } + if (taintSet!=null) + for (Taint taint:taintSet.getTaints()) { + add( taint, effect, currentProgramPoint ); + } } } diff --git a/Robust/src/Analysis/Disjoint/HeapAnalysis.java b/Robust/src/Analysis/Disjoint/HeapAnalysis.java new file mode 100644 index 00000000..8fd33252 --- /dev/null +++ b/Robust/src/Analysis/Disjoint/HeapAnalysis.java @@ -0,0 +1,8 @@ +package Analysis.Disjoint; +import IR.Flat.FlatNew; + +public interface HeapAnalysis { + public EffectsAnalysis getEffectsAnalysis(); + public Alloc getAllocationSiteFromFlatNew(FlatNew node); +} + diff --git a/Robust/src/Analysis/Disjoint/Taint.java b/Robust/src/Analysis/Disjoint/Taint.java index 44abdb4d..d80f7f8d 100644 --- a/Robust/src/Analysis/Disjoint/Taint.java +++ b/Robust/src/Analysis/Disjoint/Taint.java @@ -42,7 +42,7 @@ public class Taint extends Canonical { // either type of taint includes a var // and allocation site protected TempDescriptor var; - protected AllocSite allocSite; + protected Alloc allocSite; // taints have a new, possibly null element which is // the FlatNode at which the tainted reference was @@ -63,7 +63,7 @@ public class Taint extends Canonical { public static Taint factory( FlatSESEEnterNode sese, TempDescriptor insetVar, - AllocSite as, + Alloc as, FlatNode whereDefined, ExistPredSet eps ) { Taint out = new Taint( sese, null, insetVar, as, whereDefined, eps ); @@ -73,7 +73,7 @@ public class Taint extends Canonical { public static Taint factory( FlatNode stallSite, TempDescriptor var, - AllocSite as, + Alloc as, FlatNode whereDefined, ExistPredSet eps ) { Taint out = new Taint( null, stallSite, var, as, whereDefined, eps ); @@ -84,7 +84,7 @@ public class Taint extends Canonical { public static Taint factory( FlatSESEEnterNode sese, FlatNode stallSite, TempDescriptor var, - AllocSite as, + Alloc as, FlatNode whereDefined, ExistPredSet eps ) { Taint out = new Taint( sese, stallSite, var, as, whereDefined, eps ); @@ -95,7 +95,7 @@ public class Taint extends Canonical { protected Taint( FlatSESEEnterNode sese, FlatNode stallSite, TempDescriptor v, - AllocSite as, + Alloc as, FlatNode fnDefined, ExistPredSet eps ) { assert @@ -143,7 +143,7 @@ public class Taint extends Canonical { return var; } - public AllocSite getAllocSite() { + public Alloc getAllocSite() { return allocSite; } diff --git a/Robust/src/Analysis/OoOJava/ConflictGraph.java b/Robust/src/Analysis/OoOJava/ConflictGraph.java index 75304f40..50ddd6c3 100644 --- a/Robust/src/Analysis/OoOJava/ConflictGraph.java +++ b/Robust/src/Analysis/OoOJava/ConflictGraph.java @@ -12,6 +12,7 @@ import java.util.Set; import java.util.Map.Entry; import IR.State; +import Analysis.Disjoint.Alloc; import Analysis.Disjoint.AllocSite; import Analysis.Disjoint.DisjointAnalysis; import Analysis.Disjoint.Effect; @@ -93,7 +94,7 @@ public class ConflictGraph { public void addStallSiteEffect(Taint t, Effect e) { FlatNode fn = t.getStallSite(); TempDescriptor var = t.getVar(); - AllocSite as = t.getAllocSite(); + Alloc as = t.getAllocSite(); String id = var + "_fn" + fn.hashCode(); ConflictNode node = id2cn.get(id); @@ -110,7 +111,7 @@ public class ConflictGraph { FlatSESEEnterNode sese = t.getSESE(); TempDescriptor invar = t.getVar(); - AllocSite as = t.getAllocSite(); + Alloc as = t.getAllocSite(); String id = invar + "_sese" + sese.getPrettyIdentifier(); ConflictNode node = id2cn.get(id); @@ -225,9 +226,9 @@ public class ConflictGraph { private int calculateConflictType(ConflictNode node, boolean useReachInfo) { int conflictType = ConflictGraph.NON_WRITE_CONFLICT; - Hashtable> alloc2readEffects = node.getReadEffectSet(); - Hashtable> alloc2writeEffects = node.getWriteEffectSet(); - Hashtable> alloc2SUEffects = node.getStrongUpdateEffectSet(); + Hashtable> alloc2readEffects = node.getReadEffectSet(); + Hashtable> alloc2writeEffects = node.getWriteEffectSet(); + Hashtable> alloc2SUEffects = node.getStrongUpdateEffectSet(); conflictType = updateConflictType(conflictType, determineConflictType(node, alloc2writeEffects, node, @@ -244,12 +245,12 @@ public class ConflictGraph { int conflictType = ConflictGraph.NON_WRITE_CONFLICT; - Hashtable> alloc2readEffectsA = nodeA.getReadEffectSet(); - Hashtable> alloc2writeEffectsA = nodeA.getWriteEffectSet(); - Hashtable> alloc2SUEffectsA = nodeA.getStrongUpdateEffectSet(); - Hashtable> alloc2readEffectsB = nodeB.getReadEffectSet(); - Hashtable> alloc2writeEffectsB = nodeB.getWriteEffectSet(); - Hashtable> alloc2SUEffectsB = nodeB.getStrongUpdateEffectSet(); + Hashtable> alloc2readEffectsA = nodeA.getReadEffectSet(); + Hashtable> alloc2writeEffectsA = nodeA.getWriteEffectSet(); + Hashtable> alloc2SUEffectsA = nodeA.getStrongUpdateEffectSet(); + Hashtable> alloc2readEffectsB = nodeB.getReadEffectSet(); + Hashtable> alloc2writeEffectsB = nodeB.getWriteEffectSet(); + Hashtable> alloc2SUEffectsB = nodeB.getStrongUpdateEffectSet(); // if node A has write effects on reading/writing regions of node B conflictType = @@ -284,8 +285,8 @@ public class ConflictGraph { } private int hasStrongUpdateConflicts(ConflictNode nodeA, - Hashtable> SUEffectsTableA, ConflictNode nodeB, - Hashtable> readTableB, Hashtable> writeTableB, + Hashtable> SUEffectsTableA, ConflictNode nodeB, + Hashtable> readTableB, Hashtable> writeTableB, boolean useReachInfo) { int conflictType = ConflictGraph.NON_WRITE_CONFLICT; @@ -293,13 +294,13 @@ public class ConflictGraph { Iterator effectItrA = SUEffectsTableA.entrySet().iterator(); while (effectItrA.hasNext()) { Map.Entry meA = (Map.Entry) effectItrA.next(); - AllocSite asA = (AllocSite) meA.getKey(); + Alloc asA = (Alloc) meA.getKey(); Set strongUpdateSetA = (Set) meA.getValue(); Iterator effectItrB = readTableB.entrySet().iterator(); while (effectItrB.hasNext()) { Map.Entry meB = (Map.Entry) effectItrB.next(); - AllocSite asB = (AllocSite) meB.getKey(); + Alloc asB = (Alloc) meB.getKey(); Set esB = (Set) meB.getValue(); for (Iterator iterator = strongUpdateSetA.iterator(); iterator.hasNext();) { @@ -342,7 +343,7 @@ public class ConflictGraph { effectItrB = writeTableB.entrySet().iterator(); while (effectItrB.hasNext()) { Map.Entry meB = (Map.Entry) effectItrB.next(); - AllocSite asB = (AllocSite) meB.getKey(); + Alloc asB = (Alloc) meB.getKey(); Set esB = (Set) meB.getValue(); for (Iterator iterator = strongUpdateSetA.iterator(); iterator.hasNext();) { @@ -380,21 +381,21 @@ public class ConflictGraph { } private int determineConflictType(ConflictNode nodeA, - Hashtable> nodeAtable, ConflictNode nodeB, - Hashtable> nodeBtable, boolean useReachInfo) { + Hashtable> nodeAtable, ConflictNode nodeB, + Hashtable> nodeBtable, boolean useReachInfo) { int conflictType = ConflictGraph.NON_WRITE_CONFLICT; Iterator effectItrA = nodeAtable.entrySet().iterator(); while (effectItrA.hasNext()) { Map.Entry meA = (Map.Entry) effectItrA.next(); - AllocSite asA = (AllocSite) meA.getKey(); + Alloc asA = (Alloc) meA.getKey(); Set esA = (Set) meA.getValue(); Iterator effectItrB = nodeBtable.entrySet().iterator(); while (effectItrB.hasNext()) { Map.Entry meB = (Map.Entry) effectItrB.next(); - AllocSite asB = (AllocSite) meB.getKey(); + Alloc asB = (Alloc) meB.getKey(); Set esB = (Set) meB.getValue(); for (Iterator iterator = esA.iterator(); iterator.hasNext();) { @@ -454,7 +455,7 @@ public class ConflictGraph { return conflictType; } - private void addCoarseEffect(ConflictNode node, AllocSite as, Effect e) { + private void addCoarseEffect(ConflictNode node, Alloc as, Effect e) { Taint t = node.getTaint(as); addEffectSetByTaint(t, e); } diff --git a/Robust/src/Analysis/OoOJava/ConflictNode.java b/Robust/src/Analysis/OoOJava/ConflictNode.java index 932d7ed9..a83ecbe7 100644 --- a/Robust/src/Analysis/OoOJava/ConflictNode.java +++ b/Robust/src/Analysis/OoOJava/ConflictNode.java @@ -5,6 +5,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Set; +import Analysis.Disjoint.Alloc; import Analysis.Disjoint.AllocSite; import Analysis.Disjoint.Effect; import Analysis.Disjoint.Taint; @@ -16,12 +17,12 @@ import IR.Flat.TempDescriptor; public class ConflictNode { protected HashSet edgeSet; - protected HashSet allocSet; + protected HashSet allocSet; protected HashSet taintSet; - protected Hashtable> alloc2readEffectSet; - protected Hashtable> alloc2writeEffectSet; - protected Hashtable> alloc2strongUpdateEffectSet; + protected Hashtable> alloc2readEffectSet; + protected Hashtable> alloc2writeEffectSet; + protected Hashtable> alloc2strongUpdateEffectSet; protected int nodeType; protected String id; @@ -54,12 +55,12 @@ public class ConflictNode { edgeSet = new HashSet(); // redundant views of access root's // allocation sites for efficient retrieval - allocSet = new HashSet(); + allocSet = new HashSet(); taintSet = new HashSet(); - alloc2readEffectSet = new Hashtable>(); - alloc2writeEffectSet = new Hashtable>(); - alloc2strongUpdateEffectSet = new Hashtable>(); + alloc2readEffectSet = new Hashtable>(); + alloc2writeEffectSet = new Hashtable>(); + alloc2strongUpdateEffectSet = new Hashtable>(); this.id = id; this.nodeType = nodeType; @@ -70,7 +71,7 @@ public class ConflictNode { taintSet.add(t); } - public Taint getTaint(AllocSite as) { + public Taint getTaint(Alloc as) { for (Iterator iterator = taintSet.iterator(); iterator.hasNext();) { Taint t = (Taint) iterator.next(); if (t.getAllocSite().equals(as)) { @@ -80,7 +81,7 @@ public class ConflictNode { return null; } - public void addEffect(AllocSite as, Effect e) { + public void addEffect(Alloc as, Effect e) { if (e.getType() == Effect.read) { addReadEffect(as, e); } else if (e.getType() == Effect.write) { @@ -90,7 +91,7 @@ public class ConflictNode { } } - public void addReadEffect(AllocSite as, Effect e) { + public void addReadEffect(Alloc as, Effect e) { allocSet.add(as); Set effectSet = alloc2readEffectSet.get(as); if (effectSet == null) { @@ -101,7 +102,7 @@ public class ConflictNode { alloc2readEffectSet.put(as, effectSet); } - public void addWriteEffect(AllocSite as, Effect e) { + public void addWriteEffect(Alloc as, Effect e) { allocSet.add(as); Set effectSet = alloc2writeEffectSet.get(as); if (effectSet == null) { @@ -112,7 +113,7 @@ public class ConflictNode { alloc2writeEffectSet.put(as, effectSet); } - public void addStrongUpdateEffect(AllocSite as, Effect e) { + public void addStrongUpdateEffect(Alloc as, Effect e) { allocSet.add(as); Set effectSet = alloc2strongUpdateEffectSet.get(as); if (effectSet == null) { @@ -123,15 +124,15 @@ public class ConflictNode { alloc2strongUpdateEffectSet.put(as, effectSet); } - public Hashtable> getReadEffectSet() { + public Hashtable> getReadEffectSet() { return alloc2readEffectSet; } - public Hashtable> getWriteEffectSet() { + public Hashtable> getWriteEffectSet() { return alloc2writeEffectSet; } - public Hashtable> getStrongUpdateEffectSet() { + public Hashtable> getStrongUpdateEffectSet() { return alloc2strongUpdateEffectSet; } @@ -149,7 +150,7 @@ public class ConflictNode { public Set getFlatNewSet() { Set fnSet = new HashSet(); for (Iterator iterator = allocSet.iterator(); iterator.hasNext();) { - AllocSite as = (AllocSite) iterator.next(); + Alloc as = (Alloc) iterator.next(); FlatNew fn = as.getFlatNew(); fnSet.add(fn); } diff --git a/Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java b/Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java index 11d645e8..c73f7fa6 100644 --- a/Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java +++ b/Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java @@ -12,9 +12,11 @@ import java.util.Set; import java.util.Stack; import java.util.Map.Entry; +import Analysis.Pointer.Pointer; import Analysis.ArrayReferencees; import Analysis.Liveness; import Analysis.CallGraph.CallGraph; +import Analysis.Disjoint.HeapAnalysis; import Analysis.Disjoint.DisjointAnalysis; import Analysis.Disjoint.Effect; import Analysis.Disjoint.EffectsAnalysis; @@ -47,7 +49,7 @@ public class OoOJavaAnalysis { private TypeUtil typeUtil; private CallGraph callGraph; private RBlockRelationAnalysis rblockRel; - private DisjointAnalysis disjointAnalysisTaints; + private HeapAnalysis disjointAnalysisTaints; private DisjointAnalysis disjointAnalysisReach; private Set descriptorsToAnalyze; @@ -112,11 +114,10 @@ public class OoOJavaAnalysis { return fm; } - public DisjointAnalysis getDisjointAnalysis() { + public HeapAnalysis getDisjointAnalysis() { return disjointAnalysisTaints; } - public OoOJavaAnalysis( State state, TypeUtil typeUtil, CallGraph callGraph, @@ -198,7 +199,11 @@ public class OoOJavaAnalysis { // 5th pass, use disjointness with NO FLAGGED REGIONS // to compute taints and effects - disjointAnalysisTaints = + if (state.POINTER) { + disjointAnalysisTaints = new Pointer(state, typeUtil, callGraph, rblockRel); + ((Pointer)disjointAnalysisTaints).doAnalysis(); + } else + disjointAnalysisTaints = new DisjointAnalysis(state, typeUtil, callGraph, liveness, arrayReferencees, null, rblockRel, true ); // suppress output--this is an intermediate pass @@ -265,7 +270,7 @@ public class OoOJavaAnalysis { if (state.OOODEBUG) { try { writeReports(""); - disjointAnalysisTaints.getEffectsAnalysis().writeEffects("effects.txt"); + disjointAnalysisTaints.getEffectsAnalysis().writeEffects("effects.txt"); writeConflictGraph(); } catch (IOException e) {} } diff --git a/Robust/src/Analysis/Pointer/AllocFactory.java b/Robust/src/Analysis/Pointer/AllocFactory.java index f55ad02a..0e0ab7e6 100644 --- a/Robust/src/Analysis/Pointer/AllocFactory.java +++ b/Robust/src/Analysis/Pointer/AllocFactory.java @@ -6,6 +6,8 @@ import IR.*; import IR.Flat.*; public class AllocFactory { + public static AllocNode dummyNode=new AllocNode(-1, null, false); + public static class AllocNode implements Alloc { int allocsite; boolean summary; diff --git a/Robust/src/Analysis/Pointer/Pointer.java b/Robust/src/Analysis/Pointer/Pointer.java index 607812bc..62d9d844 100644 --- a/Robust/src/Analysis/Pointer/Pointer.java +++ b/Robust/src/Analysis/Pointer/Pointer.java @@ -5,17 +5,21 @@ import IR.*; import Analysis.Liveness; import Analysis.Pointer.BasicBlock.BBlock; import Analysis.Pointer.AllocFactory.AllocNode; +import Analysis.Disjoint.Alloc; import Analysis.Disjoint.Taint; import Analysis.Disjoint.TaintSet; import Analysis.Disjoint.Canonical; +import Analysis.Disjoint.HeapAnalysis; import Analysis.CallGraph.CallGraph; import Analysis.OoOJava.RBlockRelationAnalysis; +import Analysis.Disjoint.ExistPred; +import Analysis.Disjoint.ReachGraph; import Analysis.Disjoint.EffectsAnalysis; import Analysis.Disjoint.BuildStateMachines; import java.io.*; -public class Pointer { +public class Pointer implements HeapAnalysis{ HashMap blockMap; HashMap bbgraphMap; HashMap graphMap; @@ -23,7 +27,7 @@ public class Pointer { HashMap> returnMap; HashMap> bblivetemps; - boolean OoOJava=false; + private boolean OoOJava=false; CallGraph callGraph; State state; TypeUtil typeUtil; @@ -32,7 +36,6 @@ public class Pointer { TempDescriptor returntmp; RBlockRelationAnalysis taskAnalysis; EffectsAnalysis effectsAnalysis; - BuildStateMachines buildStateMachines; public Pointer(State state, TypeUtil typeUtil, CallGraph callGraph, RBlockRelationAnalysis taskAnalysis) { this(state, typeUtil); @@ -59,6 +62,10 @@ public class Pointer { this.returntmp=new TempDescriptor("RETURNVAL", stringcd); } + public EffectsAnalysis getEffectsAnalysis() { + return effectsAnalysis; + } + public BasicBlock getBBlock(FlatMethod fm) { if (!blockMap.containsKey(fm)) { blockMap.put(fm, BasicBlock.getBBlock(fm)); @@ -153,7 +160,7 @@ public class Pointer { } //DEBUG - if (true) { + if (false) { int debugindex=0; for(Map.Entry e:bbgraphMap.entrySet()) { Graph g=e.getValue(); @@ -171,6 +178,9 @@ public class Pointer { debugindex++; } } + if (OoOJava) { + effectsAnalysis.buildStateMachines.writeStateMachines(); + } } void plotGraph(Graph g, String name) { @@ -418,7 +428,7 @@ public class Pointer { if (delta.getInit()) { removeInitTaints(null, delta, graph); for (TempDescriptor tmp:sese.getInVarSet()) { - Taint taint=Taint.factory(sese, null, tmp, null, sese, null); + Taint taint=Taint.factory(sese, null, tmp, AllocFactory.dummyNode, sese, ReachGraph.predsEmpty); MySet edges=GraphManip.getEdges(graph, delta, tmp); for(Edge e:edges) { Edge newe=e.addTaint(taint); @@ -426,9 +436,9 @@ public class Pointer { } } } else { - removeDiffTaints(null, delta, graph); + removeDiffTaints(null, delta); for (TempDescriptor tmp:sese.getInVarSet()) { - Taint taint=Taint.factory(sese, null, tmp, null, sese, null); + Taint taint=Taint.factory(sese, null, tmp, AllocFactory.dummyNode, sese, ReachGraph.predsEmpty); MySet edges=GraphManip.getDiffEdges(delta, tmp); for(Edge e:edges) { Edge newe=e.addTaint(taint); @@ -544,7 +554,7 @@ public class Pointer { continue; for(Edge e:entry.getValue()) { //check whether this edge has been removed - if (removemap==null&&removemap.containsKey(entry.getKey())&& + if (removemap!=null&&removemap.containsKey(entry.getKey())&& removemap.get(entry.getKey()).contains(e)) continue; //have real edge @@ -561,10 +571,6 @@ public class Pointer { } } - void removeDiffTaints(FlatSESEEnterNode sese, Delta delta, Graph graph) { - - } - /* This function compute the edges for the this variable for a * callee if it exists. */ @@ -952,7 +958,11 @@ public class Pointer { delta.addVarEdge(e); } } - + + public Alloc getAllocationSiteFromFlatNew(FlatNew node) { + return allocFactory.getAllocNode(node, false); + } + void processSumHeapEdgeSet(HashMap> map, Delta delta, Graph graph) { MySet edgestoadd=new MySet(); MySet edgestoremove=new MySet(); @@ -1055,7 +1065,7 @@ public class Pointer { edgetoadd=origEdgeKey; } } - if (seseCallers!=null) + if (seseCallers!=null&&edgetoadd!=null) edgetoadd.taintModify(seseCallers); mergeCallEdge(graph, newDelta, edgetoadd); } @@ -1404,7 +1414,7 @@ public class Pointer { dst=ffn.getDst(); } if (OoOJava&&taskAnalysis.isPotentialStallSite(node)) { - taint=TaintSet.factory(Taint.factory(node, src, null, null, null)); + taint=TaintSet.factory(Taint.factory(node, src, AllocFactory.dummyNode, null, ReachGraph.predsEmpty)); } //Do nothing for non pointers diff --git a/Robust/src/IR/Flat/RuntimeConflictResolver.java b/Robust/src/IR/Flat/RuntimeConflictResolver.java index 413aea88..1d234f90 100644 --- a/Robust/src/IR/Flat/RuntimeConflictResolver.java +++ b/Robust/src/IR/Flat/RuntimeConflictResolver.java @@ -148,7 +148,7 @@ public class RuntimeConflictResolver { ConflictGraph conflictGraph; ReachGraph rg; Hashtable> conflicts; - DisjointAnalysis disjointAnaylsis = oooa.getDisjointAnalysis(); + DisjointAnalysis disjointAnalysis = (DisjointAnalysis) oooa.getDisjointAnalysis(); //Go through the SESE's printDebug(generalDebug, "======================SESE's======================"); @@ -159,7 +159,7 @@ public class RuntimeConflictResolver { (parentSESE = (FlatSESEEnterNode) fsen.getParents().iterator().next()) != null && (conflictGraph = oooa.getConflictGraph(parentSESE)) != null && (conflicts = conflictGraph.getConflictEffectSet(fsen)) != null && - (rg = disjointAnaylsis.getEnterReachGraph(fsen)) != null ){ + (rg = disjointAnalysis.getEnterReachGraph(fsen)) != null ){ addToTraverseToDoList(fsen, rg, conflicts, conflictGraph); } @@ -176,7 +176,7 @@ public class RuntimeConflictResolver { if( fsen.getParents().size() != 0 && (conflictGraph = oooa.getConflictGraph(fsen)) != null && (conflicts = conflictGraph.getConflictEffectSet(fn)) != null && - (rg = disjointAnaylsis.getEnterReachGraph(fn)) != null ){ + (rg = disjointAnalysis.getEnterReachGraph(fn)) != null ){ Set seseLockSet = oooa.getLockMappings(conflictGraph); Set waitingElementSet = @@ -909,7 +909,7 @@ public class RuntimeConflictResolver { private void printoutTable(EffectsTable table) { System.out.println("==============EFFECTS TABLE PRINTOUT=============="); - for(AllocSite as: table.table.keySet()) { + for(Alloc as: table.table.keySet()) { System.out.println("\tFor AllocSite " + as.getUniqueAllocSiteID()); BucketOfEffects boe = table.table.get(as); @@ -1227,11 +1227,11 @@ public class RuntimeConflictResolver { } private class EffectsTable { - private Hashtable table; + private Hashtable table; public EffectsTable(Hashtable> effects, Hashtable> conflicts) { - table = new Hashtable(); + table = new Hashtable(); // rehash all effects (as a 5-tuple) by their affected allocation site for (Taint t : effects.keySet()) { @@ -1266,7 +1266,7 @@ public class RuntimeConflictResolver { printoutTable(this); } - for(AllocSite key: table.keySet()) { + for(Alloc key: table.keySet()) { BucketOfEffects effects = table.get(key); //make sure there are actually conflicts in the bucket if(effects.potentiallyConflictingRoots != null && !effects.potentiallyConflictingRoots.isEmpty()){ -- 2.34.1