[Soot-list] Type Errors (12/27) under use-original-names

Etienne M. Gagnon gagnon.etienne_m at uqam.ca
Tue Jun 5 14:41:11 EDT 2007


Hi Coen,

It's been a long time since I wrote the type inference engine, but I'll
try to guess a possible source for this problem.

Type inference is very sensible to variable splitting. Let me explain.
Type inference was initially written to "recover" the types of Jimple
local variables. Jimple local variables represent the stack locations
and local variables of a method found in a Java class file. These
locations usually correspond to local variables in the original Java
source file, or to the intermediate results of expressions which had
implicit types, again, in the source.  Yet, in order for typing to
succeed, it is important for local variables to be split according to
use-def chains (or SSA, alternately), as the same byte code local
variable might actually represent various distinct source code local
variables with non-overlapping life time in the source code.

It is possible that the original-name option changes somewhat the
splitting algorithm, and in doing so, creates untypeable Jimple code,
i.e. Jimple code where some local variable cannot be given a single
type, coherent with all its uses and definitions.

Just guessing...  I'll let the original-name option specialists look at
the issue. Hopefully, my hint will help them locate the problem. ;-)

Have fun!

Etienne

Coen De Roover wrote :
> Invoking soot with the following arguments works fine:
> --verbose -src-prec c -f jimple -app -w -p cg.spark on
> org.gjt.sp.jedit.jEdit
>
> However, as soon as I throw in "-p jb  use-original-names:true",
> Jimple's type assigner starts raising TypeException exceptions such as
> the following on com.microstar.xml.XmlParser: void parseElements():
> ...

-- 
Etienne M. Gagnon, Ph.D.             http://www.info2.uqam.ca/~egagnon
SableCC:                                            http://sablecc.org
SableVM:                                            http://sablevm.org


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20070605/65b9b68a/signature.bin


More information about the Soot-list mailing list