[Soot-list] end of a switch block

Eric Bodden eric.bodden at mail.mcgill.ca
Fri Jun 19 18:39:07 EDT 2009


>From what I can see, the only reliable way to do this is to tag the
appropriate Jimple statements as they are generated in the
Java-to-Jimple conversion. Maybe I can say more if you show us some
actual Jimple code that causes the trouble for you, but I doubt that
there will be a solution that works in all cases without such tags.

Eric

2009/6/19 Cristina Basescu <cristina.basescu at gmail.com>:
> Hi Eric,
>
> Thanks for the reply! Well, I wanted to analyze the content of each case
> block, and for that I needed to know where it all ends :) However, the
> problem that I described is a corner case. In general, the solution I spoke
> about in my first e-mail works.
>
> Cristina
>
> On Sat, Jun 20, 2009 at 1:14 AM, Eric Bodden <eric.bodden at mail.mcgill.ca>
> wrote:
>>
>> Hi Christina.
>>
>> Jimple does not have the same representation of switch blocks as Java
>> source code does. Jimple's representation is much closer to bytecode
>> in this case. This may make it hard to do what you want to do on this
>> level of abstraction. What are you trying to do with the switch
>> blocks? Maybe there's a better way to reach your goal.
>>
>> Eric
>>
>> 2009/6/19 Cristina Basescu <cristina.basescu at gmail.com>:
>> > Hello,
>> >
>> > I have a question regarding the possibility of finding where a switch
>> > block
>> > ends (the next statement after a switch block). I find this problem
>> > tricky
>> > when there is no break statement on any of the case blocks excepting the
>> > last case block, because otherwise one could compute the lists of all
>> > successors for all the targets and then find the first common statement
>> > of
>> > these lists. I'm using Jimple and I thought that maybe building the AST
>> > might be the solution, but I haven't found an example on how to do this
>> > either.
>> >
>> > Any help would be appreciated.
>> >
>> > Best regards,
>> > Cristina
>> >
>> > _______________________________________________
>> > 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
>
>



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


More information about the Soot-list mailing list