Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / regression_tests / lustre_files / success / automata / with_properties / aut1.lus @ 02d89bbb

History | View | Annotate | Download (254 Bytes)

1

    
2
node top (x :int) returns (y:bool) 
3
var l:int;
4
let
5
 automaton parity
6
 state Even :
7
 unless (x mod 2 = 1) restart Odd
8
 let
9
   l = x -> pre (l/2);
10
 tel
11
 state Odd  :
12
 unless (x mod 2 = 0) restart Even
13
 let
14
  l = x -> pre (3*l + 1);
15
 tel
16
 y = (l = 1);
17
tel