Project

General

Profile

Download (385 Bytes) Statistics
| Branch: | Tag: | Revision:
1

    
2
type choice1 = enum { On, Off };
3
type choice2 = enum { Up, Down };
4

    
5
node clocks6 (x:int) returns (y:int)
6
var c:choice1 clock; d:choice2 clock; b1,b2,b3,z:int;
7
let
8
  c = if 0=x then Off else On;
9
  d = if x>0 then Up else Down;
10
  b1 = 1 when On(c);
11
  b2 = 2 when Off(c);
12
  b3 = 3 when Down(d);
13
  y = merge d (Up -> z when Up(d)) (Down -> b3);
14
  z = merge c (On -> b1) (Off -> b2);
15
tel
16

    
(10-10/25)