[Soot-list] Validate Interprocedural Control Flow Graph

66 views
Skip to first unread message

Kshitij Sudhir Gorde

unread,
Dec 11, 2017, 10:02:39 AM12/11/17
to soot...@cs.mcgill.ca
Within a scene transformer, I've used
InterproceduralCFG icfg = new JimpleBasedInterproceduralCFG();
to get an ICFG. Now, how do I know whether it's correct or not?. I want to generate an adjacency matrix from this graph. If I print out this icfg using toString() then it just prints out a huge string.
Anyone knows how to atleast visualize this graph?. Or export it in some Graph language (like DOT?)

--
Warm Regards,
Kshitij Gorde
Grad Student
University of North Carolina at Charlotte

Arzt, Steven

unread,
Dec 11, 2017, 11:34:50 AM12/11/17
to Kshitij Sudhir Gorde, soot...@cs.mcgill.ca

Hi,

 

If you need a dot visualization of the graph, you need to print it out in the dot format on your own. That should be easy to do, just iterate over the graph and write it out. Then use a tool such as GraphViz to render a graphic from it.

 

Best regards,

  Steven

Linghui Luo

unread,
Dec 11, 2017, 11:43:49 AM12/11/17
to Kshitij Sudhir Gorde, soot...@cs.mcgill.ca

Hi,

 

There is an utility class for generating dot graph file called “soot.tools.CFGViewer”.

 

Best regards,

Linghui

 

Von: Soot-list [mailto:soot-lis...@CS.McGill.CA] Im Auftrag von Kshitij Sudhir Gorde
Gesendet: Freitag, 8. Dezember 2017 16:59
An: soot...@cs.mcgill.ca
Betreff: [Soot-list] Validate Interprocedural Control Flow Graph

 

Within a scene transformer, I've used

Kshitij Sudhir Gorde

unread,
Dec 13, 2017, 8:01:16 AM12/13/17
to Arzt, Steven, soot...@cs.mcgill.ca
Hi Steven, 
     Thanks for replying. However, I'm not sure how to exactly get an icfg for my test jar file. I've created a jar file with 1 class which has the following structure
class Main{
      public static void main(String[] args){
      }
}
#Basically there's nothing in that class. I just want to use it for testing purposes. Now, how do I get an ICFG for this jar file (giving jar as the input). . Is, InterproceduralCFG icfg = new JimpleBasedInterproceduralCFG(); 
the right way to do it?. I'm not able to understand, what output I'm getting by calling icfg. allNonCallStartNodes(). This surely isn't from my input (the input is a set of over 200000 nodes).
How to get to to print ICFG for my custom jar file?. I'd really appreciate some help as I'm on a deadline for a paper!
Thanks

Reply all
Reply to author
Forward
0 new messages