[Soot-list] Correct insert of JIfStmt

Julien Klaus julien.klaus at uni-jena.de
Thu Nov 20 15:52:31 EST 2014


Hello Steven and Marc,

I think it is posible to insert a clone of a statement. The clone() 
funtction for the statements returns a new
object and so the hashcode is unique.
When I try to insert a unit (without clone it before) I get an 
/java.lang.RuntimeException: Chain already contains object./ error.
Because of this i clone every unit before I insert it in the chain.

I need to insert copies for example for loop unrolling. The problem 
occours when the clone
is an instance of for example JIfStmt. There my graph get broken and I 
can not repair it.
I think in this case the chain can not redirect the pointers. I hope my 
problem is now better explained.

Best regards,
Julien



Am 20.11.2014 um 13:08 schrieb Steven Arzt:
> Hi Julien,
>
> Why do you want to insert copies of statements? In general, you cannot have
> the same box in more than one statement, so direct duplicates won't work.
>
> Best regards,
>    Steven
>
> -----Ursprüngliche Nachricht-----
> Von: soot-list-bounces at CS.McGill.CA [mailto:soot-list-bounces at CS.McGill.CA]
> Im Auftrag von Julien Klaus
> Gesendet: Mittwoch, 19. November 2014 18:12
> An: soot-list at CS.McGill.CA
> Betreff: [Soot-list] Correct insert of JIfStmt
>
> Hello everybody,
>
> I have programmed an anlysis in soot and now I want to use the results to
> transform the program.
> For this I must insert copies of units. The problem occurs when I try to
> insert a copy of an ifstmt.
> After the insert the chain is not longer correct. Is there a simple way (or
> best practice) to insert such an unit or is there a graph available in which
> i can set the pointers to the units manual?
>
> Thank you for your help.
>
> Best regards julien
> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20141120/8794e727/attachment.html 


More information about the Soot-list mailing list