From: yeom Date: Mon, 2 Aug 2010 01:09:47 +0000 (+0000) Subject: changes. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b468e1e29ef00a32f49b331a623684b0c3ab69e0;p=IRC.git changes. --- diff --git a/Robust/src/Analysis/Disjoint/ReachGraph.java b/Robust/src/Analysis/Disjoint/ReachGraph.java index fcc94f8a..b2da61a8 100644 --- a/Robust/src/Analysis/Disjoint/ReachGraph.java +++ b/Robust/src/Analysis/Disjoint/ReachGraph.java @@ -490,7 +490,7 @@ public class ReachGraph { null, Canonical.intersection( betaY, betaHrn ), predsTrue, - edgeHrn.getTaints() + Canonical.unionORpreds(edgeHrn.getTaints(),edgeY.getTaints()) ); addEdgeOrMergeWithExisting( edgeNew ); diff --git a/Robust/src/Analysis/OoOJava/ConflictGraph.java b/Robust/src/Analysis/OoOJava/ConflictGraph.java index 58d5cd73..2db90da1 100644 --- a/Robust/src/Analysis/OoOJava/ConflictGraph.java +++ b/Robust/src/Analysis/OoOJava/ConflictGraph.java @@ -190,7 +190,8 @@ public class ConflictGraph { } if( (currentNode.isInVarNode() && entryNode.isInVarNode()) && - (currentNode.getSESEIdentifier()==entryNode.getSESEIdentifier()) ){ + (currentNode.getSESEIdentifier()==entryNode.getSESEIdentifier()) && + (currentNode.getVar().equals(entryNode.getVar())) ){ continue; } diff --git a/Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java b/Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java index 21815ea0..70eb4012 100644 --- a/Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java +++ b/Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java @@ -160,7 +160,7 @@ public class OoOJavaAnalysis { rblockRel, rblockStatus ); - + // 6th pass, not available analysis FOR VARIABLES! methItr = descriptorsToAnalyze.iterator(); while (methItr.hasNext()) { @@ -209,6 +209,7 @@ public class OoOJavaAnalysis { // for objects that may cause heap conflicts so the most // efficient method to deal with conflict can be computed // later + disjointAnalysisReach = new DisjointAnalysis(state, typeUtil, @@ -253,6 +254,22 @@ public class OoOJavaAnalysis { } } + + private void writeFile(Set sitesToFlag){ + + try{ + BufferedWriter bw = new BufferedWriter( new FileWriter( "sitesToFlag.txt" ) ); + + for (Iterator iterator = sitesToFlag.iterator(); iterator.hasNext();) { + FlatNew fn = (FlatNew) iterator.next(); + bw.write( fn+"\n" ); + } + bw.close(); + }catch(IOException e){ + + } + + } private void livenessAnalysisBackward(FlatSESEEnterNode fsen, boolean toplevel, Hashtable> liveout) { @@ -1282,6 +1299,12 @@ private void codePlansForward( FlatMethod fm ) { // but the edge must remain uncovered. changed = true; + + if(seseLock.containsConflictNode(newNode)){ + seseLock.addEdge(edge); + fineToCover.remove(edge); + break; + } if (seseLock.isWriteNode(newNode)) { if (newNode.isStallSiteNode()) { diff --git a/Robust/src/Analysis/OoOJava/SESELock.java b/Robust/src/Analysis/OoOJava/SESELock.java index 77533ce5..4b4e6c64 100644 --- a/Robust/src/Analysis/OoOJava/SESELock.java +++ b/Robust/src/Analysis/OoOJava/SESELock.java @@ -110,7 +110,8 @@ public class SESELock { } else { return null; } - + + int count = 0; Set edgeSet = newNode.getEdgeSet(); for (Iterator iterator = edgeSet.iterator(); iterator.hasNext();) { @@ -123,10 +124,29 @@ public class SESELock { count++; } } + + if(conflictNodeSet.contains(newNode)){ + count++; + } - if (count == conflictNodeSet.size()) { - // connected to all current nodes in group - return newNode; + if(isWriteNode(newNode)){ + if (count == conflictNodeSet.size()) { + // connected to all current nodes in group + return newNode; + } + }else{ + // it is read node + int writeNodeCount=0; + for (Iterator iterator = conflictNodeSet.iterator(); iterator.hasNext();) { + ConflictNode node = (ConflictNode) iterator.next(); + if(isWriteNode(node)){ + writeNodeCount++; + } + } + if (count == writeNodeCount) { + // connected to all current write nodes in group + return newNode; + } } return null;