[Soot-list] Editing the ExceptionalUnitGraph

John Jorgensen jorgnsn at lcd.uregina.ca
Sun Jul 26 12:07:55 EDT 2009


>>>>> "eric.bodden" == Eric Bodden <eric.bodden at mail.mcgill.ca> writes:

    eric.bodden> I am afraid, I don't think that
    eric.bodden> there is any such support. Of course you could
    eric.bodden> modify the UnitGraph or define your own subclass
    eric.bodden> of UnitGraph that generates a graph with the
    eric.bodden> properties you like to begin with. But as you
    eric.bodden> say you don't want to modify your graph. In that
    eric.bodden> case I would suggest to create a custom
    eric.bodden> FlowAnalysis class that handles the units you
    eric.bodden> want to "split" specially.

My understanding of Soot is pretty stale, but my sense is that
the conventional Soot practice (at least in 2003 when I turned
UnitGraph into ExceptionalUnitGraph) is to transform code by
adding or removing Units from Chains.  Then, if you still need a
CFG, you build a new one from the changed Chain.

I.e. In Soot, the CFG classes _inform_ transformations, but don't
_perform_ transformations.

It probably would be more convenient if you could manipulate the
graphs directly, and then have the finished graph write itself
out in a serialized form when complete, but that's not the way
that the Unit graphs were set up.

But other facilities might have been added since my day.


More information about the Soot-list mailing list