[Soot-list] how does soot handle constant fraction

Eric Bodden eric.bodden at ec-spride.de
Mon May 14 09:17:21 EDT 2012


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


More information about the Soot-list mailing list