From: jjenista Date: Wed, 4 Mar 2009 00:50:30 +0000 (+0000) Subject: change global sweep to shrink reachability sets rather than trash them X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a6718881d16e21fed3338f88421a279a873117b8;p=IRC.git change global sweep to shrink reachability sets rather than trash them --- diff --git a/Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java b/Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java index 6af319cb..ce1a3866 100644 --- a/Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java +++ b/Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java @@ -2184,8 +2184,12 @@ public class OwnershipGraph { Iterator itrRes = hrn.iteratorToReferencers(); while( itrRes.hasNext() ) { ReferenceEdge edge = itrRes.next(); - if( edge.getBeta().containsWithZeroes( tts ) && - !edge.getBetaNew().contains( tts ) ) { + + if( (edge.getBeta().containsWithZeroes( tts ) || + edge.getBeta().containsSuperSet ( tts ) + ) && + !edge.getBetaNew().contains( tts ) ) { + // okay, this is a valid propagation, and add to the // work set to further propagate it edge.setBetaNew( edge.getBetaNew().union( tts ) ); diff --git a/Robust/src/Tests/OwnershipAnalysisTest/test05/test.java b/Robust/src/Tests/OwnershipAnalysisTest/test05/test.java index b1fc0d65..a99a20b4 100644 --- a/Robust/src/Tests/OwnershipAnalysisTest/test05/test.java +++ b/Robust/src/Tests/OwnershipAnalysisTest/test05/test.java @@ -25,6 +25,7 @@ public class Test { X z; Y y; Y a; + X b = new X(); Y g = new Y(); x=disjoint X new X(); @@ -32,6 +33,7 @@ public class Test { x.f=y; z=x; a=z.f; + b.f=a; x.f=g; } }