1
|
type trivial__type = enum {One };
|
2
|
|
3
|
|
4
|
node trivial__One_handler_until (trivial__restart_act: bool) returns (trivial__restart_in: bool; trivial__state_in: trivial__type; o_out: int)
|
5
|
var __trivial__One_handler_until_2: int;
|
6
|
__trivial__One_handler_until_1: bool;
|
7
|
o: int;
|
8
|
let
|
9
|
|
10
|
trivial__restart_in, trivial__state_in = (false,One);
|
11
|
o_out = o;
|
12
|
o = (if __trivial__One_handler_until_1 then 0 else (1 + __trivial__One_handler_until_2));
|
13
|
__trivial__One_handler_until_2 = pre o;
|
14
|
__trivial__One_handler_until_1 = (true -> false);
|
15
|
|
16
|
tel
|
17
|
|
18
|
node trivial__One_unless (trivial__restart_in: bool; r: bool; o: int) returns (trivial__restart_act: bool; trivial__state_act: trivial__type)
|
19
|
var __trivial__One_unless_2: bool;
|
20
|
__trivial__One_unless_1: int;
|
21
|
let
|
22
|
|
23
|
trivial__restart_act, trivial__state_act = (if __trivial__One_unless_2 then (true,One) else (trivial__restart_in,One));
|
24
|
__trivial__One_unless_2 = (r or (__trivial__One_unless_1 = 100));
|
25
|
__trivial__One_unless_1 = pre o;
|
26
|
|
27
|
tel
|
28
|
|
29
|
node triangle (r: bool) returns (o: int)
|
30
|
var trivial__state_in: trivial__type clock;
|
31
|
trivial__state_act: trivial__type clock;
|
32
|
__triangle_7: bool;
|
33
|
__triangle_8: trivial__type;
|
34
|
__triangle_6: bool;
|
35
|
__triangle_3: bool when One(trivial__state_act);
|
36
|
__triangle_4: trivial__type when One(trivial__state_act);
|
37
|
__triangle_5: int when One(trivial__state_act);
|
38
|
__triangle_1: bool when One(trivial__state_in);
|
39
|
__triangle_2: trivial__type when One(trivial__state_in);
|
40
|
trivial__next_restart_in: bool;
|
41
|
trivial__restart_in: bool;
|
42
|
trivial__restart_act: bool;
|
43
|
trivial__next_state_in: trivial__type;
|
44
|
let
|
45
|
|
46
|
trivial__restart_in, trivial__state_in = (if __triangle_6 then (false,One) else (__triangle_7,__triangle_8));
|
47
|
__triangle_7, __triangle_8 = pre (trivial__next_restart_in,trivial__next_state_in);
|
48
|
__triangle_6 = (true -> false);
|
49
|
trivial__next_restart_in, trivial__next_state_in, o = merge trivial__state_act (One -> (__triangle_3,__triangle_4,__triangle_5));
|
50
|
__triangle_3, __triangle_4, __triangle_5 = trivial__One_handler_until (trivial__restart_act when One(trivial__state_act)) every (trivial__restart_act);
|
51
|
trivial__restart_act, trivial__state_act = merge trivial__state_in (One -> (__triangle_1,__triangle_2));
|
52
|
-- __triangle_1, __triangle_2 = trivial__One_unless (trivial__restart_in when One(trivial__state_in),r when One(trivial__state_in),o when One(trivial__state_in)) every (trivial__restart_in);
|
53
|
__triangle_1, __triangle_2 = (if (r or (pre o = 100)) then (true, One) else (trivial__restart_in, One)) when One(trivial__state_in);
|
54
|
tel
|
55
|
|
56
|
|