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

Patrick Lam plam at sable.mcgill.ca
Wed Jan 31 12:24:55 EST 2018


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
> 



More information about the Soot-list mailing list