[Soot-list] Inter-procedure constant propagation
P Lee
paulur at gmail.com
Thu Oct 17 22:35:19 EDT 2013
(I saw there is a thread discussing constant propagation, but it seems stop
at intra-procedure constant. So I start a new thread.)
The use-case is very simple. Suppose we have a constant that is defined in
one class and the constant is used in another class, as the following code:
public interface CONST {
String c = "xyz";
}
public class SampleClass{
static aMethod(String s){
String a = CONST.c + "abc";
String b = s + "opq";
System.out.println( a + b );
}
public static void main(String arg[]){
aMethod(CONST.c);
}
}
I want to report that "a" is always a constant and b is a constant in the
main method.Thanks in advance for any advise!
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20131017/efcabda0/attachment.html
More information about the Soot-list
mailing list