static protected Hashtable<FlatNode, ReachGraph> fn2rg =
new Hashtable<FlatNode, ReachGraph>();
- private Hashtable<FlatCall, Descriptor> fc2enclosing;
-
+ private Hashtable<FlatCall, Descriptor> fc2enclosing;
+
+ //protected RBlockRelationAnalysis rra;
// allocate various structures that are not local
mapBackEdgeToMonotone =
new Hashtable<FlatNode, ReachGraph>();
-
+
mapHrnIdToAllocSite =
new Hashtable<Integer, AllocSite>();
CallGraph cg,
Liveness l,
ArrayReferencees ar
+ //RBlockRelationAnalysis rra
) throws java.io.IOException {
init( s, tu, cg, l, ar );
}
CallGraph callGraph,
Liveness liveness,
ArrayReferencees arrayReferencees
+ //RBlockRelationAnalysis rra
) throws java.io.IOException {
analysisComplete = false;
}
break;
+ /*
case FKind.FlatSESEEnterNode:
FlatSESEEnterNode sese = (FlatSESEEnterNode) fn;
rg.taintLiveTemps( sese,
FlatSESEExitNode fsexn = (FlatSESEExitNode) fn;
rg.removeInContextTaints( fsexn.getFlatEnter() );
break;
-
+ */
+
case FKind.FlatCall: {
Descriptor mdCaller;
if( fmContaining.getMethod() != null ){
}
- public void taintLiveTemps( FlatSESEEnterNode sese,
- Set<TempDescriptor> liveTemps
- ) {
-
- System.out.println( "At "+sese+" with: "+liveTemps );
-
- Iterator<TempDescriptor> tdItr = liveTemps.iterator();
- while( tdItr.hasNext() ) {
- TempDescriptor td = tdItr.next();
- VariableNode vn = td2vn.get( td );
-
- Iterator<RefEdge> reItr = vn.iteratorToReferencees();
- while( reItr.hasNext() ) {
- RefEdge re = reItr.next();
-
- // these new sese (rblock) taints should
- // have empty predicates so they never propagate
- // out to callers
- Taint t = Taint.factory( sese,
- td,
- re.getDst().getAllocSite(),
- ExistPredSet.factory()
- );
-
- re.setTaints( Canonical.add( re.getTaints(),
- t
- )
- );
- }
+ public void taintTemp( FlatSESEEnterNode sese,
+ TempDescriptor td
+ ) {
+
+ VariableNode vn = td2vn.get( td );
+
+ Iterator<RefEdge> reItr = vn.iteratorToReferencees();
+ while( reItr.hasNext() ) {
+ RefEdge re = reItr.next();
+
+ // these new sese (rblock) taints should
+ // have empty predicates so they never propagate
+ // out to callers
+ Taint t = Taint.factory( sese,
+ td,
+ re.getDst().getAllocSite(),
+ ExistPredSet.factory()
+ );
+
+ re.setTaints( Canonical.add( re.getTaints(),
+ t
+ )
+ );
}
}
-
+
public void removeInContextTaints( FlatSESEEnterNode sese ) {
}
}
public String toString() {
+
+ String s;
+ if( sese.getIsCallerSESEplaceholder() ) {
+ s = "placeh";
+ } else {
+ s = sese.getPrettyIdentifier();
+ }
+
return
- "("+sese.getPrettyIdentifier()+
+ "("+s+
"-"+insetVar+
", "+allocSite.toStringBrief()+
"):"+preds;
return id;
}
- public String getPrettyIdentifier() {
+ public String getPrettyIdentifier() {
if( treeNode.getID() != null ) {
return treeNode.getID();
}
static public void main( String[] args ) {
Foo a = new Foo();
+ doSomething( a );
+ }
- rblock DU {
- Foo b = new Foo();
- Foo z = a.f;
- }
+ static void doSomething( Foo a ) {
- Foo c = new Foo();
- Foo d = new Foo();
+ a.f = new Foo();
- //doSomething( a, b, c );
- }
-
- static void doSomething( Foo a, Foo b, Foo c ) {
+ rblock r1 {
+ Foo b = a.f;
+ b.f = new Foo();
+ }
- rblock YO {
- Foo e = doStuff( a, b );
+ rblock r2 {
+ Foo c = a.f.f;
+ c.f = new Foo();
}
- Foo f = doStuff( a, c );
+
+ //Foo f = doStuff( a, c );
}
static Foo doStuff( Foo m, Foo n ) {