while( rtItr2.hasNext() ) {
ReachTuple rt2 = rtItr2.next();
- if( hrn.getAlpha().getStatesWithBoth( rt1, rt2 ) != null ) {
+ if( !hrn.getAlpha().getStatesWithBoth( rt1, rt2 ).isEmpty() ) {
return true;
}
}
continue;
}
- if( hrn.getAlpha().getStatesWithBoth( rt1, rt2 ) != null ) {
+ if( !hrn.getAlpha().getStatesWithBoth( rt1, rt2 ).isEmpty() ) {
return true;
}
}
FlatNew fnRoot1 = asA.getFlatNew();
FlatNew fnRoot2 = asB.getFlatNew();
FlatNew fnTarget = effectA.getAffectedAllocSite().getFlatNew();
- if (da.mayBothReachTarget(fmEnclosing, fnRoot1, fnRoot2, fnTarget)) {
- if (fnRoot1.equals(fnRoot2)) {
- if (!da.mayManyReachTarget(fmEnclosing, fnRoot1, fnTarget)) {
- // fine-grained conflict case
- conflictType =
- updateConflictType(conflictType, ConflictGraph.FINE_GRAIN_EDGE);
- } else {
- conflictType =
- updateConflictType(conflictType, ConflictGraph.COARSE_GRAIN_EDGE);
- }
+ if (fnRoot1.equals(fnRoot2)) {
+ if (!da.mayManyReachTarget(fmEnclosing, fnRoot1, fnTarget)) {
+ // fine-grained conflict case
+ conflictType =
+ updateConflictType(conflictType, ConflictGraph.FINE_GRAIN_EDGE);
} else {
conflictType =
- updateConflictType(conflictType, ConflictGraph.COARSE_GRAIN_EDGE);
+ updateConflictType(conflictType, ConflictGraph.COARSE_GRAIN_EDGE);
+ }
+ } else {
+ if (da.mayBothReachTarget(fmEnclosing, fnRoot1, fnRoot2, fnTarget)) {
+ conflictType =
+ updateConflictType(conflictType, ConflictGraph.COARSE_GRAIN_EDGE);
+ } else {
}
}
} else {
null, // don't do effects analysis again!
null // don't do effects analysis again!
);
-writeConflictGraph();
+ //writeConflictGraph();
// 10th pass, calculate conflicts with reachability info
calculateConflicts(null, true);
rm -f IR/*.class IR/Tree/*.class Main/*.class Lex/*.class Parse/*.class Parse/Sym.java Parse/Parser.java IR/Flat/*.class classdefs.h methodheaders.h methods.c structdefs.h virtualtable.h task.h taskdefs.c taskdefs.h Analysis/*.class Analysis/Flag/*.class Analysis/CallGraph/*.class Analysis/TaskStateAnalysis/*.class Interface/*.class Util/*.class Analysis/Locality/*.class Analysis/Prefetch/*.class Analysis/FlatIRGraph/*.class Analysis/OwnershipAnalysis/*.class Analysis/Disjoint/*.class Analysis/OoOJava/*.class Analysis/MLP/*.class Analysis/Scheduling/*.class Analysis/Loops/*.class
cleanclass:
- rm -f IR/*.class IR/Tree/*.class Main/*.class IR/Flat/*.class Analysis/*.class Analysis/Flag/*.class Analysis/CallGraph/*.class Analysis/TaskStateAnalysis/*.class Interface/*.class Util/*.class Analysis/Locality/*.class Analysis/Prefetch/*.class Analysis/FlatIRGraph/*.class Analysis/OwnershipAnalysis/*.class Analysis/Disjoint/*.class Analysis/MLP/*.class Analysis/Scheduling/*.class Analysis/Loops/*.class
+ rm -f IR/*.class IR/Tree/*.class Main/*.class IR/Flat/*.class Analysis/*.class Analysis/Flag/*.class Analysis/CallGraph/*.class Analysis/TaskStateAnalysis/*.class Interface/*.class Util/*.class Analysis/Locality/*.class Analysis/Prefetch/*.class Analysis/FlatIRGraph/*.class Analysis/OwnershipAnalysis/*.class Analysis/Disjoint/*.class Analysis/OoOJava/*.class Analysis/MLP/*.class Analysis/Scheduling/*.class Analysis/Loops/*.class
cleandoc:
rm -rf javadoc
--- /dev/null
+PROGRAM=test
+
+SOURCE_FILES=$(PROGRAM).java
+
+BUILDSCRIPT=~/research/Robust/src/buildscript
+
+BSFLAGS= -mainclass Test -joptimize -justanalyze -ooojava -disjoint -disjoint-k 1 -enable-assertions
+DEBUGFLAGS= -disjoint-write-dots final #-disjoint-write-initial-contexts -disjoint-write-ihms -disjoint-debug-snap-method main 0 10 true
+
+all: $(PROGRAM).bin
+
+view: PNGs
+ eog *.png &
+
+PNGs: DOTs
+ d2p *COMPLETE*.dot
+
+DOTs: $(PROGRAM).bin
+
+$(PROGRAM).bin: $(SOURCE_FILES)
+ $(BUILDSCRIPT) $(BSFLAGS) $(DEBUGFLAGS) -o $(PROGRAM) $(SOURCE_FILES)
+
+clean:
+ rm -f $(PROGRAM).bin
+ rm -fr tmpbuilddirectory
+ rm -f *~
+ rm -f *.dot
+ rm -f *.png
+ rm -f aliases.txt
+ rm -f effects.txt
--- /dev/null
+public class Foo {
+ public Foo() {}
+ public Foo f;
+ public Foo g;
+ public int v;
+}
+
+public class Test {
+
+ static public void main( String[] args ) {
+
+ Foo r1 = new Foo();
+ Foo r2 = new Foo();
+
+ Foo a = null;
+
+ while( false ) {
+
+ r2.f = r1.f;
+
+ if( true ) {
+ r1.f = a;
+ }
+
+ a = new Foo();
+ }
+
+ rblock r1 {
+
+ rblock c1 {
+ r1.f.v = 1;
+ }
+
+ r2.f.v = 2;
+ }
+
+
+ }
+}