Token propagation for normal assignments fixed. Tokens do not "age" with
authorjjenista <jjenista>
Sun, 27 Jul 2008 22:17:25 +0000 (22:17 +0000)
committerjjenista <jjenista>
Sun, 27 Jul 2008 22:17:25 +0000 (22:17 +0000)
edges properly during assignment to new allocation yet.

Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java
Robust/src/Analysis/OwnershipAnalysis/TokenTupleSet.java
Robust/src/Tests/OwnershipAnalysisTest/test01/test01.java

index ab25e11a0ea8a44505975deb763f10a2c6b9a4e6..a7a65cd016d70a45c3e1f88da000bc53c783e796 100644 (file)
@@ -357,9 +357,10 @@ public class OwnershipGraph {
                ReferenceEdgeProperties rep2 = (ReferenceEdgeProperties) meH.getValue();
                ReachabilitySet beta2        = rep2.getBeta();
 
-               ReferenceEdgeProperties rep = rep2.copy();
-               rep.setIsInitialParamReflexive( false );
-               rep.setBeta( beta1.intersection( beta2 ) );
+               ReferenceEdgeProperties rep = 
+                   new ReferenceEdgeProperties( false,
+                                                false,
+                                                beta1.intersection( beta2 ) );
 
                addReferenceEdge( dstln, hrnOneHop, rep );
            }
@@ -399,18 +400,27 @@ public class OwnershipGraph {
                
                ReachabilitySet O = srcln.getReferenceTo( hrnSrc ).getBeta();
 
+               ReferenceEdgeProperties repNew 
+                   = new ReferenceEdgeProperties( false, false, repSrc.getBeta() );
+
+               addReferenceEdge( hrn, hrnSrc, repNew );
+
+
+
                ChangeTupleSet Cy = O.unionUpArityToChangeSet( R );
-               ChangeTupleSet Cx = R.unionUpArityToChangeSet( O );
+               //ChangeTupleSet Cx = R.unionUpArityToChangeSet( O );
 
                propagateTokens( hrnSrc, Cy, nodesWithNewAlpha, edgesWithNewBeta );
-               propagateTokens( hrn,    Cx, nodesWithNewAlpha, edgesWithNewBeta );
+               //propagateTokens( hrn,    Cx, nodesWithNewAlpha, edgesWithNewBeta );
 
+               /*
                // note that this picks up the beta after the propogation has
                // been applied
                ReferenceEdgeProperties repNew 
                    = new ReferenceEdgeProperties( false, false, repSrc.getBetaNew() );
 
                addReferenceEdge( hrn, hrnSrc, repNew );
+               */
            }
        }       
 
@@ -691,6 +701,7 @@ public class OwnershipGraph {
        clearReferenceEdgesFrom( hrn0 );
        clearReferenceEdgesTo  ( hrn0 );
 
+       /*
        // now tokens in reachability sets need to "age" as well
        ReferenceEdgeProperties repToAge = null;
        Iterator itrAllLabelNodes = td2ln.entrySet().iterator();
@@ -722,7 +733,9 @@ public class OwnershipGraph {
 
                ageTokens( as, repToAge );
            }
-       }               
+       }
+       */
+       
     }
 
     protected void ageTokens( AllocationSite as, ReferenceEdgeProperties rep ) {
index ecf0633eb39d89639a6a3e852082ef871e020c99..c9c96abe94a21f73f0cb641f9c1dea3b675d95de 100644 (file)
@@ -172,7 +172,7 @@ public class TokenTupleSet extends Canonical {
                } else {
                    // otherwise, we change this token to the
                    // next older token
-                   Integer tokenToChangeTo = as.getIthOldest( age + 1 );
+                   Integer tokenToChangeTo = as.getIthOldest( age + 1 );                  
                    tt = tt.changeTokenTo( tokenToChangeTo );
                }
            }
index 2072c0b439d1702f7c18331de1fda592224179b8..8b843453d3311ee1856a245effc719a5b87287cf 100644 (file)
@@ -59,12 +59,23 @@ task Startup( StartupObject s{ initialstate } ) {
        a.x   = new Foo();
     }
 
+    /*
     Foo b;
     while( false ) {
        Foo c = new Foo();
        c.x = b;
        b = c;
     }
+    */
+
+    /*
+    Foo a = new Foo();
+    Foo b = new Foo();
+    Foo c = new Foo();
+
+    a.x = b;
+    b.x = c;    
+    */
 
     taskexit( s{ !initialstate } );
 }