test doesn't work\!
authorjjenista <jjenista>
Fri, 17 Oct 2008 19:57:44 +0000 (19:57 +0000)
committerjjenista <jjenista>
Fri, 17 Oct 2008 19:57:44 +0000 (19:57 +0000)
Robust/src/Tests/OwnershipAnalysisTest/test04/makefile
Robust/src/Tests/OwnershipAnalysisTest/test04/test04.java

index 348eb368c4222de55f99b199f9a0a8e36e57ea8c..b8ee2cc01a1f8bd50853b3aa1d4f2486489c1080 100644 (file)
@@ -1,10 +1,10 @@
-PROGRAM=test03
+PROGRAM=test04
 
 SOURCE_FILES=$(PROGRAM).java
 
 BUILDSCRIPT=~/research/Robust/src/buildscript
 BSFLAGS= -recover -ownership -ownaliasfile aliases.txt -enable-assertions
-OUTFLAGS= -ownwritedots final #-flatirusermethods
+OUTFLAGS= -ownwritedots final -ownallocdepth 2 #-flatirusermethods
 
 all: $(PROGRAM).bin
 
@@ -12,6 +12,9 @@ view: PNGs
        eog *.png &
 
 PNGs: DOTs
+       rm -f *NodeNode*.dot
+       rm -f *ParameterParameter*.dot
+       rm -f *Startup*.dot
        d2p *COMPLETE*.dot
 
 DOTs: $(PROGRAM).bin
index 8dbee93e4f646f04189907e8641aacfc5512ee22..f5c7e911971f59e06822a17218b9d0d674b59e1e 100644 (file)
@@ -6,19 +6,17 @@ public class Parameter {
 }
 
 public class Node {
-  HashSet neighbors;
+  Node f;
   
-  public Node() {
-    neighbors = new HashSet();
-  }
-  
-  public static Node makeNode() {
-    return new Node();
-  }
+  public Node() {}
   
-  public addNeighbor( Node n ) {
-    neighbors.add( n );
-  }
+  public static void makeGraph( Node head ) {
+    Node s = new Node();
+    Node t = new Node();
+    s.f = t; 
+    t.f = s;
+    head.f = s;
+  }  
 }
 
 task Startup( StartupObject s{ initialstate } ) {
@@ -28,30 +26,18 @@ task Startup( StartupObject s{ initialstate } ) {
   taskexit( s{ !initialstate } );
 }
 
+task graphLoop( Parameter p1{ !w } ) {
 
-task MakeGraph( Parameter p1{ !w } ) {
-
-  Parameter pKeep0;
-  Parameter pKeep1;
-  Parameter pKeep2;
-  Parameter p2;
+  Node[] a = new Node[3];
 
-  while( false ) {  
-    pKeep2 = pKeep1;
-    pKeep1 = pKeep0;
-    pKeep0 = p2;
+  for( int i = 0; i < 3; ++i ) {
+    Parameter p = new Parameter();
 
-    p2 = new Parameter();    
+    Node n = new Node();
+    p.root = n;
 
-    Node n1 = Node.makeNode();
-    Node n2 = Node.makeNode();
-    Node n3 = Node.makeNode();
-    
-    n1.addNeighbor( n2 );
-    n2.addNeighbor( n3 );
-    n3.addNeighbor( n1 );
-    
-    p2.root = n1;
+    Node.makeGraph( n );
+    a[i] = n;
   }
 
   taskexit( p1{ w } );