[Soot-list] points-to analysis question
Mayur Naik
mhn at cs.stanford.edu
Sat Mar 26 06:59:37 EST 2005
I have a question about the way Soot does points-to analysis of open
programs. Consider the program:
public class Hello {
static Hello H;
static Hello G;
public static void foo(Hello x) { H = x; }
public static void bar(Hello y) { G = y; }
}
A conservative points-to analysis should report that the fields H and G
are may-aliased, right? But Soot reports that they aren't. I'm using the
options:
-w -p cg all-reachable:true -p cg.cha enabled:false -p cg.spark
enabled:true
I understand that it does so (and so do other frameworks I've used)
because it doesn't see any object of class Hello created, but I want to
know whether there's any other option by which I can get Soot to report
that they are may-aliased. I could add a harness to the above class:
public static void main(String args[]) {
Hello h = new Hello();
foo(h);
bar(h);
}
and then Soot does report that H and G are aliased, but I'm using Soot for
building a tool for detecting concurrency bugs in huge open Java programs,
and I want to know if I can get conservative points-to results as in the
above example without writing a harness like the main method.
Thanks,
-- Mayur
More information about the Soot-list
mailing list