two small tests.
This commit is contained in:
parent
9a17648516
commit
07e5279bff
2 changed files with 40 additions and 0 deletions
21
test/good/auto2.ept
Normal file
21
test/good/auto2.ept
Normal file
|
@ -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
|
19
test/good/current.ept
Normal file
19
test/good/current.ept
Normal file
|
@ -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
|
Loading…
Reference in a new issue