[Soot-list] Correct insert of JIfStmt

Marc-André Laverdière marc-andre.laverdiere-papineau at polymtl.ca
Fri Nov 21 09:41:54 EST 2014


Hi Julien,

My gut feeling would be to double-check the clone methods.

Marc-André Laverdière-Papineau
Doctorant - PhD Candidate

On 11/20/2014 03:52 PM, Julien Klaus wrote:
> 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
>>
> 
> 
> 
> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
> 


More information about the Soot-list mailing list