[Soot-list] identifying Jimple statement types

Eric Bodden eric.bodden at ec-spride.de
Tue Jun 5 03:31:47 EDT 2012


Yitzhak, note that there are also templates for those switch classes
that implement an empty default handler for all cases. That way you
don't need to define a flow function for every single case.

Eric

On 4 June 2012 21:59, Phil Pratt-Szeliga <pcpratts at syr.edu> wrote:
> Hi Yitzhak
>
> I usually find working with instanceof is the best way to go. When
> your doing that, try to interact with the interfaces rather than the
> concrete Jimple classes. There is also soot.jimple.StmtSwitch and
> soot.jimple.JimpleValueSwitch when you need to cover every single type
> available (I use these when cross compiling Jimple to CUDA).
>
> Phil Pratt-Szeliga
> Syracuse University
>
> On Mon, Jun 4, 2012 at 3:53 PM, Yitzhak Mandelbaum
> <yhmandelbaum at cert.org> wrote:
>> Hi,
>>
>> I'm new to Soot and learning how to process Jimple code.  What is the standard/recommended way of identifying the type of individual statements? I've looked at code samples in soot.jimple.toolkits.base and I've seen consistent use of instanceof. Is this the recommended way? Or, is there some visitor pattern, etc.?
>>
>> Thanks!
>> Yitzhak
>> --------------------------------------------------
>> Yitzhak Mandelbaum
>> CERT / Software Engineering Institute
>> Carnegie Mellon University
>> http://www.andrew.cmu.edu/~yhm
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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



-- 
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