}
break;
+ case FKind.FlatSESEEnterNode:
+ FlatSESEEnterNode sese = (FlatSESEEnterNode) fn;
+ rg.taintLiveTemps( sese,
+ liveness.getLiveInTemps( fmContaining, fn )
+ );
+ break;
+
+ case FKind.FlatSESEExitNode:
+ FlatSESEExitNode fsexn = (FlatSESEExitNode) fn;
+ rg.removeInContextTaints( fsexn.getFlatEnter() );
+ break;
+
case FKind.FlatCall: {
Descriptor mdCaller;
if( fmContaining.getMethod() != null ){
case FKind.FlatCall:
case FKind.FlatReturnNode:
case FKind.FlatBackEdge:
+ case FKind.FlatSESEEnterNode:
+ case FKind.FlatSESEExitNode:
return true;
case FKind.FlatCastNode:
FlatCastNode fcn=(FlatCastNode)fn;
}
+ 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 removeInContextTaints( FlatSESEEnterNode sese ) {
+
+ }
+
+
// used in makeCalleeView below to decide if there is
// already an appropriate out-of-context edge in a callee
// view graph for merging, or null if a new one will be added
public String toString() {
return
- "("+sese.toPrettyString()+
+ "("+sese.getPrettyIdentifier()+
"-"+insetVar+
", "+allocSite.toStringBrief()+
"):"+preds;
// that method at runtime
FlatSESEEnterNode spliceSESE = null;
FlatSESEExitNode spliceExit = null;
- if( state.MLP ) {
+ if( state.MLP || state.OOOJAVA ) {
if( currmd.equals( typeutil.getMain() ) ) {
SESENode mainTree = new SESENode( "main" );
spliceSESE = new FlatSESEEnterNode( mainTree );
} else if (np.getEnd()!=null&&np.getEnd().kind()!=FKind.FlatReturnNode) {
FlatNode rnflat=null;
// splice implicit SESE exit after method body
- if( state.MLP ) {
+ if( state.MLP || state.OOOJAVA ) {
np.getEnd().addNext(spliceExit);
rnflat=spliceReturn(spliceExit);
} else {
rnflat.addNext(fe);
} else if (np.getEnd()!=null) {
// splice implicit SESE exit after method body
- if( state.MLP ) {
+ if( state.MLP || state.OOOJAVA ) {
FlatReturnNode rnflat=(FlatReturnNode)np.getEnd();
np.getEnd().addNext(spliceExit);
spliceExit.addNext(fe);
}
// splice an implicit SESE enter before method body
- if( state.MLP ) {
+ if( state.MLP || state.OOOJAVA ) {
spliceSESE.addNext(fn);
fn=spliceSESE;
}
BUILDSCRIPT=~/research/Robust/src/buildscript
-BSFLAGS= -mainclass Test -justanalyze -disjoint -disjoint-k 2 -disjoint-write-dots final -enable-assertions
+BSFLAGS= -mainclass Test -justanalyze -ooojava -disjoint -disjoint-k 2 -disjoint-write-dots final -enable-assertions
all: $(PROGRAM).bin
static public void main( String[] args ) {
Foo a = new Foo();
- Foo b = new Foo();
+
+ rblock DU {
+ Foo b = new Foo();
+ Foo z = a.f;
+ }
+
Foo c = new Foo();
Foo d = new Foo();
- giveParamNames( a, b, c );
+
+ //doSomething( a, b, c );
}
- static void giveParamNames( Foo a, Foo b, Foo c ) {
- Foo e = doStuff( a, b );
+ static void doSomething( Foo a, Foo b, Foo c ) {
+
+ rblock YO {
+ Foo e = doStuff( a, b );
+ }
+
Foo f = doStuff( a, c );
}