[Soot-list] extracing actual value from local variable
Eric Bodden
bodden at st.informatik.tu-darmstadt.de
Tue Jun 8 06:52:18 EDT 2010
> I was trying to cast the value to an IntConstant after it has been assigned
> but I was getting an error that 'JimpleLocal' cannot be cast to
> 'IntConstant'.
You must not cast the Local but instead the right-hand-side value of
the assignment.
So from your statement "if i1 < 1" search backwards in the
control-flow graph until you hit an assignment "i1 = <whatever>". Then
check whether "<whatever>" is of type IntConstant, and if it is then
cast it.
Hope that helps,
Eric
More information about the Soot-list
mailing list