2010-06-21 12:11:06 +02:00
|
|
|
node (+)(x,y:int) returns (z:int)
|
|
|
|
let
|
|
|
|
automaton
|
|
|
|
state Up
|
|
|
|
do z = x + y;
|
|
|
|
until z > 10 then Down
|
|
|
|
state Down
|
|
|
|
do z = x - y;
|
|
|
|
until z < -10 then Up
|
|
|
|
end
|
|
|
|
tel
|
|
|
|
|
|
|
|
|
2011-02-07 14:24:17 +01:00
|
|
|
node updown2() returns (y:int)
|
2010-06-21 12:11:06 +02:00
|
|
|
let
|
|
|
|
y = (0 fby y) + 1
|
|
|
|
tel
|
|
|
|
|
|
|
|
node main() returns (y:int)
|
|
|
|
let
|
2011-02-07 14:24:17 +01:00
|
|
|
y = updown2();
|
2010-06-21 12:11:06 +02:00
|
|
|
tel
|
2012-07-18 16:54:44 +02:00
|
|
|
|
|
|
|
(* CHECK lessthan12 *)
|
|
|
|
node lessthan12() returns (ok:bool)
|
|
|
|
let
|
|
|
|
ok = main() < 12
|
|
|
|
tel
|