[Soot-list] Transformation capablilities of Soot

Marc-André Laverdière-Papineau marc-andre.laverdiere-papineau at polymtl.ca
Mon May 13 14:19:19 EDT 2013


Hello Zeinab,

As a general thing, Soot can do whatever transformations you want. The 
only thing is that it is relatively tedious to do so programatically. 
That is the reason why Bernhard and I have used templates to generate 
Jimple.

Answering your questions
1. That looks like you want to do syntax-directed translation in order 
to determine the constant parts of that string concatenation. Am I right?

2. I have no idea what you want to ask...
3. Yes, very easy. You just have to use the PatchingChain API.

Marc-André Laverdière-Papineau
Doctorant - PhD Candidate

On 11/05/13 04:21 PM, Zeinab Lashkaripour wrote:
> Hi every one,
>
> I'm trying to perform some transformations that I'm not sure I can use
> Soot for them therefore I would be grateful if any one could guide me.
>
> 1. I have some strings that their value a concatenation of string
> variables and values. For example after processing I get:
> v1 = "...." + v + "..";
> In this example I don't know the value of v till runtime and what I have
> from my processing is the RHS of the assignment. I have the RHS as a
> value and I am not aware of the variables until I traverse it.
> Can I use Soot for this and give the RHS at once to v1?
> Or do I have to separate values and variables in order to use Soot?
>
> 2. I also want to add some code in the form of:
> list.add(value);
> Can I do that too?
>
> 3. If I have the following form in code:
> if (condition)  v2 = ".." + y;
> If I want to add a statement before or after "v2 = ".." + y"
>      if (condition) { v2 = ".." + y; new statement; }
> does soot support this or do I have to do it by myself?
>
> I think the answer to the first two is yes but, I'm not sure how to do it.
> And for the last question I have no clue.
>
> Thanks in advance,
> Zeinab
>
>
> _______________________________________________
> 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