heptagon/test/good/hierarchie.ept
Cédric Pasteur 87cb705fcb Added some tests file
- Arrays, parametrized nodes
- hierarchie.ept is a node with nested automaton
(generated a lot of variables, good test for 
performance)
2010-07-09 10:35:54 +02:00

43 lines
1.2 KiB
Text

node ssm(i1: bool; i2: bool; i3: bool; i4: bool)
returns (o1: bool; o2: bool; o3: bool; o4: bool)
let
automaton
state State1
do o1 = false; o2 = false; o3 = false; o4 = false
until i1 then TMP12
unless i2 then TMP11
state TMP11
do o1 = false; o2 = true; o3 = false; o4 = false;
until true then State3
state TMP12
do o1 = true; o2 = true; o3 = false; o4 = false;
until true then State2
state State3
var last end1: bool = false; last end2: bool = false;
do o1 = false; o2 = false; o3 = false; o4 = false;
automaton
state State1_1
do until i3 then State2_1
state State2_1
do end1 = true;
end;
automaton
state State1_2
do unless i4 then State2_2
state State2_2
do end2 = true
end
until end1 & end2 then State1
unless i1 then State4
| i2 then State2
state State2
var l1: bool;
do o1 = false; o2 = false; o3 = false; o4 = l1; l1 = true;
until i4 then State4
state State4
var l2: bool;
do o1 = false; o2 = false; o3 = l2; o4 = false; l2 = true;
until i4 then State4
end
tel