[Soot-list] difficulty in using getUnexceptionalPredsOf

Manjiri Namjoshi manjiri.namjoshi at googlemail.com
Thu Sep 4 17:35:29 EDT 2008


I didnt throw any exception .... but it included the blocks that
corresponded to the catch body.

These are the blocks corresponding to the catch part:

Blk Block 10:
[preds: 0 ] [succs: 11 12 ]
$r4 := @caughtexception;
r2 = $r4;
$i3 = i0 % 2;
if $i3 == 0 goto (branch);

*Blk Block 11:
[preds: 10 ] [succs: 16 ]
return "Should not throw odd exceptions!";

*Blk Block 12:
[preds: 10 ] [succs: 2 ]
goto [?= (branch)];

In the predecessor's list it included block 12.

I dont know if what it did was correct and if i misunderstood the method.
Sorry for not being clear before.

Thank You.

Sincerely,
Manjiri

2008/9/4 Richard L. Halpert <richardlhalpert at gmail.com>

> "did not work for me" is too vague.  Please tell us what it DID do.  Did it
> throw an exception?  Did it give you wrong answers?
>
> -Richard
>
> On Thu, Sep 4, 2008 at 2:24 PM, Manjiri Namjoshi <
> manjiri.namjoshi at googlemail.com> wrote:
>
>> Hello,
>>
>> I am interested to get all the predecessors of a block which do not belong
>> to exception handling blocks.
>> I have a code something like this:
>> while(i < 10000) {
>>       i++;
>>       try {
>>          -- some code
>>       } catch (java.lang.ArithmeticException e) {
>>         if (i %2 != 0)
>>           return "Should not throw odd exceptions!";
>>       }
>> }
>>
>> This code produces 3 blocks corresponding to the catch body.
>>
>> I tried the following:
>>
>> ExceptionalBlockGraph eg = new ExceptionalBlockGraph(b); // b is the body
>> eg.getUnexceptionalPredsOf(blk);
>>
>> did not work for me.
>>
>>
>> I am doing anything wrong?
>>
>> Thank You.
>>
>> Sincerely,
>> Manjiri
>>
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at sable.mcgill.ca
>> http://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/20080904/14513409/attachment.htm


More information about the Soot-list mailing list