Fixed x.f = y operation
[IRC.git] / Robust / src / Tests / OwnershipAnalysisTest / test01 / test01.java
index fff7a976c65d87d13bc94f19caf8ba781a17d605..b71138e1b1d1247c1feb4ae1cbe7f7cfb011a795 100644 (file)
@@ -36,6 +36,8 @@ public class Baw {
 
 
 public class Foo {
+    flag f;
+
     public Foo() {}
 
     public Foo x;
@@ -51,17 +53,90 @@ public class Foo {
 // look for the parameter s as a label referencing
 // a heap region that is multi-object, flagged, not summary
 task Startup( StartupObject s{ initialstate } ) {
-
+    
     while( false ) {
        Foo a = new Foo();
        a.x   = new Foo();
-       a.x.x = new Foo();
+               a.x.x = new Foo();
+
+       //Foo z = a.x;
+       //z.x = new Foo();
+    }
+    
+    Foo d = new Foo();
+    Foo e = new Foo();
+    Foo f = new Foo();
+
+    d.x = e;
+    e.x = f;    
+
+    // to look like Foo a above
+    //d.x.x = f;
+
+
+    /*
+    Foo b;
+    while( false ) {
+       Foo c = new Foo();
+       c.x = b;
+       b = c;
     }
+    */
 
     taskexit( s{ !initialstate } );
 }
 
+/*
+task NewObject( Foo a{ f }, Foo b{ f } ) {
+
+    Foo c = new Foo();
+
+    a.x = c;
+
+    taskexit( a{ !f }, b{ !f } );
+}
+*/
+
+/*
+task NewObjectA( Foo a{ f }, Foo b{ f } ) {
+
+    Foo c = new Foo();
+    Foo d = new Foo();
+
+    c.x = d;
+    a.x = c;
+
+    taskexit( a{ !f }, b{ !f } );
+}
+
+task NewObjectB( Foo a{ f }, Foo b{ f } ) {
+
+    Foo c = new Foo();
+    Foo d = new Foo();
+
+    a.x = c;
+    c.x = d;
+
+    taskexit( a{ !f }, b{ !f } );
+}
+*/
+
+/*
+task NewObject2( Foo a{ f }, Foo b{ f } ) {
+
+    Foo c;
+
+    while( false ) {
+       c   = new Foo();
+       c.x = new Foo();
+    }
+
+    taskexit( a{ !f }, b{ !f } );
+}
+*/
+
 
+/*
 // this task allocates a new object, so there should
 // be a heap region for the parameter, and several
 // heap regions for the allocation site, but the label
@@ -123,3 +198,4 @@ task ClobberInitParamReflex( Voo v{ f }, Voo w{ f } ) {
 
     taskexit( v{ !f }, w{ !f } );
 }
+*/
\ No newline at end of file