-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
eog *.png &
PNGs: DOTs
+ rm -f *NodeNode*.dot
+ rm -f *ParameterParameter*.dot
+ rm -f *Startup*.dot
d2p *COMPLETE*.dot
DOTs: $(PROGRAM).bin
}
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 } ) {
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 } );