[Soot-list] throw analysis

John Jorgensen jorgnsn at lcd.uregina.ca
Wed Jun 22 01:22:23 EDT 2005


>>>>> "rugang" == Ru-Gang Xu <rugang at gmail.com> writes:

    rugang> So the commandline tools seems to work nicely for me, but the cfg I
    rugang> run my dataflow still seems to be wrong. I'm wondering if:

    rugang> Body mb = sm.retrieveActiveBody();
    rugang> PackManager.v().getTransform( "jb.tt" ).apply( mb );
    rugang> ExceptionalUnitGraph g = new ExceptionalUnitGraph(mb,
    rugang> UnitThrowAnalysis.v(),true);
    rugang> CFGToDotGraph convertDot = new CFGToDotGraph();
    rugang> soot.util.dot.DotGraph dg = convertDot.drawCFG(g);

    rugang> correctly does the options for the CFGViewer? I get a different dot
    rugang> file with these options. Are there a set of default transformations
    rugang> that I need to run?

CFGViewer works by setting some options, adding itself as an
extra transformation to Soot, and then calling soot.Main.main().
Soot then performs some standard transformations to turn the
input methods into jimple, before the viewer's transformation
turns the jimple into the desired IR and then produces the
visualization of its CFG.

If you're trying to use Soot as a library, without calling
soot.Main.main(), well, that is a black art which I have never
mastered, or even attempted to understand. I recall other people
asking about it, though, so you might be able to find information
in the mailing list archives.  One thread, for example, starts at
http://www.sable.mcgill.ca/pipermail/soot-list/2005-March/000172.html

-- 
John Jorgensen	LCD System Administrator  jorgnsn at lcd.uregina.ca
                                          306.337.2344



More information about the Soot-list mailing list