Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / regression_tests / lustre_files / success / kind_fmcad08 / misc / two_counters.lus @ b745c1a8

History | View | Annotate | Download (501 Bytes)

1 b8dc00eb bourbouh
-- 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
node top (x:bool) returns (OK:bool);
21 bd3f748f ploc
--@ contract guarantee OK;
22 b8dc00eb bourbouh
var b,d:bool;
23
let
24
  b = greycounter(x);
25
  d = intloopcounter(x);
26
  OK = b = d;
27
  --%PROPERTY OK;
28
tel