heptagon/test/good/t2open.ept

46 lines
768 B
Text
Raw Permalink Normal View History

2010-06-21 12:11:06 +02:00
(* pour debugger
set arguments -I test/good -v test/good/t2.ept *)
open T1
type t
type r2
node g(x: bool) returns (o: bool)
let
o = f(x)
tel
node h(x,z,m:int) returns (o:int)
var last k:int = 0;
last w: int;
let
automaton
state S1
var r:int;
2011-05-23 14:04:11 +02:00
do
2010-06-21 12:11:06 +02:00
k = m + 2;
r = k + 3;
w = 1 + 2;
until (1 = 0) then S2
| (1 = 2) then S1
unless (2 = last k) then S2
state S2
do
k = 2;
until (1 = 0) then S2
end;
present
| (x = 0) do o = 2 -> pre o + 2
2010-06-21 12:11:06 +02:00
| (x = 2) do o = 4
2012-07-18 16:54:44 +02:00
default do o = 2
2010-06-21 12:11:06 +02:00
end
tel
2012-07-18 16:54:44 +02:00
node main() returns (o1,o2:int)
let
o1 = if (g(false fby true)) then 1 else 2;
o2 = h(0 fby 1 fby 2, 3, o1-2);
tel