[Soot-list] visitor for Jimple IR

Quentin Sabah quentin.sabah at inria.fr
Fri Jun 28 09:45:11 EDT 2013


Hi,

> Therefore, I'd like to associate specific source correspondence (SC) to
> those objects in the format of offset and length.
> First I looked at a few objects and I found they implemented Host (e.g.
> JAssignStmt) so I thought I could add SC as a Tag.
> However, I found some of them do not implement Host, e.g. JGtExpr.

Jimple statements (J*Stmt) implements Host. The jimple expressions 
(J*Expr) don't. Statements do not directly refer to expression, there is 
an indirection through ValueBox instances also implementing Host. The 
reason is that Value(s) (like J*Expr) are shared across multiple 
statements, but ValueBox are "unique" to a given statement.

Host                   Host
Stmt -uniquely refer-> ValueBox -refer-> Value

-- 
Quentin Sabah, CIFRE Ph.D. student
Grenoble University
INRIA-SPADES                   | STMicroelectronics/AST
Montbonnot, France             | Grenoble, France
mailto:quentin.sabah at inria.fr  | mailto:quentin.sabah at st.com
phone: +33 476 61 54 57        | phone: +33 476 58 44 14


More information about the Soot-list mailing list