[Soot-list] visitor for Jimple IR

Al aaloanmiftah at yahoo.com
Thu Jun 27 16:53:17 EDT 2013


Yes jimple does have a visitor pattern implementation. Look at the source tree and find value/statement visitor. Also each value and statement class has a apply method.

On Jun 27, 2013, at 3:05 PM, Sergio Ferrero <sferrero at ensoftcorp.com> wrote:

> Hello, 
> 
> I'd like to associate source correspondence information in the format of (offset, length) with an in-memory representation of a Jimple file.
> 
> I'm using the Jimple parser to create a Jimple AST (classes in soot.jimple.parser.node) and then invoking Walker.java to create the in-memory representation of the jimple file (classes are in soot.jimple and soot.jimple.internal).
> 
> It is to this in-memory representation I would like to attach source correspondence information.  I originally tried attaching the information to the Jimple AST generated by the Jimple parser, but this representation was missing some necessary information.
> 
> Sable provides a visitor infrastructure to navigate the Jimple AST. Walker.java is based on this.
> I'd like to know whether there is a similar visitor infrastructure for navigating the in-memory representation of the jimple file.
> 
> Thanks in advance
> -S
> 
> 
> _______________________________________________
> 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