def reach has to use PointerMethod to detect CFG edges that the analysis cares about
[IRC.git] / Robust / src / Tests / disjoint / definite / test.java
1 public class Foo {
2   public Foo f;
3   public Foo g;
4 }
5
6 public class Test {
7
8   
9
10   static public void main( String args[] ) {
11
12     Foo x = getFlagged();
13     Foo y = getUnflagged();
14
15     x.f = y;
16
17     gendefreach QWQ1; 
18
19     Foo z = x;
20     while( false ) {
21       gendefreach QWQ2; 
22       z = z.f;
23     }
24
25     gendefreach QWQ3;
26
27     /*
28     gendefreach yn1;    
29
30     Foo x = getFlagged();
31     Foo y = getUnflagged();
32     x.f = y;
33
34     // x is flagged and y is reachable from
35     // at most one object from that site
36     gendefreach y0;
37     genreach y0;
38
39     Foo t = getFlagged();
40     t = getFlagged();
41
42     // x is flagged and y is reachable from
43     // at most one object from that site, even
44     // though x is summarized now
45     gendefreach y1;
46     genreach y1;
47
48     x.g = y;
49
50     // if we had definite reachability analysis
51     // we would realize y is already reachable
52     // from x, but we don't and x is summarized
53     // so we conservatively increase the arity
54     // of objects y is reachable from.
55     gendefreach y2;
56     genreach y2;
57     */
58
59     System.out.println( " "+x+y+z );
60   }
61
62   static public Foo getFlagged() {
63     return disjoint jupiter new Foo();
64   }
65
66   static public Foo getUnflagged() {
67     return new Foo();
68   }
69
70 }