lustrec-tests/regression_tests/lustre_files/success/clocks/clocks2.lus @ b03d5034
1 |
|
---|---|
2 |
type choice = enum { One, Two }; |
3 |
type entier = int; |
4 |
|
5 |
const PI = 3; |
6 |
|
7 |
const choix = One; |
8 |
|
9 |
node toto (x:int) returns (a:int;y:int) |
10 |
var c : choice clock;b1, b2:entier; |
11 |
let
|
12 |
a = PI fby (a+1); |
13 |
c = if a=x then One else Two ; |
14 |
b1 = 1 when One(c); |
15 |
b2 = 2 when Two(c); |
16 |
y = merge c (One -> b1) (Two -> b2); |
17 |
tel
|
18 |
|
19 |
node clocks2 (x:bool) returns (y:int) |
20 |
var a:int; b:int; |
21 |
let
|
22 |
(a,b) = toto(if x then 0 else 1); |
23 |
y = a ; |
24 |
tel
|
25 |
|