[Soot-list] visitor for Jimple IR

Sergio Ferrero sferrero at ensoftcorp.com
Thu Jun 27 18:01:13 EDT 2013


Hello Al,

Thanks for the reply.
I see Value and Stmt implement Switchable and thus they implement the
apply() method.
However, the Walker gives me a SootClass object which is the root of the
parsed Jimple file.
I was wondering whether there is a visitor that works for these objects:
SootClass, SootField, SootMethod, etc (that is all descendants of Host)

Sergio



On Thu, Jun 27, 2013 at 5:53 PM, Al <aaloanmiftah at yahoo.com> wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20130627/39facbca/attachment.html 


More information about the Soot-list mailing list