From: jjenista <jjenista>
Date: Wed, 12 Jan 2011 22:46:28 +0000 (+0000)
Subject: tests for playing around with analysis with respect to empty reach states
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=603cc7075a4b84258ba6e00c811930ba458a60b8;p=IRC.git

tests for playing around with analysis with respect to empty reach states
---

diff --git a/Robust/src/Tests/disjoint/empty-reach/makefile b/Robust/src/Tests/disjoint/empty-reach/makefile
new file mode 100644
index 00000000..0e28a608
--- /dev/null
+++ b/Robust/src/Tests/disjoint/empty-reach/makefile
@@ -0,0 +1,28 @@
+PROGRAM=test
+
+SOURCE_FILES=$(PROGRAM).java
+
+BUILDSCRIPT=~/research/Robust/src/buildscript
+BSFLAGS= -joptimize -mainclass Test -justanalyze -disjoint -disjoint-k 1 -enable-assertions \
+#-flatirusermethods -disjoint-write-dots final -disjoint-alias-file aliases.txt normal
+
+all: $(PROGRAM).bin
+
+view: PNGs
+	eog *.png &
+
+PNGs: DOTs
+	d2p *COMPLETE*.dot
+
+DOTs: $(PROGRAM).bin
+
+$(PROGRAM).bin: $(SOURCE_FILES)
+	$(BUILDSCRIPT) $(BSFLAGS) -o $(PROGRAM) $(SOURCE_FILES)
+
+clean:
+	rm -f  $(PROGRAM).bin
+	rm -fr tmpbuilddirectory
+	rm -f  *~
+	rm -f  *.dot
+	rm -f  *.png
+	rm -f  aliases.txt
diff --git a/Robust/src/Tests/disjoint/empty-reach/test.java b/Robust/src/Tests/disjoint/empty-reach/test.java
new file mode 100644
index 00000000..00b01180
--- /dev/null
+++ b/Robust/src/Tests/disjoint/empty-reach/test.java
@@ -0,0 +1,46 @@
+public class Foo {
+  public Foo() {}
+  public Foo f;
+  public Bar b;
+}
+
+public class Bar {
+  public Bar() {}
+}
+
+public class Test {
+  static public void main( String[] args ) {
+    Foo x =            new Foo();
+    Foo y =            new Foo();
+    Foo z = disjoint Z new Foo();
+    Foo w = disjoint W new Foo();
+    
+    Bar bNoZ  = getNewBar();
+    Bar bYesZ = getNewBar();
+    
+    x.b = bNoZ;
+    y.b = bYesZ;
+
+    genreach q1;
+
+    z.f = x;
+
+    genreach q2;
+
+    w.f = y;
+    
+    genreach q3;
+
+    Bar causeSummary = getNewBar();
+    causeSummary = getNewBar();
+
+    genreach q4;
+
+
+    //genreach q5;
+  }
+
+  static public Bar getNewBar() {
+    return new Bar();
+  }
+}