From 7cf22c2ebf9d4cbc016ed15c1ebd403f0d36866b Mon Sep 17 00:00:00 2001
From: jjenista <jjenista>
Date: Mon, 2 Feb 2009 19:55:43 +0000
Subject: [PATCH] working support for disjointness on Java, still needs a
 little more functionality

---
 .../Analysis/OwnershipAnalysis/OwnershipAnalysis.java  |  5 ++++-
 .../src/Analysis/OwnershipAnalysis/OwnershipGraph.java | 10 ++++++++--
 Robust/src/Tests/mlp/syntaxTest/makefile               |  2 +-
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/Robust/src/Analysis/OwnershipAnalysis/OwnershipAnalysis.java b/Robust/src/Analysis/OwnershipAnalysis/OwnershipAnalysis.java
index a3b2c3be..d79e9150 100644
--- a/Robust/src/Analysis/OwnershipAnalysis/OwnershipAnalysis.java
+++ b/Robust/src/Analysis/OwnershipAnalysis/OwnershipAnalysis.java
@@ -306,7 +306,10 @@ public class OwnershipAnalysis {
 	Iterator methItr = cd.getMethods();
 	while( methItr.hasNext() ) {
 	  Descriptor d = (Descriptor) methItr.next();
-	  scheduleAllCallees(d);
+
+	  if( d.getSymbol().equals( "main" ) ) {
+	    scheduleAllCallees(d);
+	  }
 	}
       }
       
diff --git a/Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java b/Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java
index be552918..610ba4a6 100644
--- a/Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java
+++ b/Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java
@@ -80,12 +80,18 @@ public class OwnershipGraph {
                           ReachabilitySet alpha,
                           String description) {
 
+    boolean markForAnalysis = isFlagged || isParameter;
+
+    if( allocSite != null && allocSite.doForceAnalyze() ) {
+      markForAnalysis = true;
+    }
+
     if( id == null ) {
       id = OwnershipAnalysis.generateUniqueHeapRegionNodeID();
     }
 
     if( alpha == null ) {
-      if( isFlagged || isParameter || allocSite.doForceAnalyze() ) {
+      if( markForAnalysis ) {
 	alpha = new ReachabilitySet(
 	  new TokenTuple(id,
 	                 !isSingleObject,
@@ -101,7 +107,7 @@ public class OwnershipGraph {
 
     HeapRegionNode hrn = new HeapRegionNode(id,
                                             isSingleObject,
-                                            isFlagged,
+                                            markForAnalysis,
 					    isParameter,
                                             isNewSummary,
                                             allocSite,
diff --git a/Robust/src/Tests/mlp/syntaxTest/makefile b/Robust/src/Tests/mlp/syntaxTest/makefile
index 6cf21b13..dafc6056 100644
--- a/Robust/src/Tests/mlp/syntaxTest/makefile
+++ b/Robust/src/Tests/mlp/syntaxTest/makefile
@@ -3,7 +3,7 @@ PROGRAM=test
 SOURCE_FILES=$(PROGRAM).java
 
 BUILDSCRIPT=~/research/Robust/src/buildscript
-BSFLAGS= -ownership -ownallocdepth 1 -ownwritedots final -enable-assertions -flatirtasks #-recover -ownaliasfile aliases.txt
+BSFLAGS= -justanalyze -ownership -ownallocdepth 1 -ownwritedots final -enable-assertions -flatirtasks #-recover -ownaliasfile aliases.txt
 
 all: $(PROGRAM).bin
 
-- 
2.34.1