Skip to content

Commit

Permalink
Jump over calls to phantom methods or methods without body
Browse files Browse the repository at this point in the history
Addresses rohanpadhye#14
  • Loading branch information
rohanpadhye committed Nov 18, 2019
1 parent 8f326fa commit b9424fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/main/java/vasco/ForwardInterProceduralAnalysis.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ public void doAnalysis() {

// Initial contexts
for (M method : programRepresentation().getEntryPoints()) {
initContext(method, boundaryValue(method));
if (programRepresentation().isPhantomMethod(method)) {
initContextForPhantomMethod(method, boundaryValue(method));
} else {
initContext(method, boundaryValue(method));
}
}

// Perform work-list based analysis
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/vasco/soot/DefaultJimpleRepresentation.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ public List<SootMethod> resolveTargets(SootMethod method, Unit node) {

@Override
public boolean isPhantomMethod(SootMethod method) {
// TODO Auto-generated method stub
return false;
return method.isPhantom() || !method.hasActiveBody();
}

}

0 comments on commit b9424fb

Please sign in to comment.