[Soot-list] Mutable BlockGraph

Eric Bodden eric.bodden at mail.mcgill.ca
Thu Feb 5 18:58:11 EST 2009


Looking at BlockGraph, it seems that all of the members have default
visibility, but in fact probably should be protected so that they can
easily be mutated by subclasses. I guess that would solve your
problem. I will make appropriate changes and commit them.

If you want to use the current version of Soot then you can use a
hack: All accessor methods in BlockGraph return references to the
internal data structures, not copies. Hence you can just call
blockGraph.getBlocks().add(..) etc.

Does that help?

Eric

2009/2/5  <shmohtasham at gmail.com>:
> Hi,
>
> I'd like to change a BlockGraph but i could not find any mutable block
> graph in soot. There are some mutable directed graph
> utility classes (e.g. HashMutableDirectedGraph) but there's no easy
> way to make a BlockGraph again (after changing it) from
> a mutable graph.
>
> So, I was wondering what would be the best way to edit a BlockGraph on
> the fly (add/remove nodes/edges) in soot? I mostly
> mean an easier way than having to implement a mutable block graph!
>
> Thanks in advance for your time.
>
> --Hossein
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>



-- 
Eric Bodden
Sable Research Group, McGill University
Montréal, Québec, Canada


More information about the Soot-list mailing list