[Soot-list] spark problem with "keep-original-names" option
Eric Bodden
eric.bodden at mail.mcgill.ca
Tue Jul 14 10:59:56 EDT 2009
Ok, I can see what is causing the problem. It's these lines...
> $r1 = new Item
> i1 = $r1
> $r1 = new Item
> i2 = $r1
As you probably know, Spark is flow-insensitive, i.e. it "sees" the
above statements as a set (!) of subset constraints. Because $r1 is
assigned both to i1 and i2, Spark does therefore not know whether the
value of $r1 from the first assignment "$r1 = new Item" or the one
from the second assignment "$r1 = new Item" is assigned to i1,
respectively i2.
When you enable use-original-names, then Soot will rename the first
$r1 to a variable different from the second $r1 and therefore you get
different, more precise equations.
The solution to your problem is applying the LocalSplitter to every method:
http://www.sable.mcgill.ca/soot/doc/soot/toolkits/scalar/LocalSplitter.html
Normally, the splitter is enabled by default:
http://www.sable.mcgill.ca/soot/tutorial/phase/phase.html#SECTION00021000000000000000
I wonder why this does not happen in your case. How are you creating
the Jimple code? Are you calling soot.Main.main(..) at all?
Eric
--
Eric Bodden
Sable Research Group, McGill University
Montréal, Québec, Canada
More information about the Soot-list
mailing list