--- /dev/null
+PROGRAM1=testSingle
+PROGRAM2=testMulti
+
+SOURCE_FILES=test.java
+
+BUILDSCRIPT=../../../buildscript
+
+USEOOO= -ooojava 8 2 -ooodebug
+BSFLAGS= -64bit -mainclass Test -garbagestats -nooptimize -debug
+DISJOINT= -disjoint -disjoint-k 1 -enable-assertions #-disjoint-desire-determinism
+
+
+all: $(PROGRAM1).bin $(PROGRAM2).bin
+
+$(PROGRAM1).bin: $(SOURCE_FILES)
+ $(BUILDSCRIPT) $(BSFLAGS) -o $(PROGRAM1) $(SOURCE_FILES)
+ rm -fr tmpbuilddirectory
+
+$(PROGRAM2).bin: $(SOURCE_FILES)
+ $(BUILDSCRIPT) $(USEOOO) $(BSFLAGS) -o $(PROGRAM2) $(SOURCE_FILES)
+
+clean:
+ rm -f $(PROGRAM1).bin
+ rm -f $(PROGRAM2).bin
+ rm -fr tmpbuilddirectory
+ rm -f *~
+ rm -f *.dot
+ rm -f *.png
+ rm -f *.txt
+ rm -f aliases.txt
+ rm -f mlpReport*txt
+ rm -f results*txt
--- /dev/null
+echo 'Each single/multi output line pair should be identical'
+
+echo '' > resultsSingle.txt
+echo '' > resultsMulti.txt
+
+for i in $(seq 3)
+do
+echo 'running...'
+./testSingle.bin $[ i ] >> resultsSingle.txt
+./testMulti.bin $[ i ] >> resultsMulti.txt
+./testSingle.bin $[ i*7 ] >> resultsSingle.txt
+./testMulti.bin $[ i*7 ] >> resultsMulti.txt
+#./testSingle.bin $[ 50+i*9 ] >> resultsSingle.txt
+#./testMulti.bin $[ 50+i*9 ] >> resultsMulti.txt
+done
+
+echo 'Diffing results'
+diff resultsSingle.txt resultsMulti.txt
--- /dev/null
+public class Foo {
+ public int z;
+
+ public Foo( int z ) {
+ this.z = z;
+ }
+}
+
+public class Test {
+
+ public static void main( String args[] ) {
+ if( args.length == 0 ) {
+ System.out.println( "give an integer workload argument, please!" );
+ System.exit( 0 );
+ }
+ int x = Integer.parseInt( args[0] );
+ Foo f = new Foo( x + 1000 );
+ int s = doSomeWork( x, f );
+ int t = moreWork( x, f );
+ nullMethodBodyFinalNode();
+ int r = s+t;
+ System.out.println( "s = "+s+
+ ", t = "+t+
+ ", r = "+r );
+ }
+
+ public static int doSomeWork( int x, Foo f ) {
+ float delta = 1.0f;
+ int out = 0;
+ for( int i = 0; i < x; ++i ) {
+ sese calc {
+ Foo g = new Foo( i );
+ int sum = 0;
+ for( int j = 0; j <= i % 10; ++j ) {
+ sum = calculateStuff( sum, 1, 0 );
+ }
+ }
+ sese forceVirtualReal {
+ if( i % 7 == 0 ) {
+ sum = sum + (i % 20);
+ }
+ for( int z = 0; z < x % 50; ++z ) {
+ if( i % 2 == 0 ) {
+ delta += 1.0f;
+ }
+ }
+ g.z = sum + 1000;
+ }
+ sese arrayAlloc {
+ int tempArray[] = new int[x];
+ for( int k = 0; k < x/20; ++k ) {
+ tempArray[k] = g.z / (i+1);
+ }
+ }
+ sese gather {
+ int inter = 1;
+ for( int k = 0; k < x/20; ++k ) {
+ inter = inter + tempArray[k];
+ }
+ sum = sum + inter / 10;
+ }
+ sese modobj {
+ g.z = g.z + f.z;
+ }
+ if( i % 11 == 0 ) {
+ sese change {
+ for( int k = 0; k < i*2; ++k ) {
+ sum = calculateStuff( sum, k, 1 );
+ }
+ sum = sum + 1;
+ }
+
+ for( int l = 0; l < 3; ++l ) {
+ sum = calculateStuff( sum, 2, 2 );
+ }
+ }
+ sese prnt {
+ if( i == x - 1 ) {
+ out = x + i + sum + (int)delta + g.z;
+ }
+ }
+ }
+ return out;
+ }
+
+ public static int calculateStuff( int sum, int num, int mode ) {
+ int answer = sum;
+ sese makePlaceholderStallAfter {
+ sum = sum + 1;
+ }
+ sum = sum + 1;
+ if( mode == 0 ) {
+ sese mode1 {
+ answer = sum + num;
+ }
+ } else if( mode == 1 ) {
+ sese mode2 {
+ answer = sum + (num/2);
+ }
+ } else {
+ sese mode3 {
+ answer = sum / num;
+ }
+ }
+ return answer;
+ }
+
+ public static int moreWork( int x, Foo f ) {
+
+ int total = 0;
+
+ for( int j = 0; j < x; ++j ) {
+ sese doe {
+ Foo g = new Foo( j );
+ int prod = 1;
+ }
+ sese rae {
+ if( j % 7 == 0 ) {
+ prod = prod * j;
+ }
+ g.z = prod / x;
+ }
+ sese mi {
+ g.z = g.z + f.z;
+ }
+ if( j % 3 == 0 ) {
+ sese fa {
+ prod = prod / 2;
+ }
+ }
+
+ total = total + prod - g.z;
+ }
+
+ return total;
+ }
+
+ public static void nullMethodBodyFinalNode() {
+ int y = 1;
+ sese nothing {
+ int x = 0;
+ }
+ y = x;
+ if( x > y ) {
+ return;
+ } else {
+ return;
+ }
+ }
+}
--- /dev/null
+PROGRAM=Test
+
+SOURCE_FILES=test.java
+
+BUILDSCRIPT=../../../buildscript
+
+USEOOO= -ooojava 2 2 -ooodebug
+BSFLAGS= -64bit -mainclass $(PROGRAM) -garbagestats -joptimize -noloop -optimize -coreprof -coreprof-checkoverflow -debug
+DISJOINT= -disjoint -disjoint-k 1 -enable-assertions #-disjoint-desire-determinism
+
+default:
+ $(BUILDSCRIPT) -nojava $(USEOOO) $(BSFLAGS) $(DISJOINT) -o $(PROGRAM)p $(SOURCE_FILES) -builddir par
+
+single:
+ $(BUILDSCRIPT) $(BSFLAGS) -thread -o $(PROGRAM)s -builddir sing $(SOURCE_FILES)
+
+ooo:
+ $(BUILDSCRIPT) $(USEOOO) $(BSFLAGS) $(DISJOINT) -o $(PROGRAM)p -builddir par $(SOURCE_FILES)
+
+clean:
+ rm -f $(PROGRAM)p.bin $(PROGRAM)s.bin
+ rm -fr par sing
+ rm -f *~
+ rm -f *.dot
+ rm -f *.png
+ rm -f *.txt
+ rm -f aliases.txt
+ rm -f mlpReport*txt
+ rm -f results*txt