[Soot-list] How to deal with "Return" using wjop.si from SOOT?
Patrick Lam
plam at sable.mcgill.ca
Wed May 22 09:56:22 EDT 2013
Have you looked at the implementation of StaticInliner to see what it does?
pat
On 05/22/13 09:49, Zhoulai wrote:
> I guess it might help to put the code after inlining here. It can be
> seen that the statement 'return 0' from foo() is abandonned by the
> analysis; I was using this command line:
> java -Xmx4096m soot.Main -f J -cp target/classes/ -pp -w -W -f J -p
> wjop.si <http://wjop.si> on tester.Test12 -d sootOutput_inline
>
> public class tester.Test12 extends java.lang.Object
> {
>
> public void <init>()
> {
> tester.Test12 r0;
>
> r0 := @this: tester.Test12;
> specialinvoke r0.<java.lang.Object: void <init>()>();
> return;
> }
>
> public static void main(java.lang.String[])
> {
> java.lang.String[] r0;
>
> r0 := @parameter0: java.lang.String[];
> return;
> }
>
> public static int foo()
> {
> return 0;
> }
> }
>
> On Wed, May 22, 2013 at 11:39 AM, Zhoulai <zell08v at orange.fr
> <mailto:zell08v at orange.fr>> wrote:
>
> Hi, all,
>
> I have a naive question on how to deal with "RETURN" with the the
> wjop.si <http://wjop.si> optimisation from Soot. Typically, I want
> to verify the value of 'x' is zero after we call x = foo(); with '
> foo' being a method that returns 0.
>
> Below is a running example. I think it is possible to do this with
> a simple intra-procedural value analysis (say, interval analysis)
> plus an inlining. However, I find out the "inlining" from wjop phase
> ignores 'return' (Probably this is not related with SOOT itself).
>
> My question is :
>
> whether SOOT already has some code transformation phase so that,
> for example, 'return a' will modify an artificial instance variable
> _a, which can then be captured by SOOT's inlining?
>
> Thank you. Below is the example code.
>
> Zhoulai
>
> public class Test12 {
> public static void main(String[] args) {
> int x;
> x = foo();;
> }
>
> public static int foo() {
> return 0;
>
> }
> }
>
>
>
>
>
>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
More information about the Soot-list
mailing list