2011-05-23 14:04:11 +02:00
|
|
|
node f(x:bool;c:bool) returns (o:bool)
|
2011-05-23 09:24:57 +02:00
|
|
|
let
|
2011-05-23 14:04:11 +02:00
|
|
|
automaton
|
|
|
|
state A
|
|
|
|
var l:bool; do
|
|
|
|
l = x when c;
|
|
|
|
o = merge c (true -> l) (false -> false)
|
|
|
|
until true then B
|
|
|
|
state B
|
|
|
|
do o = false
|
|
|
|
end
|
2011-05-23 09:24:57 +02:00
|
|
|
tel
|
|
|
|
|
2011-05-23 14:04:11 +02:00
|
|
|
|
|
|
|
(*
|
|
|
|
node clock_on<<pref, per : int>>(w1, w2 : bool) returns (o : bool)
|
2011-05-23 09:24:57 +02:00
|
|
|
let
|
2011-05-23 14:04:11 +02:00
|
|
|
automaton
|
|
|
|
state FirstPeriod
|
|
|
|
var w2' : bool; do
|
|
|
|
w2' = w1 when w2;
|
|
|
|
o = false;
|
|
|
|
until true then Cruise
|
|
|
|
state Cruise do
|
2011-11-21 02:03:45 +01:00
|
|
|
o = true;
|
2011-05-23 14:04:11 +02:00
|
|
|
end
|
2011-05-23 09:24:57 +02:00
|
|
|
tel
|
2011-05-23 14:04:11 +02:00
|
|
|
*)
|