[Soot-list] Why "Unit" as target of JGotoStmt?

Eric Bodden eric.bodden at ec-spride.de
Thu Nov 17 02:10:28 EST 2011


Thanks for the explanation, Pat,

I guess that explains that. I think I can see an interesting PL
problem lurking there somewhere.

Eric

On 17 November 2011 05:05, Patrick Lam <plam at sable.mcgill.ca> wrote:
> On 11/15/2011 12:03 AM, Eric Bodden wrote:
>> Hi all.
>>
>> A user just asked me why the target of a JGotoStmt is actually a unit,
>> not a Stmt. Good question, I thought. Does anybody know? To my
>> understanding, a JGotoStmt should always point to a Jimple unit, and
>> hence a Stmt.
>>
>> Am I missing something?
>
> There's some inconsistencies in the API, but there are a number of
> getTarget() and getTargetBox() and setTarget() methods sprinked
> throughout both Jimple and Baf. Most of the time, all of these methods
> return Units (although IfStmt's getTarget() method returns a Stmt). But
> we certainly have a UnitBox and not a StmtBox class, so that
> getTargetBox() is always going to return a UnitBox. In that sense, it
> may make sense for getTarget() to also return a Unit.
>
> pat
>
> _______________________________________________
> 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/
Claude Shannon Research Group Leader 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. 32, 64293 Darmstadt


More information about the Soot-list mailing list