When performing the operations:
authorjjenista <jjenista>
Fri, 28 Mar 2008 17:50:13 +0000 (17:50 +0000)
committerjjenista <jjenista>
Fri, 28 Mar 2008 17:50:13 +0000 (17:50 +0000)
  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.

Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java

index 1bc279c73ccd628731f54a88c9a3619c34139c79..a39a11293d748b61c09999d714327ac087c7e774 100644 (file)
@@ -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() +