[Soot-list] one question about the local variables
jiangfan shi
jiangfan.shi at gmail.com
Wed Aug 31 01:43:42 EDT 2011
Dear All,
I may ask a simple question here, but I really do not understand that. Some
papers related to points-to analysis say the following:
"Local variables (including formals) for both primitive and reference types
in Java cannot have aliases."
Maybe I do not capture the point, but I could not understand why local
variables can not have aliases? For example,
void m1(){
MyClass o1=new MyClass();
MyClass o2=new MyClass();
o1=o2;
}
For the above code snippet, m1 is a method, and MyClass is a class. Doesn't
the last assignment statement make these two local variables, o1 and o2,
alias?
For another example related to formal parameters,
void m2(MyClass o1, MyClass o2){
o1=o2;
}
With the same explanation of these symbols, I am thinking o1 and o2 are now
alias.
Any hints are highly appreciated, Thanks.
Jiangfan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20110831/d6855b17/attachment.html
More information about the Soot-list
mailing list