From 72a0db4e91395b82e5864f0eb564a76f94f75eee Mon Sep 17 00:00:00 2001 From: jjenista Date: Tue, 30 Mar 2010 22:13:20 +0000 Subject: [PATCH] turn strong updates back on from yesterday testing, add a non-terminating example using just strong updates --- Robust/src/Analysis/Disjoint/ReachGraph.java | 2 +- .../Tests/disjoint/nonTermination2/makefile | 33 ++++++++++++++ .../Tests/disjoint/nonTermination2/test.java | 44 +++++++++++++++++++ 3 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 Robust/src/Tests/disjoint/nonTermination2/makefile create mode 100644 Robust/src/Tests/disjoint/nonTermination2/test.java diff --git a/Robust/src/Analysis/Disjoint/ReachGraph.java b/Robust/src/Analysis/Disjoint/ReachGraph.java index d775acaa..d61a76c7 100644 --- a/Robust/src/Analysis/Disjoint/ReachGraph.java +++ b/Robust/src/Analysis/Disjoint/ReachGraph.java @@ -9,7 +9,7 @@ import java.io.*; public class ReachGraph { // use to disable improvements for comparison - protected static final boolean DISABLE_STRONG_UPDATES = true; + protected static final boolean DISABLE_STRONG_UPDATES = false; protected static final boolean DISABLE_GLOBAL_SWEEP = false; // a special out-of-scope temp diff --git a/Robust/src/Tests/disjoint/nonTermination2/makefile b/Robust/src/Tests/disjoint/nonTermination2/makefile new file mode 100644 index 00000000..28536c97 --- /dev/null +++ b/Robust/src/Tests/disjoint/nonTermination2/makefile @@ -0,0 +1,33 @@ +PROGRAM=test + +SOURCE_FILES=$(PROGRAM).java + +BUILDSCRIPT=~/research/Robust/src/buildscript + + +BSFLAGS= -mainclass Test -justanalyze -disjoint -disjoint-k 2 -disjoint-write-dots final -enable-assertions + +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) + +OLDBSFLAGS= -mainclass Test -justanalyze -ownership -ownallocdepth 1 -ownwritedots final -enable-assertions +old: $(SOURCE_FILES) + $(BUILDSCRIPT) $(OLDBSFLAGS) -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/nonTermination2/test.java b/Robust/src/Tests/disjoint/nonTermination2/test.java new file mode 100644 index 00000000..2d0ebb3f --- /dev/null +++ b/Robust/src/Tests/disjoint/nonTermination2/test.java @@ -0,0 +1,44 @@ +public class Foo { + public Foo() {} + public Foo f; +} + +public class Test { + + static public void main( String[] args ) { + /* + Foo x = new Foo(); + Foo y = new Foo(); + x.f = y; + + while( false ) { + + y = x; + + while( false ) { + Foo t = y.f; + y.f = null; + y = t; + } + + } + */ + + Foo x = new Foo(); + x.f = new Foo(); + x.f.f = x; + + Foo y = null; + + while( false ) { + + //erase all edges in circle list + Foo tmpy = y.f; + y.f = null; + tmpy.f = null; + y = x.f.f; + } + + + } +} -- 2.34.1