[Soot-list] identifying Jimple statement types

Phil Pratt-Szeliga pcpratts at syr.edu
Mon Jun 4 15:59:35 EDT 2012


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


More information about the Soot-list mailing list