[Soot-list] How to create dot files of jimple control flow graphs?

Upulee Kanewala upuleegk at gmail.com
Wed Apr 18 10:09:13 EDT 2012


Hi Tony,

Thank you for your help.

Do you know whether it is possible to create a dot file of a PDG
created using HashMutablePDG class in soot?

Thanks
Upulee



On Wed, Apr 11, 2012 at 4:12 PM, Tony Yan <yan at cse.ohio-state.edu> wrote:
> Hi Upulee,
>
> You can take a look at the following classes and methods:
>    * soot.util.cfgcmd.CFGToDotGraph
>        * DotGraph drawCFG(DirectedGraph graph, Body body)
>        * DotGraph drawCFG(ExceptionalGraph graph)
>    * soot.util.dot.DotGraph
>        * void plot(String filename)
>
> To plot a CFG 'g' constructed from Body 'b' to file 'g.out', you can
> do the following:
>
>    CFGToDotGraph cfgToDot = new CFGToDotGraph();
>    DotGraph dotGraph = cfgToDot.drawCFG(g, b);
>    dotGraph.plot("g.out");
>
> I did not try it out myself, though.
>
> Thanks,
> Tony
>
> On Wed, Apr 11, 2012 at 1:23 PM, Upulee Kanewala <upuleegk at gmail.com> wrote:
>> Hi,
>>
>> Is there a way to create dot files of jimple control flow graphs in soot?
>>
>> I tried using "-cfg-dump jb" but it does not create any dot files. and
>> when I use "-cfg-dump ALL" it only creates bb.lso phase dot files.
>>
>> Thanks.
>> Upulee
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at sable.mcgill.ca
>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list


More information about the Soot-list mailing list