[Soot-list] What is the purpose of UseBox and DefBox?

周书林 zhoushulin1992 at gmail.com
Thu Feb 1 02:18:06 EST 2018


Hi pat,

Thank you, I got it !

Sincerely
Sep

2018-02-01 1:24 GMT+08:00 Patrick Lam <plam at sable.mcgill.ca>:

> A Box is like a pointer. If you want to pass a Use u to some other
> function, well, in Java you can't say &u (and you probably don't want to),
> but you can say getUseBoxes().
>
> pat
>
>
> On 2018-01-31 11:50 AM, 周书林 wrote:
>
>> I am newbie in Soot. I am quite confused with UseBox and DefBox. In Soot
>> Survivors Guide, it says "Through a Unit we can retrieve values used
>> (getUseBoxes()), values defined (getDefBoxes()) or even both
>> (getUseAndDefBoxes()).  ".
>>
>> And in "Analyzing Java Programs with Soot", it present an example
>> for getUseBoxes() and getDefBoxes() as follows:
>>
>> For an unit : x =y op z;
>> getUseBoxes() returns {y, z, y op z}
>> getDefBoxes() returns {x}
>>
>> But I could also get this information by getting the LeftOp and RightOp
>> of this AssignStmt.
>>
>> So, what is the meaning of  UseBox and DefBox?
>>
>> Hope for your help.
>>
>> Sincerely,
>> Sep
>>
>>
>> _______________________________________________
>> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20180201/cebdf4f3/attachment.html>


More information about the Soot-list mailing list