b913edcd5e
On the road to beta is the new Minils AST, for now : * Heptagon and Obc AST changes, * Java code generation, * Recursives Qualnames, * Various bug fixes, * Added partial application for iterators, For instance: ... = map<<n>> (f<<se>>)((t1, t1'))(t2, t3) is translated to: for(int i =...) ... = f(t1, t1', t2[i], t3[i])
18 lines
No EOL
426 B
Text
18 lines
No EOL
426 B
Text
node counter(res: bool; tick: bool) returns (o: int)
|
|
let
|
|
o = if res then 0 else if tick then 1 -> pre o + 1 else 0 -> pre o;
|
|
tel
|
|
|
|
node counter3() returns (t: async bool)
|
|
var last async t: int; cpt: int;
|
|
let
|
|
cpt = counter(false,true);
|
|
automaton
|
|
state I do
|
|
t = async counter(false,true)));
|
|
until true continue III
|
|
state III do
|
|
until cpt/3 = 0 continue I
|
|
end;
|
|
b = 0 fby cpt - 1 = 0 -> !t ;
|
|
tel |