[Soot-list] variable name conflict

Bodden, Eric eric.bodden at sit.fraunhofer.de
Fri Jul 12 11:46:14 EDT 2013


Hello.

> So, the problem I face is that once I have the Jimple IR objects created out the jimple file that redefines variable x in 3 different blocks, if I check all use and def boxes for the local variables, only the last variable definition is the one taken into account, that is "int x". The other definitions of "x" are never use in any value box.

That sounds wrong but we need to see exactly what you are doing and how you are doing it. Can you submit a but report on Github with a test case attached that reproduces the problem?

> Now that you mentioned "I can see that it looks odd, though, when the code is printed." I wonder whether this is a problem I won't be able to solve, since my analysis is based on parsing a Jimple file in order to get a Jimple IR in memory, and by parsing the Jimple file Soot (actually Walker.java) cannot accurately relate declarations and usage for each variable x.

Well I guess that if you intend to show Jimple to the user somehow it might make sense to rename the locals to resolve the ambiguity visually. The problem is the scope I guess - Java source has different scopes when blocks are used but Jimple has no blocks and hence only a single scope.

Best wishes,
Eric


More information about the Soot-list mailing list