diff --git a/test/good/auto2.ept b/test/good/auto2.ept new file mode 100644 index 0000000..ab579f4 --- /dev/null +++ b/test/good/auto2.ept @@ -0,0 +1,21 @@ +node count() returns (o : int) +let + o = 0 fby (o + 1); +tel + +node f() returns(x,y : bool) +let + (x,y) = (true,false) +tel + +node main() returns (c,c1 : bool) +let + automaton + state One + do (c,c1) = f() + until count() = 5 then Two + state Two + do (c,c1) = f() + until count() = 3 then One + end +tel diff --git a/test/good/current.ept b/test/good/current.ept new file mode 100644 index 0000000..77b71a9 --- /dev/null +++ b/test/good/current.ept @@ -0,0 +1,19 @@ + +node current (c : bool; x : int on c) returns ( y : int ) +let + y = merge c (true -> x) (false -> 0 fby y whenot c) +tel + +node internal_current (c : bool; x : int on c) returns ( y : int on c) +var x_cur : int; +let + x_cur = merge c (true -> x) (false -> 0 fby x_cur whenot c); + y = x_cur when c +tel + +node use_current (c : bool; x : int) returns (y : int on c) +var x_cur :int; +let + x_cur = current(c,x); + y = x_cur when c; +tel