start of new file
[IRC.git] / Robust / src / Tests / CallGraph / testCallGraph.java
1 public class CGTestParam {
2     flag w;
3     int a, b;
4     public CGTestParam() { a = 0; b = 0; }
5     public void CGTestFoo() {}
6     public void CGTestBar() {}
7 }
8
9 public class CGTestParamChild1 extends CGTestParam {
10     flag x;
11     public CGTestParamChild1() {}
12     public void CGTestBar() {}
13 }
14
15 public class CGTestParamChild2 extends CGTestParam {
16     flag y;
17     public CGTestParamChild2() {}
18     public void CGTestFoo() {}
19     public void CGTestBar() {}
20 }
21
22 task Startup( StartupObject s{ initialstate } ) {
23     CGTestParam p = new CGTestParam(){!w};
24     taskexit( s{ !initialstate } );
25 }
26
27 task CGTestTask1( CGTestParam p{!w} ) {
28     p.CGTestFoo();
29     CGTestParamChild1 p1 = new CGTestParamChild1(){!x};
30     CGTestParamChild2 p2 = new CGTestParamChild2(){!y};
31     taskexit( p{w} );
32 }
33
34 task CGTestTask2( CGTestParamChild1 p{!x} ) {
35     p.CGTestFoo();
36     p.CGTestBar();
37     taskexit( p{x} );
38 }
39
40 task CGTestTask3( CGTestParamChild2 p{!y} ) {
41     p.CGTestFoo();
42     p.CGTestBar();
43     taskexit( p{y} );
44 }