FlatSESEEnterNode child = (FlatSESEEnterNode) iterator2.next();
Hashtable<Taint, Set<Effect>> taint2Effects = effectsAnalysis.get(child);
conflictGraph.addLiveIn(taint2Effects);
- if(taint2Effects!=null)
- System.out.println("#add ="+taint2Effects+"currentSESE="+child+" into conflictGraph="+conflictGraph);
-
sese2conflictGraph.put(parent, conflictGraph);
}
}
} else {
seseStack.peek().addChild( fsen );
fsen.setParent( seseStack.peek() );
+ // if the top of stack is not bogus one, it should be a non-bogus parent to the current sese
+ if(!seseStack.peek().getIsCallerSESEplaceholder()){
+ fsen.addSESEParent(seseStack.peek());
+ }
}
seseStack.push( fsen );
protected boolean hasChildrenByCall(FlatSESEEnterNode fsen) {
-
boolean hasChildrenByCall=false;
// visit every flat node in SESE body, find method calls that
flatNodesToVisit.remove(fn);
visited.add(fn);
-
+
if (fn.kind() == FKind.FlatCall) {
FlatCall fc = (FlatCall) fn;
MethodDescriptor mdCallee = fc.getMethod();
hasChildrenByCall = true;
if (!fsen.getIsCallerSESEplaceholder()) {
- // System.out.println("%%%mdCallee="+mdCallee+" from fsen="+fsen);
Set reachableSESEMethodSet =
callGraph.getFirstReachableMethodContainingSESE(mdCallee, methodsContainingSESEs);
- // if (methodsContainingSESEs.contains(mdCallee)) {
reachableSESEMethodSet.add(mdCallee);
- // }
-
- // System.out.println("#");
- // System.out.println("fsen"+fsen);
- // System.out.println("reachableSESEMethodSet="+reachableSESEMethodSet);
for (Iterator iterator = reachableSESEMethodSet.iterator(); iterator.hasNext();) {
MethodDescriptor md = (MethodDescriptor) iterator.next();
- // Set<FlatSESEEnterNode> seseSet = md2seseSet.get(md);
FlatMethod fm = state.getMethodFlat(md);
FlatSESEEnterNode fsenBogus = (FlatSESEEnterNode) fm.getNext(0);
fsenBogus.addSESEParent(fsen);
- // System.out.println("% "+fm+"->"+fsen);
}
reachableSESEMethodSet.retainAll(methodsContainingSESEs);
FlatSESEEnterNode parentSESE = null;
if (fsen.getSESEParent().size() > 0) {
parentSESE = (FlatSESEEnterNode) fsen.getSESEParent().iterator().next();
- System.out.println("fsen getParent=" + parentSESE);
conflictGraph = oooa.getConflictGraph(parentSESE);
System.out.println("CG=" + conflictGraph);
- if (conflictGraph != null)
- System.out.println("Conflicts=" + conflictGraph.getConflictEffectSet(fsen));
- // conflictGraph = oooa.getConflictGraph(fsen.getParent());
- // System.out.println("CG=" + conflictGraph);
- // if (conflictGraph != null)
- // System.out.println("Conflicts=" +
- // conflictGraph.getConflictEffectSet(fsen));
}
// if (!fsen.getIsCallerSESEplaceholder() && fsen.getParent() != null