[Soot-list] Adding multiples of the same edge
Bodden, Eric
eric.bodden at sit.fraunhofer.de
Tue May 19 02:14:08 EDT 2015
Hi.
Yes Spark will never give you duplicate edges for the same calls. That is intended.
Cheers,
Eric
On May 18, 2015 11:46 PM, Jason Ott <jott002 at ucr.edu> wrote:
My tests suggest that when I add multiple entry points that have overlapping edges, that those edges are not added multiple times. I just want to confirm that.
Ultimately I experiencing a bizarre problem where I create many files with many entry points. Each of those files instantiates a particular object. Also in that file is a list of all public methods that we want included in the call graph.
I then dump that into soot for Spark to generate the call graph. However, there are edges that are missing. I have found one instance where I have, in one of my files, several methods that are not even referenced in the graph. I'm not sure why they aren't there.
To give an example I have a few files:
fileone.java:
public class fileone {
public static void main(String[] args) {
CustomObject co = new CustomObject();
co.doone();
co.dotwo();
co.dothree();
}
}
filetwo.java:
public class filetwo {
public static void main(String[] args) {
DiffObj do = new DiffObj();
do.doit();
do.do();
do.stop();
}
Then for spark for each file, I add each class and their entry point:
//...
for(file f : folder) {
sootClass = Scene.v().forceResolve(f.className, SootClass.BODIES);
sootClass.setApplicationClass();
entrypoints.add(sootCalss.getMethodByName(f.method));// always resolves to "main"
}
Scene.v().loadNecessaryClasses();
Scene.v().setEntryPoints(entryPoints);
PackManager.v().runPacks();
callGraph = Scene.v().getCallGraph();
//...
Obviously this part is shortened for brevity. As of right now, do.doit() and do.do() are not present in the call graph. I don't fully understand why this is the case. Any help would be greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20150519/d0a99c70/attachment.html
More information about the Soot-list
mailing list