heptagon/test/tt.ept
2011-12-06 15:44:20 +01:00

17 lines
No EOL
395 B
Text

node f(a : int) = (o : int)
var x : int; c : bool;
let
c = true fby false fby c;
x = 0 fby ((merge c a (x whenot c)) + 1);
o = x when c
tel
node g(a : int) = (o : int)
var x1, x2:int; c1, c2: bool;
let
c1 = true fby false fby c1;
c2 = true fby false fby c2;
x1 = 0 fby ((merge c1 a (x1 whenot c1)) + 1);
x2 = 0 fby ((merge c2 x1 (x2 whenot c2)) + 1);
o = x2 when c2 when c1;
tel