[Soot-list] how does soot handle constant fraction

dingsun xyz031702 at hotmail.com
Mon May 14 10:21:02 EDT 2012


Dear Eric,
Thanks. But I mean if both 1 and 3 are defined as float or double, like 1.0/3.0.
Best Regards,Ding Sun

> From: eric.bodden at ec-spride.de
> Date: Mon, 14 May 2012 09:17:21 -0400
> Subject: Re: [Soot-list] how does soot handle constant fraction
> To: xyz031702 at hotmail.com
> CC: soot-list at sable.mcgill.ca
> 
> Hi Ding Sun.
> 
> I am not sure what Soot does in those cases. However, keep in mind
> that this is also an issue of types. 1/3 in Java is actually 0, I
> believe, due to integer arithmetic.
> 
> Eric
> 
> On 13 May 2012 22:45, dingsun <xyz031702 at hotmail.com> wrote:
> > Dear All,
> >
> > Recently I encountered a problem of constant folding, which means replacing
> > expression with constant values when all the variables in expression
> > are constants or local defined.
> > The direct difficulty is "how to handle constant fraction"?
> > Say, if getting "1/3", shall I replace it with "0.3333333" or remain it as
> > "1/3"--->  (In soot, 1/3 will be an AST expression "1 div 3", but 0.33333333
> > will be an constant), this will make big difference later when we need to
> > solve the related constraint.
> > I'm not sure about this and approach for suggestions here.  For example, how
> > does Soot handle the similar issue?
> >
> > Best Regards,
> > Ding Sun
> >
> > _______________________________________________
> > Soot-list mailing list
> > Soot-list at sable.mcgill.ca
> > http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> >
> 
> 
> 
> -- 
> Eric Bodden, Ph.D., http://bodden.de/
> Head of Secure Software Engineering Group at EC SPRIDE
> Principal Investigator in Secure Services at CASED
> Tel: +49 6151 16-75422    Fax: +49 6151 16-72051
> Room 3.2.14, Mornewegstr. 30, 64293 Darmstadt
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20120514/cd684290/attachment.html 


More information about the Soot-list mailing list