[Soot-list] Linking Jimple code to Java code for capture-and-replay

Humberto sousa pacheco humbertocin at gmail.com
Tue Apr 27 11:51:25 EDT 2010


Zhang,
"...there could be multiple variables in the same line..."
Yes, but if i remember correctly there are tags position that specifies the
position into the line. See getTags method...
I hope this help you.


On Mon, Apr 26, 2010 at 2:02 PM, Sai Zhang <racezhang at gmail.com> wrote:

> Thanks Eric.
>
> Yes. you are right. "use-original-names" could preserve the original
> (parameter) names. but as you
> mentioned, that is not a big problem (I could also encode that through
> numbers).
>
> The location at which a value was loaded is crucial, but for my case, i
> might not be
> a big problem. I aim to implement a lightweight replay tool at the method
> level, that is recovering
> "this, parameters, global variables" at the beginning of a method.  (I am
> not very clear whether there
> is any tricks or pitfalls in implementing this using Soot, any suggestion
> is welcome ;))
>
> -Sai
>
>
>
> On Mon, Apr 26, 2010 at 12:48 AM, Eric Bodden <
> bodden at st.informatik.tu-darmstadt.de> wrote:
>
>> Hello Sai.
>>
>> If you use -p jb use-original-names:on then you should be getting
>> Jimple variables that have the same names as the original variables in
>> source code.
>>
>> However, I am not sure if you even need this. After all, you could
>> just encode parameter names through numbers (param0, param1, ...), and
>> for fields you could just use their proper names, e.g.
>> "SomeClass.StaticField" (those are preserved in Jimple).
>>
>> What may be more of a problem is that you may need to store also the
>> location at which a value was loaded. After all, what do you do if a
>> method contains multiple statements "b =  SomeClass.StaticField" or is
>> such a statement is contained in a loop?
>>
>> Eric
>>
>> --
>> Dr. Eric Bodden
>> Software Technology Group, Technische Universität Darmstadt, Germany
>> Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
>> Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt
>>
>>
>>
>> On 26 April 2010 09:22, Sai Zhang <racezhang at gmail.com> wrote:
>> > Hey all:
>> > I am wondering is there a convenient way to link Jimple code to Java
>> code
>> > at the variable-level? For instance, in implementing a capture-replay
>> tool,
>> > we need to record (capture) the current object states and recover that
>> in
>> > the replay phase. Thus, it could need to "link jimple code to Java
>> code".
>> > (i could be wrong on this point)
>> > For instance,  consider a simplest example as follows:
>> > public void m(object arg1, object arg2) {
>> > Object b =  SomeClass.StaticField;  (or a global field)
>> > // for a capture and replay tool, we need to
>> > //save the state of object "this", "arg1", "arg2", and
>> > "SomeClass.StaticField"
>> > }
>> > When implementing such a tool using Soot, "this", "arg1", "arg2"...
>> > will be translated into r0, r1, r2 ... (JImpleLocal vars). In such
>> cases,
>> > how could we save the original states of  "this, arg1, arg2" and the
>> global
>> > field?
>> > That is how to link the jimple code (JimpleLocal) to the actual java
>> code?
>> > Merely saving the states of r0, r1, r2 seems to be not a perfect
>> solution.
>> > PS. Is there any publicly available capture-and-replay tools implemented
>> > based on Soot?
>> > Thanks a lot.
>> >
>> > --  Sai
>> >
>> > _______________________________________________
>> > Soot-list mailing list
>> > Soot-list at sable.mcgill.ca
>> > http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>> >
>> >
>>
>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>


-- 
Humberto S. Pachêco - hsp
Monitor de Informática Teórica
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20100427/bff5d6af/attachment.html 


More information about the Soot-list mailing list