added another example
This commit is contained in:
parent
cb521c9b68
commit
9743bced77
1 changed files with 27 additions and 0 deletions
27
test/good/or_keep.ept
Normal file
27
test/good/or_keep.ept
Normal file
|
@ -0,0 +1,27 @@
|
|||
node nat() returns (o : int)
|
||||
let
|
||||
o = 0 fby (o + 1);
|
||||
tel
|
||||
|
||||
node f<<n : int>>(i : bool^n) returns (o, b : bool; nat : int)
|
||||
let
|
||||
b = fold (or)<<n>>(i, false);
|
||||
automaton
|
||||
state Idle
|
||||
do o = false; nat = 0;
|
||||
unless b then Emit
|
||||
state Emit
|
||||
do o = true;
|
||||
nat = nat();
|
||||
until nat > 3 then Idle
|
||||
unless b then Emit
|
||||
end
|
||||
tel
|
||||
|
||||
node main() returns (i1, i2, i3, o, b : bool; nat : int)
|
||||
let
|
||||
i1 = false;
|
||||
i2 = false fby true fby false;
|
||||
i3 = false;
|
||||
(o, b, nat) = f<<3>>([i1, i2, i3]);
|
||||
tel
|
Loading…
Reference in a new issue