1
|
node b2i (b: bool) returns (i: int);
|
2
|
-- 0
|
3
|
let i = if b then 1 else 0; tel;
|
4
|
|
5
|
node Since (p: bool) returns (r: int);
|
6
|
-- 0
|
7
|
var __abs_1: int; __abs_0: bool;
|
8
|
let
|
9
|
(__abs_1) = b2i(__abs_0);
|
10
|
__abs_0 = p;
|
11
|
r = (__abs_1 -> if p then 1 else if (pre(r) = 0) then 0 else (pre(r) + 1));
|
12
|
|
13
|
tel;
|
14
|
|
15
|
node SinceGTOrZero (in: bool; min: int) returns (out: bool);
|
16
|
-- 1
|
17
|
var __abs_1: int; __abs_0: bool;
|
18
|
let
|
19
|
(__abs_1) = Since(__abs_0);
|
20
|
__abs_0 = in;
|
21
|
out = ((__abs_1 > min) or (__abs_1 = 0));
|
22
|
|
23
|
tel;
|
24
|
|
25
|
node Changed (p: bool) returns (r: bool);
|
26
|
-- 0
|
27
|
let r = (false -> (not (p = pre(p)))); tel;
|
28
|
|
29
|
node SinceLENotZero (in: bool; max: int) returns (out: bool);
|
30
|
-- 1
|
31
|
var __abs_1: int; __abs_0: bool;
|
32
|
let
|
33
|
(__abs_1) = Since(__abs_0);
|
34
|
__abs_0 = in;
|
35
|
out = ((__abs_1 <= max) and (__abs_1 > 0));
|
36
|
|
37
|
tel;
|
38
|
|
39
|
node Rise (p: bool) returns (r: bool);
|
40
|
-- 0
|
41
|
let r = (false -> ((not pre(p)) and p)); tel;
|
42
|
|
43
|
node Fall (p: bool) returns (r: bool);
|
44
|
-- 0
|
45
|
let r = (false -> ((not p) and pre(p))); tel;
|
46
|
|
47
|
node PFS_oracle
|
48
|
(TS: bool; LPFS: bool; RPFS: bool)
|
49
|
returns
|
50
|
(output_global: bool;
|
51
|
output_inhibited_R2_R3: bool;
|
52
|
output_unchanged_nop_R5: bool;
|
53
|
output_change_R3_Rise: bool;
|
54
|
output_change_R3_Fall: bool);
|
55
|
-- 2 1
|
56
|
--
|
57
|
--
|
58
|
--
|
59
|
--
|
60
|
var
|
61
|
__abs_1: bool;
|
62
|
__abs_3: bool;
|
63
|
__abs_5: int;
|
64
|
__abs_7: bool;
|
65
|
__abs_9: bool;
|
66
|
__abs_12: bool;
|
67
|
__abs_13: bool;
|
68
|
__abs_14: bool;
|
69
|
__abs_17: bool;
|
70
|
__abs_18: bool;
|
71
|
__abs_19: bool;
|
72
|
__abs_23: bool;
|
73
|
__abs_24: bool;
|
74
|
__abs_25: bool;
|
75
|
__abs_28: bool;
|
76
|
__abs_33: bool;
|
77
|
__abs_0: bool;
|
78
|
__abs_2: bool;
|
79
|
__abs_4: bool;
|
80
|
__abs_6: bool;
|
81
|
__abs_8: bool;
|
82
|
__abs_11: bool;
|
83
|
__abs_15: int;
|
84
|
__abs_16: bool;
|
85
|
__abs_21: int;
|
86
|
__abs_22: bool;
|
87
|
__abs_26: int;
|
88
|
__abs_27: bool;
|
89
|
__abs_32: int;
|
90
|
let
|
91
|
(__abs_3) = Rise(__abs_2);
|
92
|
(__abs_1) = Rise(__abs_0);
|
93
|
(__abs_14) = Fall(__abs_0);
|
94
|
(__abs_13) = Fall(__abs_2);
|
95
|
(__abs_9) = Fall(__abs_8);
|
96
|
(__abs_7) = Fall(__abs_6);
|
97
|
(__abs_5) = Since(__abs_4);
|
98
|
(__abs_19) = Rise(__abs_8);
|
99
|
(__abs_18) = Rise(__abs_6);
|
100
|
(__abs_17) = SinceGTOrZero(__abs_16, __abs_15);
|
101
|
(__abs_12) = Rise(__abs_11);
|
102
|
(__abs_23) = SinceGTOrZero(__abs_22, __abs_21);
|
103
|
(__abs_28) = SinceLENotZero(__abs_27, __abs_26);
|
104
|
(__abs_25) = Changed(__abs_8);
|
105
|
(__abs_24) = Changed(__abs_6);
|
106
|
(__abs_33) = SinceGTOrZero(__abs_22, __abs_32);
|
107
|
__abs_8 = LPFS;
|
108
|
__abs_6 = RPFS;
|
109
|
__abs_2 = (false -> pre(RPFS));
|
110
|
__abs_0 = (true -> pre(LPFS));
|
111
|
__abs_4 = (__abs_1 or __abs_3);
|
112
|
output_change_R3_Fall =
|
113
|
((__abs_5 = 1) => (__abs_7 or (__abs_9 and (not (__abs_7 and __abs_9)))));
|
114
|
__abs_15 = 4;
|
115
|
__abs_11 = TS;
|
116
|
output_change_R3_Rise =
|
117
|
((__abs_17 and __abs_12) =>
|
118
|
(__abs_18 or (__abs_19 and (not (__abs_18 and __abs_19)))));
|
119
|
__abs_21 = 3;
|
120
|
output_unchanged_nop_R5 = (__abs_23 => (not (__abs_24 or __abs_25)));
|
121
|
__abs_26 = 2;
|
122
|
output_inhibited_R2_R3 =
|
123
|
(true -> (__abs_28 => (not (__abs_24 or __abs_25))));
|
124
|
__abs_32 = 1;
|
125
|
output_global =
|
126
|
((((__abs_33 => (LPFS = (not RPFS))) and (LPFS or RPFS)) and
|
127
|
(LPFS and (not RPFS)))
|
128
|
->
|
129
|
((__abs_33 => (LPFS = (not RPFS))) and (LPFS or RPFS)));
|
130
|
__abs_22 = __abs_12;
|
131
|
__abs_27 = (__abs_14 or __abs_13);
|
132
|
__abs_16 = (__abs_13 or __abs_14);
|
133
|
--%MAIN
|
134
|
|
135
|
tel;
|