Line | |
---|
1 | module checkNoUnusedLocalDefinitions { |
---|
2 | |
---|
3 | type component someComponent{ |
---|
4 | timer componentTimer1, componentTimer2; |
---|
5 | port portType p1,p2; |
---|
6 | } |
---|
7 | |
---|
8 | function f_0(){ |
---|
9 | timer localTimer; |
---|
10 | var integer v1; |
---|
11 | const integer c1:=1; |
---|
12 | var template t1 template1; |
---|
13 | var someComponent comp1; |
---|
14 | template (present) t1 template2 :={f1:=1}; |
---|
15 | } |
---|
16 | |
---|
17 | altstep as_0(){ |
---|
18 | timer localTimer; |
---|
19 | var integer v1, v2; |
---|
20 | const integer c1:=1; |
---|
21 | var template t1 template1; |
---|
22 | var someComponent comp1; |
---|
23 | [] p.receive(template1) -> value v1 |
---|
24 | { |
---|
25 | v2 := v1.x; |
---|
26 | } |
---|
27 | |
---|
28 | } |
---|
29 | |
---|
30 | testcase tc_0() runs on someComponent{ |
---|
31 | timer localTimer; |
---|
32 | var integer v1; |
---|
33 | const integer c1:=1; |
---|
34 | var template t1 template1; |
---|
35 | var someComponent comp1; |
---|
36 | componentTimer1.start; //good |
---|
37 | } |
---|
38 | control { |
---|
39 | timer localTimer; |
---|
40 | var integer v1,v2; |
---|
41 | const integer c1:=1; |
---|
42 | var template t1 template1; |
---|
43 | var someComponent comp1; |
---|
44 | |
---|
45 | } |
---|
46 | |
---|
47 | |
---|
48 | |
---|
49 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.