From b3687e2432be33a5d592459f44beec98d1908f35 Mon Sep 17 00:00:00 2001 From: jjenista <jjenista> Date: Fri, 28 Mar 2008 17:50:13 +0000 Subject: [PATCH] When performing the operations: assignTempToTemp assignTempToField assignFieldToTemp the newly created reference edge was copying the properties of the edges from labels (or other heap regions) that led to the src, dst pair. It creates bugs like when creating a reference from one parameter's heap region to another, it would copy the special "initial parameter reflexive edge" property to what is otherwise a normal edge. All new edges using these three basic assignment operations are now created with no special properties. In other words, the context of the new edge alone should determine its properties. --- .../OwnershipAnalysis/OwnershipGraph.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java b/Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java index 1bc279c7..a39a1129 100644 --- a/Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java +++ b/Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java @@ -161,8 +161,9 @@ public class OwnershipGraph { while( srcRegionsItr.hasNext() ) { Map.Entry me = (Map.Entry) srcRegionsItr.next(); newReferencee = (HeapRegionNode) me.getKey(); - ReferenceEdgeProperties rep = (ReferenceEdgeProperties) me.getValue(); - + //ReferenceEdgeProperties rep = (ReferenceEdgeProperties) me.getValue(); + ReferenceEdgeProperties rep = new ReferenceEdgeProperties(); + addReferenceEdge( dstln, newReferencee, rep.copy() ); } } @@ -186,7 +187,8 @@ public class OwnershipGraph { while( hrnRegionsItr.hasNext() ) { Map.Entry meH = (Map.Entry) hrnRegionsItr.next(); hrnOneHop = (HeapRegionNode) meH.getKey(); - ReferenceEdgeProperties rep = (ReferenceEdgeProperties) meH.getValue(); + //ReferenceEdgeProperties rep = (ReferenceEdgeProperties) meH.getValue(); + ReferenceEdgeProperties rep = new ReferenceEdgeProperties(); addReferenceEdge( dstln, hrnOneHop, rep.copy() ); } @@ -210,7 +212,8 @@ public class OwnershipGraph { while( srcRegionsItr.hasNext() ) { Map.Entry meS = (Map.Entry) srcRegionsItr.next(); hrnSrc = (HeapRegionNode) meS.getKey(); - ReferenceEdgeProperties rep = (ReferenceEdgeProperties) meS.getValue(); + //ReferenceEdgeProperties rep = (ReferenceEdgeProperties) meS.getValue(); + ReferenceEdgeProperties rep = new ReferenceEdgeProperties(); addReferenceEdge( hrn, hrnSrc, rep.copy() ); } @@ -1231,7 +1234,10 @@ public class OwnershipGraph { case VISIT_HRN_WRITE_FULL: String edgeLabel = ""; if( rep.isUnique() ) { - edgeLabel = "Unique"; + edgeLabel += "Unq"; + } + if( rep.isInitialParamReflexive() ) { + edgeLabel += "Rfx"; } bw.write( " " + hrn.toString() + " -> " + hrnChild.toString() + -- 2.34.1