From 36345f16fee62230ebd033ce39ecfe310b412458 Mon Sep 17 00:00:00 2001 From: jjenista Date: Thu, 12 Mar 2009 21:12:10 +0000 Subject: [PATCH] another test --- .../OwnershipAnalysisTest/test06/makefile | 27 +++++++++++++++++++ .../OwnershipAnalysisTest/test06/test.java | 22 +++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 Robust/src/Tests/OwnershipAnalysisTest/test06/makefile create mode 100644 Robust/src/Tests/OwnershipAnalysisTest/test06/test.java diff --git a/Robust/src/Tests/OwnershipAnalysisTest/test06/makefile b/Robust/src/Tests/OwnershipAnalysisTest/test06/makefile new file mode 100644 index 00000000..fdfcf351 --- /dev/null +++ b/Robust/src/Tests/OwnershipAnalysisTest/test06/makefile @@ -0,0 +1,27 @@ +PROGRAM=test + +SOURCE_FILES=$(PROGRAM).java + +BUILDSCRIPT=~/research/Robust/src/buildscript +BSFLAGS= -mainclass Test -justanalyze -ownership -ownallocdepth 1 -ownwritedots final -ownaliasfile aliases.txt -enable-assertions + +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/OwnershipAnalysisTest/test06/test.java b/Robust/src/Tests/OwnershipAnalysisTest/test06/test.java new file mode 100644 index 00000000..79128edd --- /dev/null +++ b/Robust/src/Tests/OwnershipAnalysisTest/test06/test.java @@ -0,0 +1,22 @@ + +public class Foo { + public Foo f; + public Foo g; + public Foo() {} +} + + +public class Test { + + static public void main( String[] args ) { + Foo a = disjoint A new Foo(); + + carolina( a ); + } + + static public void carolina( Foo p1 ) { + Foo z = disjoint Z new Foo(); + + p1.f = z; + } +} -- 2.34.1