// retrieve the summary node, or make it
// from scratch
- HeapRegionNode hrnSummary = getSummaryNode( as, false );
+ HeapRegionNode hrnSummary = getSummaryNode( as, false );
mergeIntoSummary( hrnK, hrnSummary );
}
wipeOut( hrn0, true );
// now tokens in reachability sets need to "age" also
- Iterator itrAllVariableNodes = td2vn.entrySet().iterator();
- while( itrAllVariableNodes.hasNext() ) {
- Map.Entry me = (Map.Entry) itrAllVariableNodes.next();
- VariableNode ln = (VariableNode) me.getValue();
-
- Iterator<RefEdge> itrEdges = ln.iteratorToReferencees();
- while( itrEdges.hasNext() ) {
- ageTuplesFrom( as, itrEdges.next() );
- }
- }
-
Iterator itrAllHRNodes = id2hrn.entrySet().iterator();
while( itrAllHRNodes.hasNext() ) {
Map.Entry me = (Map.Entry) itrAllHRNodes.next();
HeapRegionNode hrnToAge = (HeapRegionNode) me.getValue();
-
+
ageTuplesFrom( as, hrnToAge );
- Iterator<RefEdge> itrEdges = hrnToAge.iteratorToReferencees();
+ Iterator<RefEdge> itrEdges = hrnToAge.iteratorToReferencers();
while( itrEdges.hasNext() ) {
ageTuplesFrom( as, itrEdges.next() );
}
// then merge hrn reachability into hrnSummary
hrnSummary.setAlpha(
Canonical.unionORpreds( hrnSummary.getAlpha(),
- hrn.getAlpha()
- )
+ hrn.getAlpha()
+ )
);
-
+
hrnSummary.setPreds(
Canonical.join( hrnSummary.getPreds(),
hrn.getPreds()
AllocSite as = asItr.next();
int ageNorm = 0;
int ageShad = 0;
+
while( ageNorm < allocationDepth &&
ageShad < allocationDepth ) {
// yes, a normal node exists, so get the shadow summary
HeapRegionNode summShad = getSummaryNode( as, true );
mergeIntoSummary( hrnNorm, summShad );
+
+ // now tokens in reachability sets need to age also
+ Iterator itrAllHRNodes = id2hrn.entrySet().iterator();
+ while( itrAllHRNodes.hasNext() ) {
+ Map.Entry me = (Map.Entry) itrAllHRNodes.next();
+ HeapRegionNode hrnToAge = (HeapRegionNode) me.getValue();
+
+ ageTuplesFrom( as, hrnToAge );
+
+ Iterator<RefEdge> itrEdges = hrnToAge.iteratorToReferencers();
+ while( itrEdges.hasNext() ) {
+ ageTuplesFrom( as, itrEdges.next() );
+ }
+ }
+
ageNorm++;
}
SOURCE_FILES=$(PROGRAM).java
BUILDSCRIPT=~/research/Robust/src/buildscript
-BSFLAGS= -joptimize -flatirusermethods -mainclass Test -justanalyze -disjoint -disjoint-k 1 -disjoint-write-dots final -disjoint-alias-file aliases.txt normal -enable-assertions
+BSFLAGS= -joptimize -mainclass Test -justanalyze -disjoint -disjoint-k 1 -disjoint-write-dots final -disjoint-alias-file aliases.txt normal -enable-assertions #-flatirusermethods
+
+
+#DEBUGFLAGS= -disjoint-debug-callsite nodeFactory main 0 100 true
+
+#SNAPFLAGS= -disjoint-debug-snap-method calcGoodFeatureTask 5 10 true
+#SNAPFLAGS= -disjoint-debug-snap-method calcGoodFeature 5 1 true
+
+#SNAPFLAGS= -disjoint-debug-snap-method t3 5 20 true
+
+
all: $(PROGRAM).bin
DOTs: $(PROGRAM).bin
$(PROGRAM).bin: $(SOURCE_FILES)
- $(BUILDSCRIPT) $(BSFLAGS) -o $(PROGRAM) $(SOURCE_FILES)
+ $(BUILDSCRIPT) $(BSFLAGS) $(DEBUGFLAGS) -o $(PROGRAM) $(SOURCE_FILES)
clean:
rm -f $(PROGRAM).bin
}
static public void main( String[] args ) {
- //Graph[] a = new Graph[3];
+ Graph[] a = new Graph[3];
for( int i = 0; i < 3; ++i ) {
+
Graph g = disjoint G new Graph();
+ genreach p0BeforeUVgen;
Node u = nodeFactory();
+ genreach p1afterUgen;
Node v = nodeFactory();
+ genreach p2afterVgen;
//Node u = disjoint U new Node();
//Node v = disjoint V new Node();
// v = disjoint N new Node();
// } while(false);
- genreach p0;
-
Config c = disjoint C new Config();
g.n = u;
- u.n = v; u.c = c;
- v.n = u; v.c = c;
+ genreach p3AfterConnectG2U;
+
+ u.n = v;
+ genreach p4AfterConnectU2V;
+
+ v.n = u;
+ genreach p5AfterConnectV2U;
+
+ u.c = c;
+ v.c = c;
+ genreach p6AfterConfig;
+
+
+
+ a[i] = g;
- //a[i] = g;
}
- //System.out.println( a );
+ genreach p7Last;
+
+ System.out.println( a );
}
}