lustrec-tests/regression_tests/lustre_files/success/kind_fmcad08/misc/two_counters.lus @ 8aaf9f57
1 |
-- a simple boolean ant int counter
|
---|---|
2 |
|
3 |
node greycounter (x:bool) returns (out:bool); |
4 |
var a,b:bool; |
5 |
let
|
6 |
a = false -> not pre(b); |
7 |
b = false -> pre(a); |
8 |
out = a and b; |
9 |
tel
|
10 |
|
11 |
node intloopcounter (x:bool) returns (out:bool); |
12 |
var time: int; |
13 |
let
|
14 |
time = 0 -> if pre(time) = 3 then 0 |
15 |
else pre time + 1; |
16 |
out = (time = 2); |
17 |
tel
|
18 |
|
19 |
|
20 |
--@ ensures OK;
|
21 |
node top (x:bool) returns (OK:bool); |
22 |
var b,d:bool; |
23 |
let
|
24 |
b = greycounter(x); |
25 |
d = intloopcounter(x); |
26 |
OK = b = d; |
27 |
--%PROPERTY OK;
|
28 |
tel
|